SmsCodeController.java
2.23 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.zhongzhi.controller;
import com.zhongzhi.common.constant.Platform;
import com.zhongzhi.common.utils.LoginRequired;
import com.zhongzhi.common.utils.ResponseData;
import com.zhongzhi.model.AdministerDO;
import com.zhongzhi.model.SmsCodeDO;
import com.zhongzhi.service.SmsCodeService;
import com.zhongzhi.vo.ResponseVO;
import io.swagger.annotations.Api;
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;
/**
* <p>
* 短信验证码 前端控制器
* </p>
*
* @author DengMin
* @since 2021-04-28
*/
@RestController
@Api(tags = "短信验证码")
@RequestMapping("/smsCode")
public class SmsCodeController {
@Autowired
private SmsCodeService smsCodeService;
@PostMapping(value = "/sendRegisterCode")
@ApiOperation("学生端 ---注册验证码:telephone/手机号")
public ResponseVO sendRegisterCode(@RequestBody SmsCodeDO smsCodeDO) {
smsCodeService.sendRegisterCode(smsCodeDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "/sendStudentLoginCode")
@ApiOperation("学生端 ---登陆验证码:telephone/手机号")
public ResponseVO sendStudentLoginCode(@RequestBody SmsCodeDO smsCodeDO) {
smsCodeService.sendStudentLoginCode(smsCodeDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "/sendAdministerLoginCode")
@ApiOperation("中心端 --- 中心端登陆验证码:telephone/手机号")
public ResponseVO sendAdministerLoginCode(@RequestBody AdministerDO administerDO) {
smsCodeService.sendAdministerLoginCode(administerDO);
return ResponseData.generateCreatedResponse(0);
}
@PostMapping(value = "/sendJudgeLoginCode")
@ApiOperation("评审端 ---登陆验证码:telephone/手机号")
public ResponseVO sendJudgeLoginCode(@RequestBody SmsCodeDO smsCodeDO) {
smsCodeService.sendJudgeLoginCode(smsCodeDO);
return ResponseData.generateCreatedResponse(0);
}
}