|
@@ -4,16 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.diagbot.client.AuthServiceClient;
|
|
import com.diagbot.client.AuthServiceClient;
|
|
-import com.diagbot.dto.BasDeptInfoDTO;
|
|
|
|
-import com.diagbot.dto.BasHospitalInfoDTO;
|
|
|
|
-import com.diagbot.dto.JwtDTO;
|
|
|
|
-import com.diagbot.dto.LoginDTO;
|
|
|
|
-import com.diagbot.dto.SysRoleDTO;
|
|
|
|
-import com.diagbot.dto.SysUserDeptDTO;
|
|
|
|
-import com.diagbot.dto.SysUserPermissionDTO;
|
|
|
|
-import com.diagbot.dto.SysUserQueryDTO;
|
|
|
|
-import com.diagbot.dto.SysUserRoleDTO;
|
|
|
|
-import com.diagbot.dto.UserLoginDTO;
|
|
|
|
|
|
+import com.diagbot.dto.*;
|
|
import com.diagbot.entity.BasHospitalInfo;
|
|
import com.diagbot.entity.BasHospitalInfo;
|
|
import com.diagbot.entity.JWT;
|
|
import com.diagbot.entity.JWT;
|
|
import com.diagbot.entity.JwtStore;
|
|
import com.diagbot.entity.JwtStore;
|
|
@@ -90,6 +81,8 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
private SysUserHospitalFacade sysUserHospitalFacade;
|
|
private SysUserHospitalFacade sysUserHospitalFacade;
|
|
@Autowired
|
|
@Autowired
|
|
private SysUserRoleFacade sysUserRoleFacade;
|
|
private SysUserRoleFacade sysUserRoleFacade;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysDictionaryFacade sysDictionaryFacade;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取jwt
|
|
* 获取jwt
|
|
@@ -152,10 +145,10 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
/***
|
|
/***
|
|
* 未加密密码复杂度判断
|
|
* 未加密密码复杂度判断
|
|
*/
|
|
*/
|
|
-/* Boolean passwordRegular = passwordRegular(password);
|
|
|
|
- if(!passwordRegular){
|
|
|
|
- data.setPasswordComplexity("密码复杂度过低,请及时修改密码");
|
|
|
|
- }*/
|
|
|
|
|
|
+// Boolean passwordRegular = passwordRegular(password);
|
|
|
|
+// if(!passwordRegular){
|
|
|
|
+// data.setPasswordComplexity("密码复杂度过低,请及时修改密码");
|
|
|
|
+// }
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -264,10 +257,10 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
"原密码和新密码不能相同");
|
|
"原密码和新密码不能相同");
|
|
}
|
|
}
|
|
-/* Boolean regularBoolean = passwordRegular(modifyPassword);
|
|
|
|
- if(!regularBoolean){
|
|
|
|
- throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确格式的新密码");
|
|
|
|
- }*/
|
|
|
|
|
|
+// Boolean regularBoolean = passwordRegular(modifyPassword);
|
|
|
|
+// if(!regularBoolean){
|
|
|
|
+// throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确格式的新密码");
|
|
|
|
+// }
|
|
String userId = SysUserUtils.getCurrentPrincipleID();
|
|
String userId = SysUserUtils.getCurrentPrincipleID();
|
|
SysUser user = this.getOne(new QueryWrapper<SysUser>()
|
|
SysUser user = this.getOne(new QueryWrapper<SysUser>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -297,8 +290,21 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public Boolean passwordRegular(String password){
|
|
public Boolean passwordRegular(String password){
|
|
- String regex="^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[$@$!%*?&])[A-Za-z\\d$@$!%*?&]{8,}";
|
|
|
|
- boolean check=password.matches(regex);
|
|
|
|
|
|
+ //获取字点表中存储的正则表达式 "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[$@$!%*?&])[A-Za-z\\d$@$!%*?&]{8,}"
|
|
|
|
+ boolean check=true;
|
|
|
|
+ Map<Long, List<SysDictionaryInfoDTO>> dictionaryRegex = sysDictionaryFacade.getDictionaryRegex();
|
|
|
|
+ if(dictionaryRegex!=null){
|
|
|
|
+ List<SysDictionaryInfoDTO> sysDictionaryInfoDTOS = dictionaryRegex.get(30L);
|
|
|
|
+ if(ListUtil.isNotEmpty(sysDictionaryInfoDTOS)) {
|
|
|
|
+ for (SysDictionaryInfoDTO sysDictionaryInfoDTO : sysDictionaryInfoDTOS) {
|
|
|
|
+ String name = sysDictionaryInfoDTO.getName();
|
|
|
|
+ if ("密码复杂度".equals(name)) {
|
|
|
|
+ String val = sysDictionaryInfoDTO.getVal();
|
|
|
|
+ check = password.matches(val);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return check;
|
|
return check;
|
|
}
|
|
}
|
|
/**
|
|
/**
|