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

import com.jeesharp.business.modules.finance.platformrevenue.entity.PlatformRevenue;
import com.jeesharp.business.modules.finance.platformrevenue.vo.PlatformRevenueQueryVO;
import com.jeesharp.framework.mybatis.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * 平台收入日汇总 MyBatis Mapper。
 *
 * @author jeesharp
 * @since 2026-06-29
 */
@Mapper
public interface PlatformRevenueMapper extends BaseMapper<PlatformRevenue, PlatformRevenueQueryVO> {

    PlatformRevenue findByStatDateAndType(@Param("statDate") LocalDate statDate,
            @Param("periodType") String periodType,
            @Param("tenantId") String tenantId);

    List<PlatformRevenue> findDailyTrend(@Param("query") PlatformRevenueQueryVO query);
}
