| | |
| | | List<UserWxExcel> userList = baseMapper.exportUser(param); |
| | | return userList; |
| | | } |
| | | |
| | | /** |
| | | * 修改密码 |
| | | * @param userId |
| | | * @param newPassword |
| | | * @param oldPassword |
| | | * @param newPassword1 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updatePassword(Long userId, String oldPassword, String newPassword, String newPassword1) { |
| | | UserWx user = getById(userId); |
| | | if (!newPassword.equals(newPassword1)) { |
| | | throw new ServiceException("请输入正确的确认密码!"); |
| | | } |
| | | if (!user.getPassword().equals(DigestUtil.hex(oldPassword))) { |
| | | throw new ServiceException("原密码不正确!"); |
| | | } |
| | | return this.update(Wrappers.<UserWx>update().lambda().set(UserWx::getPassword, DigestUtil.hex(newPassword)).eq(UserWx::getId, userId)); |
| | | } |
| | | } |