分工会委员可以代报名,及时不在活动范围内也可见

This commit is contained in:
2026-10-10 15:31:25 +08:00
parent f3802de0ac
commit 4b67eb8b78
@@ -131,8 +131,9 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
""").setParam("unionId", pageParam.getUnionId()).setParam("userId", SecurityUtil.getUserId());
// 分工会委员作为代报操作人,查看项目时不要求其本人在活动报名范围内。
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WY.name())) {
// cnd.where().andLike("school.applyWay ", "1");
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
@@ -209,8 +210,9 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
cnd.and(new Static("(SELECT COUNT(1) FROM activity_school_apply WHERE activityId=school.id AND userId='%s')>0".formatted(SecurityUtil.getUserId())));
}
// 活动入口与项目列表保持一致,避免代报人能打开活动却看不到报名项目。
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(),
RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WY.name())) {
// cnd.and(new Static("JSON_CONTAINS(school.applyWay,JSON_ARRAY( 1))>0"));
cnd.and(new Static("(SELECT COUNT(1) FROM activity_user_scope WHERE groupId=school.activityGroupId AND userId='%s') >0".formatted(SecurityUtil.getUserId())));
}