
package com.tmerclub.cloud.supplier.service;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.supplier.dto.AllinpaySupplierWithdrawCashDTO;
import com.tmerclub.cloud.supplier.dto.SupplierWithdrawCashConfigDto;
import com.tmerclub.cloud.supplier.dto.SupplierWithdrawCashDTO;
import com.tmerclub.cloud.supplier.vo.SupplierWithdrawCashVO;

/**
 * 供应商提现申请信息
 *
 * @author lhd
 * @date 2022-03-14 17:04:32
 */
public interface SupplierWithdrawCashService {

    /**
     * 根据供应商id提交提现申请
     * @param supplierWithdrawCashDTO
     * @param supplierId
     */
    void apply(SupplierWithdrawCashDTO supplierWithdrawCashDTO, Long supplierId);

    /**
     * 通联供应商提现
     * @param supplierWithdrawCashDTO
     * @param shopId
     * @return
     */
    String allinpayApply(AllinpaySupplierWithdrawCashDTO supplierWithdrawCashDTO, Long shopId);

    /**
     * 确认支付提现订单
     * @param supplierWithdrawCashDTO
     * @param shopId
     */
    void confirmWithdrawPay(AllinpaySupplierWithdrawCashDTO supplierWithdrawCashDTO, Long shopId);

    /**
     * 重新发送验证码
     * @param bizOrderNo
     * @param shopId
     */
    void resendPaySms(String bizOrderNo, Long shopId);

    /**
     * 提现回调
     * @param bizOrderNo
     * @param payStatus
     * @param bizUserId
     * @param payFailMessage
     */
    void withdrawBack(String bizOrderNo, String payStatus, String bizUserId, String payFailMessage);

    /**
     * 根据参数分页获取商家提现记录信息
     * @param pageDTO
     * @param supplierWithdrawCashDTO
     * @return
     */
    PageVO<SupplierWithdrawCashVO> pageByParam(PageDTO pageDTO, SupplierWithdrawCashDTO supplierWithdrawCashDTO);

    /**
     * 根据id获取提现申请详情信息
     * @param cashId
     * @return
     */
    SupplierWithdrawCashVO getDetailByCashId(Long cashId);

    /**
     * 审核商家提现信息
     * @param supplierWithdrawCashDTO
     * @param userId
     */
    void auditWithdrawCash(SupplierWithdrawCashDTO supplierWithdrawCashDTO, Long userId);

    /**
     * 保存提现配置
     * @param shopWithdrawCashDto
     */
    void saveConfig(SupplierWithdrawCashConfigDto shopWithdrawCashDto);

    /**
     * 获取提现配置
     * @return
     */
    SupplierWithdrawCashConfigDto getConfig();

    /**
     * 检查提现金额
     * @param amount
     */
    void checkDrawCashAmount(Long amount);
}
