| | |
| | | createUserBO.setRealName(createNewUserAppReqDTO.getRealName()); |
| | | //如果没有提供密码,初始密码为“123456” |
| | | if(createNewUserAppReqDTO.getPwd() == null || createNewUserAppReqDTO.getPwd().isEmpty()){ |
| | | createNewUserAppReqDTO.setPwd("Gkhy@c413"); |
| | | createNewUserAppReqDTO.setPwd("Gs@123456"); |
| | | } |
| | | |
| | | //todo 2024 弱口令问题处理 |
| | |
| | | bo.setDepId(updateUserAppReqDTO.getDepId()); |
| | | bo.setIdentityStatus(updateUserAppReqDTO.getIdentityStatus()); |
| | | bo.setQualificationAttId(updateUserAppReqDTO.getQualificationAttId()); |
| | | if (!ObjectUtils.isEmpty(updateUserAppReqDTO.getPwd())){ |
| | | if (updateUserAppReqDTO.getPwd().length() < 8){ |
| | | throw new BusinessException(this.getClass(),ResultCode.PARAM_ERROR_ILLEGAL.getCode(),"密码长度不够"); |
| | | } |
| | | if (!updateUserAppReqDTO.getPwd().matches(".*[A-Z].*")){ |
| | | throw new BusinessException(this.getClass(),ResultCode.PARAM_ERROR_ILLEGAL.getCode(),"密码需要包含大小写字母、数字、特殊符号"); |
| | | } |
| | | if (!updateUserAppReqDTO.getPwd().matches(".*[a-z].*")){ |
| | | throw new BusinessException(this.getClass(),ResultCode.PARAM_ERROR_ILLEGAL.getCode(),"密码需要包含大小写字母、数字、特殊符号"); |
| | | } |
| | | if (!updateUserAppReqDTO.getPwd().matches(".*\\d.*")){ |
| | | throw new BusinessException(this.getClass(),ResultCode.PARAM_ERROR_ILLEGAL.getCode(),"密码需要包含大小写字母、数字、特殊符号"); |
| | | } |
| | | if (!updateUserAppReqDTO.getPwd().matches(".*[!@#$%^&*.()?+`~<>,-].*")){ |
| | | throw new BusinessException(this.getClass(),ResultCode.PARAM_ERROR_ILLEGAL.getCode(),"密码需要包含大小写字母、数字、特殊符号"); |
| | | } |
| | | bo.setPwd(updateUserAppReqDTO.getPwd()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | UserInfoDomainDTO updateRs = userDomainService.updateUserInfo(bo); |
| | | //修改用户绑定角色 |
| | | userRoleDomainService.updateUserRole(updateUserAppReqDTO.getId(), updateUserAppReqDTO.getRoleIds()); |