From 8485affcb0d4de05059d80cb1e844d6b18291654 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 16 五月 2025 14:35:49 +0800
Subject: [PATCH] 修正

---
 src/main/java/com/gkhy/labRiskManage/application/account/service/impl/AccountAppServiceImpl.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gkhy/labRiskManage/application/account/service/impl/AccountAppServiceImpl.java b/src/main/java/com/gkhy/labRiskManage/application/account/service/impl/AccountAppServiceImpl.java
index af217c3..c504bb9 100644
--- a/src/main/java/com/gkhy/labRiskManage/application/account/service/impl/AccountAppServiceImpl.java
+++ b/src/main/java/com/gkhy/labRiskManage/application/account/service/impl/AccountAppServiceImpl.java
@@ -403,6 +403,28 @@
         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());

--
Gitblit v1.9.2