package com.bonus.canteen.core.report.statistics.order.analysis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.auth.po.MgrUserAuthPO;
import com.bonus.canteen.core.report.api.dto.ReportOrderDetailDTO;
import com.bonus.canteen.core.report.api.vo.ReportOrderDetaiVO;
import com.bonus.canteen.core.report.api.vo.ReportOrderDishesSumVO;
import com.bonus.canteen.core.report.statistics.order.analysis.model.ReportAnalysisDishesSale;
import com.bonus.canteen.core.report.statistics.order.analysis.param.ReportAnalysisDishesSaleParam;
import com.bonus.canteen.core.report.statistics.order.analysis.vo.ReportAnalysisDishesSaleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface ReportAnalysisDishesSaleMapper extends BaseMapper<ReportAnalysisDishesSale> {
   List<ReportAnalysisDishesSaleVO> listSummary(@Param("param") ReportAnalysisDishesSaleParam param, @Param("authPO") MgrUserAuthPO authPO);

   ReportAnalysisDishesSaleVO getSummaryTotal(@Param("param") ReportAnalysisDishesSaleParam param, @Param("authPO") MgrUserAuthPO authPO);

   List<ReportAnalysisDishesSale> init(@Param("param") ReportAnalysisDishesSaleParam param, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

   void initFix(@Param("param") ReportAnalysisDishesSaleParam param, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

   List<ReportOrderDishesSumVO> getDishesMonthSum(@Param("startDate") LocalDate firstDay, @Param("endDate") LocalDate lastDay, @Param("dishesIdList") List<Long> dishesIdList);

   List<ReportOrderDetaiVO> getOrderMealtimeDetail(@Param("param") ReportOrderDetailDTO content);
}
