| | |
| | | COOL_BASE_IP = '10.242.136.69' |
| | | # COOL_BASE_IP = 'localhost' |
| | | # COOL_BASE_IP = '192.168.4.36' |
| | | # |
| | | |
| | | COOL_BASE_PORT = 9090 |
| | |
| | | |
| | | @PostMapping("/login") |
| | | public R login(@RequestBody LoginParam param, HttpServletRequest request) { |
| | | // System.out.println(userService.encodePassword("123456")); |
| | | String username = param.getUsername(); |
| | | Long tenantId = param.getTenantId(); |
| | | User user = userService.getByUsername(username, tenantId); |
| | |
| | | @PostMapping("/user/update") |
| | | @Transactional |
| | | public R update(@RequestBody User user) { |
| | | if (user.getPassword() != null && user.getPassword().equals("")) { |
| | | user.setPassword(null); |
| | | } |
| | | if (!Cools.isEmpty(user.getUsername()) && userService.count(new LambdaQueryWrapper<User>() |
| | | .eq(User::getUsername, user.getUsername()) |
| | | .ne(User::getId, user.getId())) > 0) { |