package com.czg.service.order.mapper;

import com.czg.order.vo.SaleSummaryCountVo;
import com.mybatisflex.core.BaseMapper;
import com.czg.order.entity.ShopProdStatistic;

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

/**
 * 商品统计表 映射层。
 *
 * @author ww
 * @since 2025-11-21
 */
public interface ShopProdStatisticMapper extends BaseMapper<ShopProdStatistic> {

    /**
     * 根据店铺id和日期 统计商品
     */
    List<ShopProdStatistic> selectProStatByDay(Long shopId, LocalDate day, String productName, Long categoryId);

    List<ShopProdStatistic> getProdStatSingleDate(Long shopId, LocalDate day, String productName, Long categoryId);

    List<ShopProdStatistic> getProdStatDateRange(Long shopId, LocalDate start, LocalDate end, String productName, Long categoryId);


    //-----------------总统计  总金额统计-----------------

    SaleSummaryCountVo summaryCountByDay(Long shopId, LocalDate day, String productName, Long categoryId);
    SaleSummaryCountVo summaryCountSingleDate(Long shopId, LocalDate day, String productName, Long categoryId);
    SaleSummaryCountVo summaryCountDateRange(Long shopId, LocalDate start, LocalDate end, String productName, Long categoryId);
}
