| | |
| | | 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()); |