
package com.tmerclub.cloud.multishop.service;

import com.tmerclub.cloud.common.database.dto.PageDTO;
import com.tmerclub.cloud.common.database.vo.PageVO;
import com.tmerclub.cloud.multishop.dto.AllinpayShopWithdrawCashDTO;
import com.tmerclub.cloud.multishop.dto.ShopWithdrawCashConfigDto;
import com.tmerclub.cloud.multishop.dto.ShopWithdrawCashDTO;
import com.tmerclub.cloud.multishop.vo.ShopWithdrawCashVO;

/**
 * 商家提现申请信息
 *
 * @author tmerclub
 * @date 2021-01-07 16:41:03
 */
public interface ShopWithdrawCashService {

    /**
     * 根据店铺id提交提现申请
     * @param shopWithdrawCashDTO
     * @param shopId
     */
    void apply(ShopWithdrawCashDTO shopWithdrawCashDTO, Long shopId);

    /**
     * 通联店铺提现
     * @param shopWithdrawCashDTO
     * @param shopId
     * @return
     */
    String allinpayApply(AllinpayShopWithdrawCashDTO shopWithdrawCashDTO, Long shopId);

    /**
     * 确认支付提现订单
     * @param shopWithdrawCashDTO
     * @param shopId
     */
    void confirmWithdrawPay(AllinpayShopWithdrawCashDTO shopWithdrawCashDTO, 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 shopWithdrawCashDTO
     * @return
     */
    PageVO<ShopWithdrawCashVO> pageByParam(PageDTO pageDTO, ShopWithdrawCashDTO shopWithdrawCashDTO);

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

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

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

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

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