package com.talentcard.server.mapper; import java.time.LocalDateTime; import java.util.List; import java.util.Map; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.talentcard.server.entity.BenefitOrder; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.SelectProvider; @Mapper public interface MerchantSettlementStatisticsMapper extends BaseMapper { @SelectProvider(type = StatisticsQuerySql.class, method = "selectPeriodSummaries") List> selectPeriodSummaries(@Param("merchantId") Long merchantId, @Param("merchantType") String merchantType, @Param("periodType") String periodType, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("size") int size, @Param("offset") int offset); @Select(""" """) Long countPeriodSummaries(@Param("merchantId") Long merchantId, @Param("merchantType") String merchantType, @Param("periodType") String periodType, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime); @SelectProvider(type = StatisticsQuerySql.class, method = "selectMerchantOverviews") List> selectMerchantOverviews(@Param("merchantId") Long merchantId, @Param("merchantType") String merchantType, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime); @SelectProvider(type = StatisticsQuerySql.class, method = "selectSettlementExportDetails") List> selectSettlementExportDetails(@Param("merchantId") Long merchantId, @Param("orderStatus") Integer orderStatus, @Param("verifyStatus") Integer verifyStatus, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime, @Param("limit") int limit); @SelectProvider(type = StatisticsQuerySql.class, method = "selectDashboardCards") Map selectDashboardCards(@Param("merchantId") Long merchantId, @Param("todayStart") LocalDateTime todayStart, @Param("todayEnd") LocalDateTime todayEnd, @Param("weekStart") LocalDateTime weekStart, @Param("weekEnd") LocalDateTime weekEnd); }