package com.jeesharp.business.modules.finance.platformrevenue.service;

import com.jeesharp.business.modules.finance.merchantreceivable.vo.PlatformCommissionPeriodSummaryVO;
import com.jeesharp.business.modules.finance.platformrevenue.entity.PlatformRevenue;
import com.jeesharp.business.modules.finance.platformrevenue.vo.PlatformRevenueQueryVO;
import com.jeesharp.business.modules.finance.platformrevenue.vo.PlatformRevenueRollupAggregateVO;
import com.jeesharp.framework.mybatis.core.service.BaseInterface;

import java.time.LocalDate;
import java.util.List;

/**
 * 平台收入日汇总领域服务接口。
 *
 * @author jeesharp
 * @since 2026-06-29
 */
public interface PlatformRevenueService extends BaseInterface<PlatformRevenue, PlatformRevenueQueryVO> {

    /**
     * 按自然日幂等写入或刷新日汇总。
     */
    void upsertDailyRollup(LocalDate statDate, String platformTenantId, PlatformRevenueRollupAggregateVO aggregate);

    /**
     * 查询日汇总趋势（已落库区间）。
     */
    List<PlatformCommissionPeriodSummaryVO> findDailyTrend(PlatformRevenueQueryVO query);
}
