package cn.iocoder.yudao.module.system.dal.mysql.restaurant;



import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.controller.admin.restaurant.vo.DishesOrderStatisticsPageReqVO;
import cn.iocoder.yudao.module.system.controller.admin.restaurant.vo.DishesOrderExportVO;
import cn.iocoder.yudao.module.system.controller.admin.restaurant.vo.EmployeeDishesOrderReportPageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.restaurant.DishesOrderReportDetail;
import cn.iocoder.yudao.module.system.dal.dataobject.restaurant.DishesOrderStatisticsDO;
import cn.iocoder.yudao.module.system.dal.dataobject.restaurant.EmployeeDishesOrderReportDO;
import cn.iocoder.yudao.module.system.dal.dataobject.restaurant.EmployeeDishesOrderReportVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 长者点餐统计 Mapper
 *
 * @author 系统管理员
 */
@Mapper
public interface DishesOrderStatisticsMapper extends BaseMapperX<DishesOrderStatisticsDO> {
    Page<DishesOrderStatisticsDO> getDishesOrderStatisticsPage(@Param("page") Page<DishesOrderStatisticsDO> page, @Param("params") DishesOrderStatisticsPageReqVO pageReqVO);

    Page<DishesOrderExportVO> getDishesOrderExportPage(@Param("page") Page<DishesOrderExportVO> page, @Param("params") DishesOrderStatisticsPageReqVO pageReqVO);
    List<DishesOrderExportVO> getDishesOrderExportList(DishesOrderStatisticsPageReqVO pageReqVO);
    //    default PageResult<DishesOrderStatisticsDO> selectPage(DishesOrderStatisticsPageReqVO reqVO) {
//        return selectPage(reqVO, new LambdaQueryWrapperX<DishesOrderStatisticsDO>()
//                .eqIfPresent(DishesOrderStatisticsDO::getElderId, reqVO.getElderId())
//                .eqIfPresent(DishesOrderStatisticsDO::getRestaurantId, reqVO.getRestaurantId())
//                .likeIfPresent(DishesOrderStatisticsDO::getRestaurantName, reqVO.getRestaurantName())
//                .eqIfPresent(DishesOrderStatisticsDO::getMonth, reqVO.getMonth())
//                .eqIfPresent(DishesOrderStatisticsDO::getCount, reqVO.getCount())
//                .eqIfPresent(DishesOrderStatisticsDO::getTotalAmount, reqVO.getTotalAmount())
//                .betweenIfPresent(DishesOrderStatisticsDO::getCreatedTime, reqVO.getCreatedTime())
//                .eqIfPresent(DishesOrderStatisticsDO::getCreatedBy, reqVO.getCreatedBy())
//                .orderByDesc(DishesOrderStatisticsDO::getId));
//    }
    IPage<EmployeeDishesOrderReportVO> selectMainPage(
        @Param("page") Page<EmployeeDishesOrderReportVO> page,
        @Param("params") EmployeeDishesOrderReportPageReqVO params);

    List<DishesOrderReportDetail> selectDetailsByMainIds(
            @Param("mainIds") List<Long> mainIds,
            @Param("params") EmployeeDishesOrderReportPageReqVO params);
}