package com.crm.ucard.service;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.wasabi.WasabiThird3dsTransactionDto;
import com.crm.rely.backend.core.entity.system.email.SysEmailSendEntity;
import com.crm.rely.backend.core.entity.ucard.CardQueryCvvVerifyEmailCodeEntity;
import com.crm.rely.backend.core.entity.ucard.CardSendEmailCodeEntity;
import com.crm.rely.backend.core.entity.ucard.CardVerifyGoogleCodeEntity;
import com.crm.rely.backend.core.pojo.table.ucard.*;
import com.crm.rely.backend.exception.ServiceException;

import java.math.BigDecimal;
import java.util.Date;

public interface UcardEmailService {

    /**
     * 查询cvv发送验证码邮件
     */
    SysEmailSendEntity createQueryCvvSendEmailCodeSysEmailEntity(CardSendEmailCodeEntity entity);
    /**
     * 用户信息审核成功发送邮件
     */
    void sendUserInfoReviewSuccessEmail(CardMerchantUserTable userTable) throws ServiceException;
    /**
     * 用户信息审核失败发送邮件
     */
    void sendUserInfoReviewFailEmail(CardMerchantUserTable userTable, Long reason) throws ServiceException;
    /**
     * 开卡申请发送邮件通知审核人员审核
     */
    void sendApplyCardReviewEmail(CardApplyTable applyTable) throws Exception;
    /**
     * 开卡成功发送邮件
     */
    void sendOpenCardSuccessEmail(UcardCardTable cardTable) throws Exception;
    /**
     * 开卡审批失败发送邮件
     */
    void sendOpenCardApprovalFailEmail(CardMerchantUserTable userTable, Long reason) throws ServiceException;
    /**
     * 激活成功发送邮件
     */
    void sendActivateCardSuccessEmail(UcardCardTable cardTable) throws ServiceException;
    /**
     * 充值申请给财务发邮件
     */
    void sendRechargeReviewEmail(CardMerchantUserTable userTable, String cardNumber, BigDecimal amount,
                                 BigDecimal fee, Date applyTime) throws Exception;
    /**
     * 充值成功发送邮件
     */
    void sendCardRechargeSuccessEmail(CardMerchantUserTable userTable,
                                      CardRechargeOrderTable orderTable) throws ServiceException;
    /**
     * 充值审核失败发送邮件
     */
    void sendCardRechargeReviewFailEmail(CardMerchantUserTable userTable,
                                         CardRechargeOrderTable orderTable,
                                         Long reason) throws ServiceException;
    /**
     * 修改密码成功发送邮件
     */
    void sendCardUpdatePasswordSuccessEmail(CardMerchantUserTable userTable, String cardNumber) throws ServiceException;
    /**
     * 用户上传证件照片邮件
     */
    void sendUserUploadPhotoEmail(CardMerchantUserTable userTable) throws ServiceException;
    /**
     * 激活码通知邮件
     */
    void sendUserActivationCodeEmail(CardMerchantUserTable userTable, String cardNumber,
                                     String activationCode) throws ServiceException;
    /**
     * 3ds通知邮件
     */
    void sendUser3dsEmail(CardMerchantUserTable userTable, String cardNumber, String activationCode,
                          WasabiThird3dsTransactionDto dto) throws ServiceException;
    /**
     * 交易授权url通知邮件
     */
    void sendUserAuthUrlEmail(CardMerchantUserTable userTable, String cardNumber, String activationCode,
                              WasabiThird3dsTransactionDto dto) throws ServiceException;
    /**
     * 速汇订单审核邮件
     */
    void sendGlobalOrderReviewEmail(CardMerchantUserTable userTable, CardGlobalOrderTable orderTable) throws Exception;
    /**
     * 速汇订单审核失败发送邮件
     */
    void sendGlobalOrderReviewFailEmail(CardMerchantUserTable userTable, Long reason,
                                        CardGlobalOrderTable orderTable) throws ServiceException;
    /**
     * 速汇订单补充资料发送邮件
     */
    void sendGlobalOrderSupplementaryDataEmail(CardMerchantUserTable userTable,
                                               CardGlobalOrderTable orderTable) throws ServiceException;
    /**
     * 速汇订单取消订单发送邮件
     */
    void sendGlobalOrderCancelEmail(CardMerchantUserTable userTable, CardGlobalOrderTable orderTable) throws ServiceException;
    /**
     * 速汇订单交易失败发送邮件
     */
    void sendGlobalOrderTransactionFailEmail(CardMerchantUserTable userTable,
                                             CardGlobalOrderTable orderTable) throws ServiceException;
    /**
     * 速汇订单交易成功发送邮件
     */
    void sendGlobalOrderTransactionSuccessEmail(CardMerchantUserTable userTable,
                                                CardGlobalOrderTable orderTable) throws ServiceException;
    /**
     * 加密钱包回调成功给客户发送邮件
     */
    void sendEncryptedWalletSuccessEmail(UcardVaultodyCallbackRecordTable table) throws ServiceException;
    /**
     * 校验谷歌验证码查询cvv码
     */
    BaseResultDto cardQueryCvv(CardVerifyGoogleCodeEntity entity) throws ServiceException;
    /**
     * 根据环境校验
     */
    void validateGoogleAuthenticatorCode(CardVerifyGoogleCodeEntity entity) throws ServiceException;
    /**
     * 查询CVV发送验证码
     */
    void queryCvvSendCode(CardSendEmailCodeEntity entity) throws ServiceException;
    /**
     * 验证邮箱验证码查询cvv
     */
    BaseResultDto queryCvvVerifyCode(CardQueryCvvVerifyEmailCodeEntity entity) throws ServiceException;

    void existByEmail(String email) throws ServiceException;

    /**
     * 钱包提款发送验证码
     */
    void sendEmailCode(CardSendEmailCodeEntity entity) throws ServiceException;

    /**
     * 钱包充值成功邮件
     */
    void sendWalletRechargeSuccessEmail(UcardWalletRecordTable recordTable, CardMerchantUserTable userTable) throws ServiceException;

    /**
     * 钱包提现成功邮件
     */
    void sendWalletWithdrawalSuccessEmail(BigDecimal amount, BigDecimal fee, Date addTime, String uniqueId) throws ServiceException;

    /**
     * 钱包提现失败邮件
     */
    void sendWalletWithdrawalFailedEmail(UcardWalletWithdrawTable table) throws ServiceException;

    /**
     * 钱包提现申请给财务发邮件
     */
    void sendWalletWithdrawalReviewEmail(UcardWalletWithdrawTable withdrawTable) throws Exception;

    /**
     * 审核失败发送邮件
     */
    void sendWalletWithdrawalReviewFailEmail(UcardWalletWithdrawTable withdrawTable, Long reason) throws ServiceException;

}
