package com.cf.imes.module.executor.dal.mysql.plate;

import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderGoodsPlateRespVO;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderStatisticsReqVO;
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单板件统计Mapper
 *
 * @author Gqr
 * @since 2024/8/7 17:06
 */
@Mapper
public interface OrderPlateStatisticsMapper extends BaseMapperX<PlateDO> {
    /**
     * 基于商品id分组的小板数量列表
     *
     * @param reqVO
     * @return
     */
    List<OrderGoodsPlateRespVO> selectPlateCountList(@Param("req") OrderStatisticsReqVO reqVO);


    /**
     * 基于订单日期分组的前10小板数量分组
     * @param goodsIdList
     * @param reqVO
     * @return
     */
    List<OrderGoodsPlateRespVO> selectTopTenPlateCountListGroupByOrderDate(@Param("goodsIds") List<String> goodsIdList, @Param("req") OrderStatisticsReqVO reqVO);


    /**
     * 基于商品id分组的小板面积列表
     * @param reqVO
     * @return
     */
    List<OrderGoodsPlateRespVO> selectPlateAreaList(@Param("req") OrderStatisticsReqVO reqVO);


    /**
     * 基于订单日期分组的前10小板面积分组
     *
     * @param reqVO
     * @return
     */
    List<OrderGoodsPlateRespVO> selectTopTenPlateAreaListGroupByOrderDate(@Param("goodsIds") List<String> goodsIdList, @Param("req") OrderStatisticsReqVO reqVO);

}
