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

import com.bonus.canteen.core.pay.common.model.TradeChannel;
import com.bonus.canteen.core.pay.common.vo.TradeChannelVO;
import com.fasterxml.jackson.databind.JsonNode;

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

public interface TradeChannelService {
   void insert(TradeChannel tradeChannel);

   void updateTradeRecordChannelState(Long channelId, Integer tradeState, String tradeResult, String outTradeNo, BigDecimal realAmount, JsonNode param, LocalDateTime tradeTime);

   List<TradeChannelVO> listChannelDetailByTradeId(Long tradeId);

   List<TradeChannelVO> listChannelDetailByTradeIds(List<Long> tradeId);

   TradeChannel getByTradeChannelId(Long tradeChannelId);

   void updateTradeIdForRepair(Long channelId, Long newTradeId);

   void updateRefundAmount(Long channelId, BigDecimal amount);
}
