main
parent
02b803730c
commit
6f591815c8
|
|
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author byw
|
||||
|
|
@ -16,5 +17,6 @@ public class CodeArg {
|
|||
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
private String mobile;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ public class LoginController {
|
|||
@NotLogin
|
||||
@ApiOperation("获取验证码")
|
||||
@PostMapping("/code")
|
||||
public AjaxResult<String> code(@RequestBody CodeArg arg){
|
||||
public AjaxResult<String> code(@RequestBody @Validated CodeArg arg){
|
||||
return iLoginService.code(arg.getMobile());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ like:
|
|||
# 是否开启swagger
|
||||
enabled: true
|
||||
# 请求前缀
|
||||
pathMapping: /dev-api
|
||||
pathMapping: /
|
||||
|
||||
# 服务配置
|
||||
server:
|
||||
|
|
|
|||
Loading…
Reference in New Issue