package com.lideeyunji.service.system.api;

import com.lideeyunji.service.system.dto.SmsCodeValidateReqDTO;
import com.lideeyunji.service.system.dto.SmsCodeSendReqDTO;
import com.lideeyunji.service.system.dto.SmsCodeUseReqDTO;
import com.lideeyunji.service.system.service.ISmsCodeService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

/**
 * 短信验证码 API 实现类
 *
 * @author 金灯剑客
 */
@Service
@Validated
public class ApiSmsCodeApiImpl implements IApiSmsCodeApi {

    @Resource
    private ISmsCodeService 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);
    }

}
