package com.bonus.canteen.core.order.custom;

import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.common.custom.business.CustomBusiness;
import com.bonus.canteen.core.common.page.PageVO;
import com.bonus.canteen.core.customer.vo.CustPayVO;
import com.bonus.canteen.core.order.common.dto.OrderDetailPayDTO;
import com.bonus.canteen.core.order.common.model.OrderDelivery;
import com.bonus.canteen.core.order.common.model.OrderDetail;
import com.bonus.canteen.core.order.common.model.OrderInfo;
import com.bonus.canteen.core.order.custom.po.OrderCustomMobileCheckRepeatPO;
import com.bonus.canteen.core.order.custom.po.OrderCustomMobileCustInfoPO;
import com.bonus.canteen.core.order.mobile.dto.*;
import com.bonus.canteen.core.order.mobile.vo.*;
import com.bonus.canteen.core.order.mq.po.OrderSavePO;
import com.bonus.canteen.core.pay.api.dto.UnifyPayDTO;
import com.bonus.canteen.core.pay.api.vo.UnifyPaySelectVO;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

@Service
public class OrderCustomMobileBusiness implements CustomBusiness {
   @Override
   public String name() {
      return "订单（移动端）";
   }

   @Override
   public List<Version> versions() {
      return CollUtil.newArrayList(new Version[]{Version.of("3.7.0", "初版"), Version.of("3.11.4", "添加试算埋点")});
   }

   public CustPayVO didGetCustInfoV2(CustPayVO custInfo, OrderCustomMobileCustInfoPO param) {
      return custInfo;
   }

   public boolean willCheckOrderRepeated(OrderCustomMobileCheckRepeatPO param) {
      return true;
   }

   public void didCreatePay(UnifyPayDTO unifyPayDTO, Object requestParam) {
   }

   public <T extends OrderMobileParam> void didPackageOrderInfo(Object summitParam, List<T> orderMobileParamList, OrderSavePO orderSavePO) {
   }

   public boolean willOrderPlaceCheck(List<OrderInfo> orderInfoList, List<OrderDetail> orderDetailList, List<OrderDelivery> orderDeliveryList) {
      return true;
   }

   public OrderPayMobileVO willMobileOrderPay(OrderSavePO orderSavePO, boolean secondaryPay) {
      return null;
   }

   public OrderPayMobileVO didPayResultHandler(OrderSavePO orderSavePO, OrderPayMobileVO orderPayMobileVO) {
      return orderPayMobileVO;
   }

   public OrderPayMobileVO didTrialResultHandler(OrderSavePO orderSavePO, OrderPayMobileVO orderPayMobileVO) {
      return orderPayMobileVO;
   }

   public void didQueryOrderList(OrderListMobileDTO param, PageVO<OrderListMobileVO> pageVO) {
   }

   public OrderInfoMobileVO didQueryOrderInfo(OrderInfoMobileVO orderInfoMobileVO) {
      return orderInfoMobileVO;
   }

   public UnifyPaySelectVO willReSyncOrderPayResult(Long orderId) {
      return null;
   }

   public List<OrderShoppingCartListMobileVO> didListShoppingCartByCust(OrderShoppingSearchDTO searchDTO, List<OrderShoppingCartListMobileVO> resultList) {
      return resultList;
   }
//
   public OrderShoppingCartAddResultVO willAddShoppingCart(OrderShoppingCartAddDTO addDTO) {
      return null;
   }
//
   public OrderShoppingCartAddResultVO didAddShoppingCart(OrderShoppingCartAddDTO addDTO, OrderShoppingCartAddResultVO resultVO) {
      return resultVO;
   }
//
   public boolean willUpdateShoppingCart(OrderShoppingCartUpdateDTO updateDTO) {
      return true;
   }
//
   public void didUpdateShoppingCart(OrderShoppingCartUpdateDTO updateDTO) {
   }
//
   public boolean willClearShoppingCart(Collection<Long> shoppingCartIds) {
      return true;
   }
//
   public void didClearShoppingCart(Collection<Long> shoppingCartIds) {
   }

   public List<OrderDetailPayDTO> willFilterInvalidByCartIds(Integer orderType, Long custId, List<OrderDetailPayDTO> orderDetailPayDTOList) {
      return null;
   }

   public List<OrderDetailPayDTO> didFilterInvalidByCartIds(Integer orderType, Long custId, List<OrderDetailPayDTO> orderDetailPayDTOList, List<OrderDetailPayDTO> resultList) {
      return resultList;
   }
}
