Commit 2cdd6ca7baec970c743fef906edb34ca4ebf6760
1 parent
54c3794713
Exists in
master
and in
8 other branches
platform permission
fix bug
Showing 2 changed files with 6 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
2cdd6ca
| ... | ... | @@ -117,6 +117,11 @@ |
| 117 | 117 | |
| 118 | 118 | String key =LoginUtil.login(account, code, typeId, token); |
| 119 | 119 | if(null != key) { |
| 120 | + Users users1 = new Users(); | |
| 121 | + users1.setId(users.get(0).getId()); | |
| 122 | + users1.setLastLoginTime(new Date()); | |
| 123 | + usersService.updateUsers(users1); | |
| 124 | + | |
| 120 | 125 | Map<String, Object> result = new HashMap<>(); |
| 121 | 126 | result.put("token", key); |
| 122 | 127 | ResultUtils.buildSuccessResultAndWrite(response, result); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/TokenValidateInteceptor.java
View file @
2cdd6ca
| ... | ... | @@ -80,10 +80,7 @@ |
| 80 | 80 | loginContext.setId(users.getId()); |
| 81 | 81 | loginContext.setToken(token); |
| 82 | 82 | httpServletRequest.setAttribute("loginContext", loginContext); |
| 83 | - Users users1 = new Users(); | |
| 84 | - users1.setId(users.getId()); | |
| 85 | - users1.setLastLoginTime(new Date()); | |
| 86 | - usersService.updateUsers(users1); | |
| 83 | + | |
| 87 | 84 | LogUtil.tokenInfo(" userId:" + users.getId() + ", ,url:" + httpServletRequest.getRequestURI() + ",method:" + httpServletRequest.getMethod()); |
| 88 | 85 | |
| 89 | 86 | return loginContext.isLogin(); |