libo 4 年之前
父节点
当前提交
0dab42f5d3

+ 5 - 5
src/main/java/com/tdba/cxb/ares/api/model/OperatorLoginReq.java

@@ -12,18 +12,18 @@ public class OperatorLoginReq {
12
 
12
 
13
     /** 手机号*/
13
     /** 手机号*/
14
     @NotEmpty(message = "手机号不能为空")
14
     @NotEmpty(message = "手机号不能为空")
15
-    private String mobile;
15
+    private String phone;
16
 
16
 
17
     /** 验证码*/
17
     /** 验证码*/
18
     @NotEmpty(message = "验证码不能为空")
18
     @NotEmpty(message = "验证码不能为空")
19
     private String code;
19
     private String code;
20
 
20
 
21
-    public String getMobile() {
22
-        return mobile;
21
+    public String getPhone() {
22
+        return phone;
23
     }
23
     }
24
 
24
 
25
-    public void setMobile(String mobile) {
26
-        this.mobile = mobile;
25
+    public void setPhone(String phone) {
26
+        this.phone = phone;
27
     }
27
     }
28
 
28
 
29
     public String getCode() {
29
     public String getCode() {

+ 1 - 1
src/main/java/com/tdba/cxb/ares/api/model/TDBAResponseBuilder.java

@@ -34,7 +34,7 @@ public class TDBAResponseBuilder {
34
      * @return
34
      * @return
35
      */
35
      */
36
     public static TDBAResponse buildError(Object data, String message) {
36
     public static TDBAResponse buildError(Object data, String message) {
37
-        return build(data, message, "1");
37
+        return build(data, message, "400");
38
     }
38
     }
39
 
39
 
40
 
40
 

+ 3 - 3
src/main/java/com/tdba/cxb/ares/api/service/UserService.java

@@ -326,12 +326,12 @@ public class UserService {
326
      * @return
326
      * @return
327
      */
327
      */
328
     public UserLoginResp login(OperatorLoginReq param){
328
     public UserLoginResp login(OperatorLoginReq param){
329
-        if(!param.getCode().equals("" + redisTemplate.opsForValue().get("api.auth.sms." + param.getMobile()))){
329
+        if(!param.getCode().equals("" + redisTemplate.opsForValue().get("api.auth.sms." + param.getPhone()))){
330
             throw new TDBAException("短信验证码有误");
330
             throw new TDBAException("短信验证码有误");
331
         }
331
         }
332
-        redisTemplate.delete("api.auth.sms." + param.getMobile());
332
+        redisTemplate.delete("api.auth.sms." + param.getPhone());
333
 
333
 
334
-        UserVo userVo = userMapper.selectByAccount(param.getMobile());
334
+        UserVo userVo = userMapper.selectByAccount(param.getPhone());
335
         Objects.requireNonNull(userVo, "用户信息不存在");
335
         Objects.requireNonNull(userVo, "用户信息不存在");
336
 
336
 
337
         return UserLoginResp.UserLoginRespBuilder.anUserLoginResp()
337
         return UserLoginResp.UserLoginRespBuilder.anUserLoginResp()