package com.bonus.canteen.core.order.common.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.order.common.model.OrderDetail;
import com.bonus.canteen.core.order.common.vo.OrderGoodsNumVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
@InterceptorIgnore
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {
   void batchUpdateDetailRefundQuantity(@Param("list") List<OrderDetail> updateList, @Param("detailIds") List<Long> detailIds, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

   List<OrderGoodsNumVO> getOrderDetailHistoryList(@Param("custId") Long custId, @Param("orderDate") LocalDate orderDate, @Param("mealtimeType") Integer mealtimeType, @Param("goodsIdList") List<Long> goodsIdList);
}
