SmsVerifyCodeController.java 1.19 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.sms.SendVerifyCodeDTO;
import com.subsidy.service.SmsVerifyCodeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 短信验证码记录表 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2021-10-14
 */
@RestController
@Api(tags = "短信验证码记录表")
@RequestMapping("/smsVerify")
public class SmsVerifyCodeController {

    @Autowired
    private SmsVerifyCodeService smsVerifyCodeService;

    @PostMapping(value = "/send")
    @ApiOperation("发送短信验证码  {telephone} ")
    public ResponseVO sendVerifyCode(@RequestBody SendVerifyCodeDTO sendVerifyCodeDTO ) {
        smsVerifyCodeService.sendVerifyCode(sendVerifyCodeDTO);
        return ResponseData.generateCreatedResponse(0);
    }

}