package com.cico.nest.lcdp.boot.core.system.api.sms;

import com.cico.nest.lcdp.boot.core.system.service.sms.SmsCodeService;
import com.cico.nest.lcdp.boot.api.system.sms.SmsCodeApi;
import com.cico.nest.lcdp.boot.api.system.sms.dto.code.SmsCodeSendReqDTO;
import com.cico.nest.lcdp.boot.api.system.sms.dto.code.SmsCodeUseReqDTO;
import com.cico.nest.lcdp.boot.api.system.sms.dto.code.SmsCodeValidateReqDTO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;


/**
 * 短信验证码 API 实现类
 *
 * @author zws
 */
@Service
@Validated
public class SmsCodeApiImpl implements SmsCodeApi {

    @Resource
    private SmsCodeService smsCodeService;

    @Override
    public void sendSmsCode(SmsCodeSendReqDTO reqDTO) {
        smsCodeService.sendSmsCode(reqDTO);
    }

    @Override
    public void useSmsCode(SmsCodeUseReqDTO reqDTO) {
        smsCodeService.useSmsCode(reqDTO);
    }

    @Override
    public void validateSmsCode(SmsCodeValidateReqDTO reqDTO) {
        smsCodeService.validateSmsCode(reqDTO);
    }

}
