| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.persistence.criteria.*; |
| | | import java.nio.charset.StandardCharsets; |
| | |
| | | user.setPhone(updateUserBO.getPhone()); |
| | | user.setIdentityStatus(updateUserBO.getIdentityStatus()); |
| | | user.setQualificationAttId(updateUserBO.getQualificationAttId()); |
| | | if (!ObjectUtils.isEmpty(updateUserBO.getPwd())){ |
| | | user.setHash(genPasswordHash(updateUserBO.getPwd(), user.getSalt())); |
| | | } |
| | | //写库 |
| | | User saveUserRs = userRepository.save(user); |
| | | return userInfoDomainConverter.toUserInfoDTO(saveUserRs); |
| | |
| | | User user = userOptional.get(); |
| | | |
| | | //设置初始密码 |
| | | String newPwd = "Gkhy@c413"; |
| | | String newPwd = "Gs@123456"; |
| | | String newHash = genPasswordHash(newPwd, user.getSalt()); |
| | | |
| | | // Integer integer = userRepository.resetPassword(uid, newHash, LocalDateTime.now()); |
| | |
| | | return BeanCopyUtils.copyBean(userInfo, UserInfoDomainDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<UserInfoDomainDTO> getUserInfoByIds(List<Long> evaluateUserIds, String info) { |
| | | if (ObjectUtils.isEmpty(evaluateUserIds)){ |
| | | throw new BusinessException(this.getClass(), ResultCode.PARAM_ERROR_NULL.getCode(), "请求参数不能为空"); |
| | | } |
| | | |
| | | List<User> userInfoByIds = userRepository.getUserInfoByIds(evaluateUserIds); |
| | | |
| | | if (ObjectUtils.isEmpty(userInfoByIds)){ |
| | | throw new BusinessException(this.getClass(), ResultCode.PARAM_ERROR.getCode(), info + "不存在,请检查是否输入有误或人员已被删除"); |
| | | } |
| | | return BeanCopyUtils.copyBeanList(userInfoByIds, UserInfoDomainDTO.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 清除REDIS缓存的用户数据 |