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

import com.bonus.canteen.core.order.android.vo.OrderListAndroidVO;
import com.bonus.canteen.core.order.common.dto.OrderSearchParam;
import com.bonus.canteen.core.order.common.model.OrderInfo;
import com.bonus.canteen.core.order.common.vo.OrderIdDateVO;
import com.bonus.canteen.core.order.mobile.vo.OrderInfoMobileVO;
import com.bonus.canteen.core.order.mobile.vo.OrderListMobileVO;
import com.bonus.canteen.core.order.web.dto.OrderUserPermissionDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.Collection;
import java.util.List;

public interface OrderInfoService {
   void saveList(Collection<OrderInfo> entityList);

   void updateOrderState(Long orderId, LocalDate orderDate, Integer payState, Integer orderState, Integer dishesState, String mealCode);

   void updateOrderRefundState(Long orderId, LocalDate orderDate, Integer orderRefundState, BigDecimal refundAmount);
//
//   void updateOrderInfo(OrderInfo updateOrderInfo);
//
//   void updateOrderFinishByOrderIds(List<Long> orderIds, List<LocalDate> orderDates);
//
//   void updateCancelByOrderIds(Collection<Long> orderIds, Collection<LocalDate> orderDates);

   void updateOrderCommented(Long orderId);
//
//   boolean existMacOrderId(String macOrderId, boolean validPayState);
//
//   boolean existOrderId(Long orderId, LocalDate orderDate);

   void existWaitPlaceOrder(Long custId, Integer sourceType);
//
   Integer getOrderCounterNum(LocalDate orderDate, Integer mealtimeType, Long counterId);
//
//   long existOrderUnTake(Long canteenId, Long stallId);
//
//   long existReserveOrderUnPrint(Long canteenId, Long stallId, Integer mealtimeType);
//
   String getMaxMealCodeOfDate(@NotNull LocalDate orderDate, Integer mealtimeType, Long canteenId, Long stallId);

   OrderInfo getById(Long id, LocalDate... orderDates);

   OrderInfo checkAndGetOrderInfo(Long orderId);

   OrderInfo checkAndGetOrderInfoByMacOrderId(String macOrderId);
//
//   OrderInfoVO getVoById(Long orderId, LocalDate... orderDate);
//
//   List<OrderInfo> listByOrderIds(Collection<Long> orderIds, Collection<LocalDate> orderDates);

   List<OrderIdDateVO> queryOrderId(OrderSearchParam param, OrderUserPermissionDTO permission);

//   List<OrderIdDateVO> queryDeliveryId(OrderDeliverySearchParam param, OrderUserPermissionDTO permission);
//
//   List<OrderIdDateVO> queryRefundId(OrderRefundSearchParam param, OrderUserPermissionDTO permission);
//
//   List<OrderInfoVO> listVoByParam(OrderSearchParamDTO paramDTO, OrderUserPermissionDTO permissionDTO, boolean fillDetailVO);
//
//   List<OrderInfoVO> listVoByOrderIds(List<Long> orderIds, List<LocalDate> orderDates);
//
   List<OrderInfo> getOrderInfoListByTradeId(Long tradeId);
//
//   List<OrderInfo> listOrderInfoByMacOrderId(String macOrderId, LocalDate... orderDates);

   List<OrderInfo> listCustOrder(Long custId, LocalDate beginDate, LocalDate endDate, List<Integer> mealTimeTypes, List<Integer> orderTypes);
//
   List<OrderInfo> getPlacedOrderInfoList(Long custId, LocalDate nowDate);
//
   void initOrderCustInfo(List<OrderInfo> orderInfoList, Long custId);
//
//   <T extends OrderInfoWithCustName> void fillOrderCustName(List<T> orderInfoList, boolean skipIfNameExists);
//
//   List<OrderListWebVO> queryOrderInfoWeb(List<Long> orderIds, List<LocalDate> orderDates);
//
//   List<OrderRefundWebVO> pageOrderRefundList(List<Long> orderRefundIds, List<LocalDate> orderDates);
//
//   List<OrderDetailSumGetVO> queryOrderDetailSumGet(List<Long> deliveryIds, List<LocalDate> orderDates);
//
//   List<OrderDeliveryDetailVO> queryOrderDeliveryDetailList(List<Long> deliveryIds, List<LocalDate> orderDates);

   List<OrderListMobileVO> getOrderMobileList(List<Long> orderIds, List<LocalDate> orderDates);

//   List<OrderGroupMobileVO> getOrderMobileGroup(OrderGroupMobileQueryDTO queryDTO);
//
//   List<OrderRefundListMobileVO> getOrderRefundMobileList(List<Long> orderIds, List<LocalDate> orderDates);
//
   OrderInfoMobileVO getOrderInfoMobileByOrderId(Long orderId);

   List<OrderListAndroidVO> listOrderForAndroid(List<Long> orderIds, List<LocalDate> orderDates);
//
//   boolean existRoomWaitPlacedOrder(Long roomId, LocalDate orderDate, Integer mealtimeType);
//
//   List<OrderInfo> listBasicRoomWaitPlacedOrder(List<Long> roomIds, LocalDate orderDate, Integer mealtimeType);
//
//   List<OrderListPadVO> listOrderForPad(List<Long> orderIds, List<LocalDate> orderDates);
//
//   Long getDinningOrderByRoom(Long roomId, Integer mealtimeType);
//
//   List<OrderAppListVO> listAppOrderDetail(List<Long> orderIds, List<LocalDate> orderDates);
//
//   OrderAppInfoVO getAppOrderInfo(Long orderId);
//
//   List<OrderAppRefundVO> listOrderAppRefundCheckList(List<Long> orderRefundIds, List<LocalDate> orderDates);
//
//   List<Long> queryOrderIdsByGoodsId(Long goodsDishesId, Long menuDetailId);
//
//   List<OrderInfoBackfieldVO> listOrderForBackfield(List<Long> orderIds, List<LocalDate> orderDates);
}
