| | |
| | | return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); |
| | | } |
| | | user.setUserName(company.getAccount()); |
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); |
| | | user.setPassword(SecurityUtils.encryptPassword(company.getPassword())); |
| | | company.setUpdateUserId(getUserId()); |
| | | user.setRoleId(2L); |
| | | int count = userService.updateUser(user); |
| | | if (count > 0) { |
| | | boolean update = companyService.updateById(company); |
| | |
| | | if(StringUtils.isNotEmpty(user.getPassword())){ |
| | | user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); |
| | | } |
| | | user.setRoleId(2L); |
| | | // 移除之前的二维码 |
| | | redisTemplate.delete("ADMIN_WX_IMG" + user.getUserId()); |
| | | return R.ok(userService.updateUser(user)); |