package com.red.circle.wallet.app.service;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.framework.core.dto.CommonCommand;
import com.red.circle.other.inner.model.dto.user.SysExchangeGoldTipDTO;
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
import com.red.circle.wallet.app.command.bank.*;
import com.red.circle.wallet.app.command.bank.query.UserBankCheckExchangeGoldQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankCheckTransferQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankCheckWithdrawQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankBalanceQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankExchangeGoldTipQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankSearchUserProfileQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankWaterQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankWithdrawalServiceChargeQryExe;
import com.red.circle.wallet.app.command.bank.query.UserBankWithdrawalWaysQryExe;
import com.red.circle.wallet.app.dto.clientobject.UserBankCheckExchangeGoldCO;
import com.red.circle.wallet.app.dto.clientobject.UserBankCheckTransferCO;
import com.red.circle.wallet.app.dto.clientobject.UserBankCheckWithdrawCO;
import com.red.circle.wallet.app.dto.clientobject.UserBankExchangeGoldResultCO;
import com.red.circle.wallet.app.dto.clientobject.UserBankWaterCO;
import com.red.circle.wallet.app.dto.clientobject.UserBankWithdrawResultCO;
import com.red.circle.wallet.app.dto.cmd.UserBankExchangeGoldCmd;
import com.red.circle.wallet.app.dto.cmd.UserBankSearchUserProfileCmd;
import com.red.circle.wallet.app.dto.cmd.UserBankWithdrawCmd;
import com.red.circle.wallet.app.dto.cmd.UserBankWithdrawTransferCmd;
import java.math.BigDecimal;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 用户银行账户服务 服务.
 *
 * @author pengliang on 2023/2/20
 */
@Service
@RequiredArgsConstructor
public class UserBankServiceImpl implements UserBankService {

  private final UserBankWaterQryExe userBankWaterQryExe;
  private final UserBankBalanceQryExe userBankBalanceQryExe;
  private final UserBankWithdrawCmdExe userBankWithdrawCmdExe;
  private final UserBankDiamondWithdrawCmdExe userBankDiamondWithdrawCmdExe;
  private final UserBankExchangeGoldCmdExe userBankExchangeGoldCmdExe;
  private final UserBankCheckTransferQryExe userBankCheckTransferQryExe;
  private final UserBankWithdrawalWaysQryExe userBankWithdrawalWaysQryExe;
  private final UserBankCheckWithdrawQryExe userBankCheckWithdrawQueryExe;
  private final UserBankExchangeGoldTipQryExe userBankExchangeGoldTipQryExe;
  private final UserBankWithdrawTransferCmdExe userBankWithdrawTransferCmdExe;
  private final UserBankTransferGoldCmdExe userBankTransferGoldCmdExe;
  private final UserBankDiamondWithdrawTransferCmdExe userBankDiamondWithdrawTransferCmdExe;
  private final UserBankSearchUserProfileQryExe userBankSearchUserProfileQryExe;
  private final UserBankCheckExchangeGoldQryExe userBankCheckExchangeGoldQryExe;
  private final UserBankWithdrawalServiceChargeQryExe userBankWithdrawalServiceChargeQryExe;

  @Override
  public BigDecimal getBalance(AppExtCommand cmd) {
    return userBankBalanceQryExe.execute(cmd);
  }

  @Override
  public List<UserBankWaterCO> listDetails(AppExtCommand cmd) {
    return userBankWaterQryExe.execute(cmd);
  }

  @Override
  public UserBankExchangeGoldResultCO exchangeGold(UserBankExchangeGoldCmd cmd) {
    return userBankExchangeGoldCmdExe.execute(cmd);
  }

  @Override
  public UserBankWithdrawResultCO withdraw(UserBankWithdrawCmd cmd) {
    return userBankWithdrawCmdExe.execute(cmd);
  }

  @Override
  public UserBankWithdrawResultCO diamondWithdraw(UserBankWithdrawCmd cmd) {
    return userBankDiamondWithdrawCmdExe.execute(cmd);
  }

  @Override
  public UserBankWithdrawResultCO transfer(UserBankWithdrawTransferCmd cmd) {
    return userBankWithdrawTransferCmdExe.execute(cmd);
  }

  @Override
  public UserBankWithdrawResultCO transferGold(UserBankWithdrawTransferCmd cmd) {
    return userBankTransferGoldCmdExe.execute(cmd);
  }

  @Override
  public UserBankWithdrawResultCO diamondTransfer(UserBankWithdrawTransferCmd cmd) {
    return userBankDiamondWithdrawTransferCmdExe.execute(cmd);
  }

  @Override
  public UserBankCheckWithdrawCO checkWithdraw(AppExtCommand cmd) {
    return userBankCheckWithdrawQueryExe.execute(cmd);
  }

  @Override
  public UserBankCheckExchangeGoldCO checkExchangeGold(CommonCommand cmd) {
    return userBankCheckExchangeGoldQryExe.execute(cmd);
  }

  @Override
  public UserBankCheckTransferCO checkTransfer(AppExtCommand cmd) {
    return userBankCheckTransferQryExe.execute(cmd);
  }

  @Override
  public UserProfileDTO searchUserProfile(UserBankSearchUserProfileCmd cmd) {
    return userBankSearchUserProfileQryExe.execute(cmd);
  }

  @Override
  public List<SysExchangeGoldTipDTO> listRegionExchangeGoldTip(AppExtCommand cmd) {
    return userBankExchangeGoldTipQryExe.execute(cmd);
  }

  @Override
  public List<SysExchangeGoldTipDTO> listRegionExchangeDiamondGoldTip(AppExtCommand cmd) {
    return userBankExchangeGoldTipQryExe.executeDiamond(cmd);
  }

  @Override
  public List<SysExchangeGoldTipDTO> listRegionWithdrawTip(AppExtCommand cmd) {
    return userBankExchangeGoldTipQryExe.executeWithdraw(cmd);
  }

  @Override
  public List<String> withdrawalWays(AppExtCommand cmd) {
    return userBankWithdrawalWaysQryExe.execute(cmd);
  }

  @Override
  public Long serviceCharge(AppExtCommand cmd) {
    return userBankWithdrawalServiceChargeQryExe.execute(cmd);
  }


}
