package com.red.circle.wallet.app.command.auth;

import com.red.circle.wallet.app.dto.cmd.UserPayAuthCheckCmd;
import com.red.circle.wallet.infra.database.rds.service.auth.PayAuthService;
import java.util.Objects;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 支付密码设置/修改.
 *
 * @author zongpubin on 2023/11/30
 */
@Component
@AllArgsConstructor
public class PayPwdCheckCmdExe {

  private final PayAuthService payAuthService;

  public Boolean execute(UserPayAuthCheckCmd cmd) {
    return Objects.nonNull(payAuthService.getByPassword(cmd.getPwd(),
        cmd.requiredReqUserId()));

  }


}
