package com.red.circle.other.app.service.user.user;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.other.app.command.user.UserBankIdentityCmdExe;
import com.red.circle.other.app.command.user.query.UserBankIdentityExistsPassQryExe;
import com.red.circle.other.app.command.user.query.UserBankIdentityLatestQryExe;
import com.red.circle.other.app.dto.clientobject.user.user.BankIdentityInfoCO;
import com.red.circle.other.app.dto.cmd.user.user.BankIdentityInfoCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author pengliang on 2023/6/15
 */
@Service
@RequiredArgsConstructor
public class UserBankIdentityServiceImpl implements UserBankIdentityService {

  private final UserBankIdentityCmdExe userBankIdentityCmdExe;
  private final UserBankIdentityLatestQryExe userBankIdentityLatestQryExe;
  private final UserBankIdentityExistsPassQryExe userBankIdentityExistsPassQryExe;

  @Override
  public void submit(BankIdentityInfoCmd cmd) {
    userBankIdentityCmdExe.execute(cmd);
  }

  @Override
  public BankIdentityInfoCO getLatestSubmit(AppExtCommand cmd) {
    return userBankIdentityLatestQryExe.execute(cmd);
  }

  @Override
  public Boolean existsPassSubmit(AppExtCommand cmd) {
    return userBankIdentityExistsPassQryExe.execute(cmd);
  }

}
