package com.crm.pay.service;

import com.crm.pay.dto.finance.withdraw.automatic.FinanceWithdrawCwgDto;
import com.crm.pay.entity.finance.withdraw.automatic.FinanceWithdrawCwgEntity;
import com.crm.pay.entity.finance.withdraw.automatic.FinanceWithdrawInfoEntity;
import com.crm.rely.backend.model.entity.finance.deposit.FinanceDepositAddEntity;
import com.crm.rely.backend.model.entity.finance.deposit.FinanceMerchantDepositAddEntity;

import java.util.Map;

/**
 * @program:
 * @description:
 * @author: houn
 * @create: 2022-07-13 10:44
 */
public interface CwgPayService {

    /**
     * 支付
     *
     * @param balanceSaveEntity
     * @return
     * @throws ServiceException
     */
    String pay(FinanceDepositAddEntity balanceSaveEntity) throws Exception;

    String pay(FinanceMerchantDepositAddEntity balanceSaveEntity) throws Exception;

    /**
     * 回调
     *
     * @param callbackEntity
     * @throws ServiceException
     */
    void callback(Map<String, String> callbackEntity) throws Exception;

    void callback(Map<String, String> callbackEntity, String payType) throws Exception;


    FinanceWithdrawCwgDto withdrawInfo(FinanceWithdrawInfoEntity entity) throws Exception;

    String withdraw(FinanceWithdrawCwgEntity entity) throws Exception;

    void withdrawCallback(Integer withdrawType, Map<String, String> callbackEntity) throws Exception;
}
