package com.jsowell.pile.service;

import com.jsowell.adapay.vo.PaymentInfo;
import com.jsowell.pile.domain.OrderPayRecord;
import com.jsowell.pile.vo.web.OrderDetailInfoVO;

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

public interface OrderPayRecordService{


    int insertSelective(OrderPayRecord record);

    OrderPayRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OrderPayRecord record);

    int updateBatch(List<OrderPayRecord> list);

    int insertOrUpdate(OrderPayRecord record);

    int insertOrUpdateSelective(OrderPayRecord record);

    /**
     * 批量保存订单支付记录
     * @param payRecordList
     * @return
     */
    int batchInsert(List<OrderPayRecord> payRecordList);

    List<OrderPayRecord> getOrderPayRecordList(String orderCode);

    List<PaymentInfo> queryPaymentInfosByOrderCode(String orderCode);

    List<OrderDetailInfoVO.PayRecord> selectOrderPayInfoList(String orderCode);

    List<PaymentInfo> parseDeductionRecord(String deductionRecord);

    List<String> parsePaymentIdByDeductionRecord(String deductionRecord);

    // 更新订单退款金额
    void updateRefundAmount(String orderCode, String paymentId, BigDecimal refundAmt);
}
