package cn.pluss.platform.merchantOrder;

import cn.pluss.platform.entity.*;

import java.util.List;

/**
 * TODO
 * 商户订单分账接口类
 * @author crystal
 * @date 2022/7/1 11:45
 */
public interface BaseMercSplitService {

    /**
     * 分账登记
     * @param order
     * @param list
     * @param flag
     * @return
     */
    MerchantOrderSplit split(MerchantOrder order, List<MerchantSplitSetting> list,boolean flag);

    /**
     * 分账登记
     * @param order
     * @param detailList
     * @return
     */
    boolean split(MerchantOrderSplit order, List<MerchantOrderSplitDetail> detailList,MerchantChannelStatus channel);

    /**
     * 分账退款接口
     * @param refund
     * @return
     */
    boolean refund(MerchantOrderSplitRefund refund);

    /**
     * 一般消费户退款接口
     * @param refund
     * @return
     */
    boolean generalRefund(MerchantOrderSplitRefund refund);

    /**
     * 分账订单查询
     * @param order
     * @param detailList
     */
    List<MerchantOrderSplitDetail> splitQuery(MerchantOrderSplit order,List<MerchantOrderSplitDetail> detailList);

    /**
     * 分账退款查询
     * @param qRefund
     * @param srList
     * @return
     */
    List<MerchantOrderSplitDetail> refundQuery(MerchantOrderSplitRefund qRefund, List<MerchantOrderSplitDetail> srList);

    /**
     * 商户提现
     * @return
     */
    void withdraw(MerchantOrderSplit order, MerchantChannelStatus channel);
}
