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.order.common.dto.OrderSearchParam;
import com.bonus.canteen.core.order.common.model.OrderInfo;
import com.bonus.canteen.core.order.common.model.OrderRefund;
import com.bonus.canteen.core.order.deprecated.dto.OrderDetailSumGetDTO;
import com.bonus.canteen.core.order.deprecated.vo.OrderDetailSumGetVO;
import com.bonus.canteen.core.order.web.dto.OrderDeliveryDetailDTO;
import com.bonus.canteen.core.order.web.dto.OrderDetailWebDTO;
import com.bonus.canteen.core.order.web.dto.OrderRefundWebDTO;
import com.bonus.canteen.core.order.web.vo.OrderDeliveryDetailVO;
import com.bonus.canteen.core.order.web.vo.OrderListWebVO;
import com.bonus.canteen.core.order.web.vo.OrderRefundWebVO;
import com.bonus.canteen.core.pay.api.vo.UnifyPaySelectVO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderCustomWebBusiness implements CustomBusiness {
   public String name() {
      return "订单（退款/取消）";
   }

   public List<CustomBusiness.Version> versions() {
      return CollUtil.newArrayList(new CustomBusiness.Version[]{CustomBusiness.Version.of("3.7.0", "初版"), CustomBusiness.Version.of("3.7.3", "添加导出定制埋点")});
   }

   public boolean willWriteOff(OrderInfo orderInfo) {
      return true;
   }

   public void didWriteOff(OrderInfo orderInfo, Integer originalDishesState) {
   }

   public OrderSearchParam beforeQueryOrderId(OrderDetailWebDTO param, OrderSearchParam searchParam) {
      return searchParam;
   }

   public void didQueryOrderInfoWebByPage(OrderDetailWebDTO param, PageVO<OrderListWebVO> pageVO) {
   }

   public boolean willExportOrderInfoWebByPageV2(OrderDetailWebDTO orderDetailDTO) {
      return true;
   }

   public void didQueryOrderDeliveryDetailByPage(OrderDeliveryDetailDTO param, PageVO<OrderDeliveryDetailVO> pageVO) {
   }

   public boolean willExportOrderDeliveryDetailByPageV2(OrderDeliveryDetailDTO param) {
      return true;
   }

   public void didQueryOrderDetailSumGet(OrderDetailSumGetDTO param, PageVO<OrderDetailSumGetVO> pageVO) {
   }

   public boolean willExportOrderDetailSumGetV2(OrderDetailSumGetDTO param) {
      return true;
   }

   public void didQueryRefundPage(OrderRefundWebDTO param, PageVO<OrderRefundWebVO> pageVO) {
   }

   public boolean willExportRefundPageV2(OrderRefundWebDTO param) {
      return true;
   }

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

   public OrderRefund willReSyncOrderRefundResult(Long orderRefundId) {
      return null;
   }
}
