package com.hfkj.openapi.v1.service;

import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.BsTradeOrderRefund;
import com.hfkj.openapi.v1.model.TradeRefundBillsModel;
import com.hfkj.openapi.v1.model.request.RequestRefundTradeModel;
import com.hfkj.openapi.v1.model.response.ResponseRefundTradeModel;
import com.hfkj.openapi.v1.model.TradeBillsModel;
import com.hfkj.openapi.v1.model.TradeDetailBillsModel;

import java.util.List;
import java.util.Map;

/**
 * @className: TradeOrder
 * @author: HuRui
 * @date: 2023/5/24
 **/
public interface OpenApiTradeOrderService {

    /**
     * 创建订单
     * @return
     */
    Map<String, Object> createOrder(BsTradeOrder tradeOrder) throws Exception;

    /**
     * 根据交易流水查询订单
     * @param outTradeNo
     * @return
     */
    BsTradeOrder getOrderByOutTradeNo(String outTradeNo);

    /**
     * 退款接口
     * @param refundTrade
     * @return
     */
    ResponseRefundTradeModel refund(RequestRefundTradeModel refundTrade) throws Exception;

    /**
     * 根据退款单号查询退款信息
     * @param refundNo
     * @return
     */
    BsTradeOrderRefund getRefundByNo(String refundNo);

    /**
     * 交易账单
     * @param merNo
     * @param billDateS
     * @param billDateE
     * @return
     */
    List<TradeBillsModel> tradeBills(String merNo, Long billDateS, Long billDateE);

    /**
     * 交易退款账单
     * @param merNo
     * @param billDateS
     * @param billDateE
     * @return
     */
    List<TradeRefundBillsModel> tradeRefundBills(String merNo, Long billDateS, Long billDateE);

    /**
     * 交易结算明细
     * @param merNo
     * @param billDateS
     * @param billDateE
     * @return
     */
    List<TradeDetailBillsModel> tradeSettleBills(String merNo, Long billDateS, Long billDateE);
}
