Blame view

SmsVerifyCodeController.java 1.19 KB
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
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);
    }

}