diff --git a/src/main/java/com/budwk/app/zhgh/activity/basic/controller/ActivityBasicScopeController.java b/src/main/java/com/budwk/app/zhgh/activity/basic/controller/ActivityBasicScopeController.java index 6b15469..95ed19a 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/basic/controller/ActivityBasicScopeController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/basic/controller/ActivityBasicScopeController.java @@ -383,24 +383,8 @@ public class ActivityBasicScopeController { try { - if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())){ - boolean isBranchUnionChairman = AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()); - boolean isClubPresident = AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name()); - List manageClubIdList = sysClubService.getMyManageClub().stream().map(SysClub::getId).toList(); - if (isBranchUnionChairman && isClubPresident) { - // Users with both roles can search their union users and their managed club members. - SqlExpressionGroup scopeGroup = new SqlExpressionGroup(); - scopeGroup.or("u.unionid", "=", SecurityUtil.getUnionId()); - if (Lang.isNotEmpty(manageClubIdList)) { - scopeGroup.or("clubuser.clubid", "in", manageClubIdList); - } - cnd.and(scopeGroup); - } else if (isClubPresident) { - // Club managers can only search members from clubs they manage. - cnd.and("clubuser.clubid", "in", Lang.isNotEmpty(manageClubIdList) ? manageClubIdList : List.of("__EMPTY_CLUB_ID__")); - } else { - cnd.andEX("u.unionid", "=", SecurityUtil.getUnionId()); - } + if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.CLUB_MANAGER.name())) { + cnd.andEX("u.unionid", "=", SecurityUtil.getUnionId()); } cnd.andEX("u.unionid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnionId()); cnd.andEX("u.unitid", EQ_OR_NEQ_OP, activityUserScopePageParam.getUnitId()); diff --git a/src/main/resources/static/components/module/activity/UserScope.vue b/src/main/resources/static/components/module/activity/UserScope.vue index c85af5c..a323b66 100644 --- a/src/main/resources/static/components/module/activity/UserScope.vue +++ b/src/main/resources/static/components/module/activity/UserScope.vue @@ -21,7 +21,7 @@ - + 会员类型: - + 教职工类别: - + 在职状态: - + 部门查询: @@ -144,7 +144,7 @@ flushUnits() doSearch() " - :clearable="is_A06 === true || is_sysadmin === true" + :clearable="is_A06 === true || is_sysadmin === true || is_CLUB_MANAGER === true" filterable placeholder="所属工会" style="width: 100%" @@ -170,7 +170,7 @@ -