| | |
| | | import org.springblade.modules.system.entity.Role; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.entity.UserWx; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserWxExcel; |
| | | import org.springblade.modules.system.mapper.UserWxMapper; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserWxService; |
| | |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | |
| | | } |
| | | return deleteLogic(Func.toLongList(userIds)); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserWxExcel> exportUser(Map<String, Object> param) { |
| | | 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)); |
| | | } |
| | | } |