diff --git a/src/main/java/com/ydool/common/utils/PasswordUtil.java b/src/main/java/com/ydool/common/utils/PasswordUtil.java index fc2876f..37704c0 100644 --- a/src/main/java/com/ydool/common/utils/PasswordUtil.java +++ b/src/main/java/com/ydool/common/utils/PasswordUtil.java @@ -66,9 +66,10 @@ public class PasswordUtil { * @return String */ public static String checkp(String pwd) { - String str = "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)(?=.*[!\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~])[A-Za-z\\d !\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~]{10,36}$"; +// String str = "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)(?=.*[!\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~])[A-Za-z\\d !\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~]{10,36}$"; + String str = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~`]).{8,}$"; if (!pwd.matches(str)) { - return "密码至少由10位及以上大小写字母、数字及特殊字符等混合、随机组成(至少包括数字、小写字母、大写字母和特殊符号各一个),最长36位"; + return "密码必须英文+数字+特殊符号,至少8位"; } else { return "ok"; } @@ -118,18 +119,6 @@ public class PasswordUtil { if (!"ok".equals(check)) { throw new ResultException(check); - } else if (!"ok".equals(rsThree)) { - throw new ResultException(rsThree); - } else if (!"ok".equals(repeat)) { - throw new ResultException(repeat); - } else if (!"ok".equals(checkBirthday)) { - throw new ResultException(checkBirthday); - } else if (!"ok".equals(check3)) { - throw new ResultException(check3); - } else if (!"ok".equals(checkMobile)) { - throw new ResultException(checkMobile); - } else if (!"ok".equals(checkPhone)) { - throw new ResultException(checkPhone); } else { return true; } diff --git a/src/main/java/com/ydool/oa/formily/userdept/impl/UserDeptServiceImpl.java b/src/main/java/com/ydool/oa/formily/userdept/impl/UserDeptServiceImpl.java index ba848cd..0f33c6e 100644 --- a/src/main/java/com/ydool/oa/formily/userdept/impl/UserDeptServiceImpl.java +++ b/src/main/java/com/ydool/oa/formily/userdept/impl/UserDeptServiceImpl.java @@ -211,7 +211,7 @@ public class UserDeptServiceImpl implements IUserDeptService { result.set("deptName", deptName); String initPassword = ConfigCache.getStr(ConfigCache.USER_INIT_PASSWORD, - "888888"); + "xslc@2025"); initPassword = PasswordUtil.password(loginUser.getSalt(), initPassword); //是否需要强制修改密码 diff --git a/src/main/java/com/ydool/oa/workFlow/controller/WorkFlowController.java b/src/main/java/com/ydool/oa/workFlow/controller/WorkFlowController.java index 81985f8..bb10947 100644 --- a/src/main/java/com/ydool/oa/workFlow/controller/WorkFlowController.java +++ b/src/main/java/com/ydool/oa/workFlow/controller/WorkFlowController.java @@ -199,7 +199,8 @@ public class WorkFlowController extends BaseController { @ApiOperation(value = "分页查询自己有关的流程通知") @ApiImplicitParams({ @ApiImplicitParam(name = "current", value = "当前页", dataType = "Integer"), - @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer") + @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer"), + @ApiImplicitParam(name = "isRead", value = "是否已读 true已读 false未读", dataType = "String") }) @ApiOperationSupport( responses = @DynamicResponseParameters(properties = { @@ -207,8 +208,8 @@ public class WorkFlowController extends BaseController { }), order = 9 ) - public AjaxResult workFlowNoticePageList() { - return workFlowNoticeService.workFlowNoticePageList(getPage()); + public AjaxResult workFlowNoticePageList(String isRead) { + return workFlowNoticeService.workFlowNoticePageList(getPage(), "true".equals(isRead) ? Boolean.TRUE : Boolean.FALSE); } diff --git a/src/main/java/com/ydool/oa/workFlow/engine/service/impl/BudgetWorkFlowService.java b/src/main/java/com/ydool/oa/workFlow/engine/service/impl/BudgetWorkFlowService.java index dd28d9b..3c4598c 100644 --- a/src/main/java/com/ydool/oa/workFlow/engine/service/impl/BudgetWorkFlowService.java +++ b/src/main/java/com/ydool/oa/workFlow/engine/service/impl/BudgetWorkFlowService.java @@ -69,9 +69,9 @@ public class BudgetWorkFlowService implements IWorkFlowType { public AjaxResult first(WorkFlow workFlow) { //是否维修上报角色 User user = userService.getById(workFlow.getUserId()); - List roles = roleService.listByIds(Arrays.asList(user.getRoles().split(","))); - List roleNames = roles.stream().map(Role::getName).collect(Collectors.toList()); - if (!roleNames.contains("维修上报")) throw new ResultException("您不是维修上报人员"); +// List roles = roleService.listByIds(Arrays.asList(user.getRoles().split(","))); +// List roleNames = roles.stream().map(Role::getName).collect(Collectors.toList()); +// if (!roleNames.contains("维修上报")) throw new ResultException("您不是维修上报人员"); Dept dept = deptService.getById(user.getDept()); if (ObjUtil.isNull(dept)) throw new ResultException("您没有部门"); diff --git a/src/main/java/com/ydool/oa/workFlow/service/WorkFlowNoticeService.java b/src/main/java/com/ydool/oa/workFlow/service/WorkFlowNoticeService.java index ba0ab3d..f661bd4 100644 --- a/src/main/java/com/ydool/oa/workFlow/service/WorkFlowNoticeService.java +++ b/src/main/java/com/ydool/oa/workFlow/service/WorkFlowNoticeService.java @@ -29,9 +29,10 @@ public class WorkFlowNoticeService extends BaseService pageList = page(page, new QueryWrapper().lambda() .eq(WorkFlowNotice::getUserId, StpUtil.getLoginIdAsString()) + .eq(ObjUtil.isNotNull(isRead), WorkFlowNotice::getStatus, isRead) .orderByDesc(WorkFlowNotice::getCreatedAt) ); return AjaxResult.ok().data(pageList); diff --git a/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java b/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java index 1d6b8c5..d4a76d8 100644 --- a/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java +++ b/src/main/java/com/ydool/system/service/impl/AuthServiceImpl.java @@ -226,7 +226,7 @@ public class AuthServiceImpl extends BaseService implements IA //是否需要强制修改密码 result.set("need_init_password", password.equals(ConfigCache.getStr(ConfigCache.USER_INIT_PASSWORD, - "Siwhnd!@Lc2349#!Rdisabled")) ? true : false); + "xslc@2025")) ? true : false); //权限 result.set("permissions", loginUser.getPermissions()); //电子签名 @@ -259,7 +259,7 @@ public class AuthServiceImpl extends BaseService implements IA */ @Override public AjaxResult editPassword(String oldPassword, String newPassword) { - if (!PasswordUtil.valid(newPassword)) return AjaxResult.fail("密码必须同时包含大写字母、小写字母、数字和特殊字符,并且长度至少为8位,最长24位"); + if (!PasswordUtil.valid(newPassword)) return AjaxResult.fail("密码必须英文+数字+特殊符号,至少8位"); String loginId = StpUtil.getLoginIdAsString(); User user = getById(loginId); if (!user.getPassword().equals(PasswordUtil.password(user.getSalt(), oldPassword))) return AjaxResult.fail( @@ -281,7 +281,7 @@ public class AuthServiceImpl extends BaseService implements IA */ @Override public AjaxResult newPassword(String newPassword) { - if (!PasswordUtil.valid(newPassword)) return AjaxResult.fail("密码必须同时包含大写字母、小写字母、数字和特殊字符,并且长度至少为8位,最长24位"); + if (!PasswordUtil.valid(newPassword)) return AjaxResult.fail("密码必须英文+数字+特殊符号,至少8位"); String loginId = StpUtil.getLoginIdAsString(); String salt = RandomUtil.randomString(6); String password = PasswordUtil.password(salt, newPassword); diff --git a/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java b/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java index 3530ad8..45c5033 100644 --- a/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java +++ b/src/main/java/com/ydool/system/service/impl/UserServiceImpl.java @@ -66,7 +66,7 @@ public class UserServiceImpl extends BaseService implements IU if (StrUtil.isNotBlank(message)) return AjaxResult.fail(message); User user = BeanUtil.copyProperties(userRequest, User.class); user.setPhone(CodecUtils.encrypt(user.getPhone())); - String initPassword = ConfigCache.getStr(ConfigCache.USER_INIT_PASSWORD, "Siwhnd!@Lc2349#!Rdisabled"); + String initPassword = ConfigCache.getStr(ConfigCache.USER_INIT_PASSWORD, "xslc@2025"); PasswordUtil.valid(initPassword); user.setSalt(RandomUtil.randomString(6)); user.setPassword(PasswordUtil.password(user.getSalt(), initPassword)); @@ -199,7 +199,7 @@ public class UserServiceImpl extends BaseService implements IU User user = getById(id); if (ObjectUtil.isNull(user)) return AjaxResult.fail("该用户不存在"); - String initPassword = ConfigCache.getStr(ConfigCache.USER_INIT_PASSWORD, "Siwhnd!@Lc2349#!Rdisabled"); + String initPassword = ConfigCache.getStr(ConfigCache.USER_INIT_PASSWORD, "xslc@2025"); PasswordUtil.valid(initPassword); user.setSalt(RandomUtil.randomString(6)); user.setPassword(PasswordUtil.password(user.getSalt(), initPassword));