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

import com.red.circle.other.app.command.user.CheckRegisterSmsCmdExe;
import com.red.circle.other.app.command.user.SendRegisterSmsCmdExe;
import com.red.circle.other.app.dto.cmd.user.sms.SendSmsRegisterCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 注册短信相关 实现.
 *
 * @author pengliang on 2023/8/14
 */
@Service
@RequiredArgsConstructor
public class RegisterSmsServiceImpl implements RegisterSmsService {

  private final SendRegisterSmsCmdExe sendRegisterSmsCmdExe;
  private final CheckRegisterSmsCmdExe checkRegisterSmsCmdExe;

  @Override
  public void sendCode(SendSmsRegisterCmd cmd) {
    sendRegisterSmsCmdExe.execute(cmd);
  }


  @Override
  public boolean checkCode(SendSmsRegisterCmd cmd) {
    return checkRegisterSmsCmdExe.execute(cmd);
  }

}
