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

import com.bonus.canteen.core.pay.api.vo.UnifyPayVO;
import com.bonus.canteen.core.pay.api.vo.UnifyRefundVO;
import com.bonus.canteen.core.pay.common.model.TradeOrderRecharge;
import com.bonus.canteen.core.pay.common.model.TradeRecord;
import org.apache.ibatis.annotations.Param;

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

public interface TradeRecordService {

   void insertTrade(TradeRecord tradeRecord, List<TradeOrderRecharge> tradeOrderRechargeList);

   void updateTradeRecordState(Long tradeId, UnifyPayVO payVO);

   void updateTradeRecordState(Long tradeId, Integer tradeState, String tradeResult);

   void updateTradeRecordState(Long tradeId, UnifyRefundVO refundVO);

   TradeRecord getTradeRecordById(Long tradeId);

   List<TradeOrderRecharge> queryOrderRechargeTrade(Long tradeId);

   List<TradeOrderRecharge> listSuccessByOrderIds(List<Long> orderIds);

   TradeRecord getTradeRecordByOrderRechargeId(Long orderRechargeId, Integer... tradeState);

   void insertTradeRecord(TradeRecord tradeRecord);

   void insertOrderRechargeTrade(List<TradeOrderRecharge> tradeOrderRechargeList);

   void deleteOrderRechargeTrade(Long tradeId);

   List<TradeRecord> queryTradeRecordInfoList(String macOrderId, Long orderRechargeId, Integer tradeState, Integer tradeType);
   List<TradeRecord> listTradeRecordByOrderRechargeId(@Param("orderRechargeId") Long orderRechargeId, @Param("tradeState") Integer... tradeState);

}
