Commit 2e43936e6fb9d97bebec5f7b147cc46e4eb92db4

Authored by changpengfei
1 parent 8ea2aa2f79
Exists in master

login

Showing 1 changed file with 11 additions and 1 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java View file @ 2e43936
... ... @@ -70,6 +70,8 @@
70 70 // QueryWrapper queryWrapper= Wrappers.query(LymsUser.class);
71 71 log.info(">>>>>");
72 72 BaseResponse baseResponse=new BaseResponse();
  73 + baseResponse.setErrorcode(1);
  74 + baseResponse.setErrormsg("用户名或密码错误");
73 75 Map<String,Object> tMap=new HashMap<>();
74 76 tMap.put("token","");
75 77  
... ... @@ -88,6 +90,10 @@
88 90 // }
89 91 // }
90 92 // lymsUserService.saveOrUpdate(user);
  93 + if (JWT.length()>0){
  94 + baseResponse.setErrorcode(0);
  95 + baseResponse.setErrormsg("");
  96 + }
91 97 user.setPasswd(null);
92 98  
93 99 Map<String,Object> hxMap=new HashMap<>();
94 100  
... ... @@ -98,10 +104,10 @@
98 104 tMap.put("user",user);
99 105 }
100 106 baseResponse.setObject(tMap);
101   - baseResponse.setErrorcode(0);
102 107  
103 108  
104 109  
  110 +
105 111 return baseResponse;
106 112 }
107 113  
... ... @@ -295,6 +301,10 @@
295 301 }
296 302  
297 303 return baseResponse;
  304 + }
  305 +
  306 + public static void main(String[] args) {
  307 + System.out.println(DigestUtils.md5DigestAsHex("passwd".getBytes()));;
298 308 }
299 309  
300 310 }