diff --git a/src/main/java/com/budwk/app/sys/controller/SysMsgController.java b/src/main/java/com/budwk/app/sys/controller/SysMsgController.java index 3ba34e8..ca2c81b 100644 --- a/src/main/java/com/budwk/app/sys/controller/SysMsgController.java +++ b/src/main/java/com/budwk/app/sys/controller/SysMsgController.java @@ -118,6 +118,7 @@ public class SysMsgController { @Param("type") String type, @Param("unionId") String unionId, @Param("unitId") String unitId, + @Param("clubId") String clubId, @Param("id") String id) { try { Cnd cnd = Cnd.NEW(); @@ -147,6 +148,13 @@ public class SysMsgController { if (Strings.isNotBlank(pageForm.getSearchName()) && Strings.isNotBlank(pageForm.getSearchKeyword())) { cnd.and(pageForm.getSearchName(), "like", "%" + pageForm.getSearchKeyword() + "%"); } + if(StrUtil.isNotBlank(clubId)) { + List clubUsers = sysClubService.dao().query(ClubUser.class, Cnd.where("clubId", "=", clubId)); + if(Lang.isNotEmpty(clubUsers)) { + List clubUserList = clubUsers.stream().map(ClubUser::getUserId).distinct().toList(); + cnd.and("u.id", "in", clubUserList); + } + } if (Strings.isNotBlank(pageForm.getPageOrderName()) && Strings.isNotBlank(pageForm.getPageOrderBy())) { cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); } else { @@ -192,7 +200,7 @@ public class SysMsgController { @At @Ok("json:{locked:'password|salt',ignoreNull:false}") @SaCheckLogin - public Object user_data(@Valid PageForm pageForm, String unionId, String unitId, String roleId, String sex) { + public Object user_data(@Valid PageForm pageForm, String unionId, String unitId, String roleId, String sex, String clubId) { try { Cnd cnd = Cnd.NEW(); Sql sql = Sqls.create(""" @@ -211,6 +219,14 @@ public class SysMsgController { cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); } + if(StrUtil.isNotBlank(clubId)) { + List clubUsers = sysClubService.dao().query(ClubUser.class, Cnd.where("clubId", "=", clubId)); + if(Lang.isNotEmpty(clubUsers)) { + List clubUserList = clubUsers.stream().map(ClubUser::getUserId).distinct().toList(); + cnd.and("u.id", "in", clubUserList); + } + } + SqlExpressionGroup group = new SqlExpressionGroup(); if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { diff --git a/src/main/resources/views/platform/sys/msg/index.html b/src/main/resources/views/platform/sys/msg/index.html index 00b33ea..b139efe 100644 --- a/src/main/resources/views/platform/sys/msg/index.html +++ b/src/main/resources/views/platform/sys/msg/index.html @@ -77,10 +77,10 @@ layout("/layouts/platform.html"){ - +
@@ -113,6 +113,7 @@ layout("/layouts/platform.html"){ id: "", unionList: [], unitList: [], + clubList: [], noteVisible: false, nodeData: {} } @@ -172,6 +173,7 @@ layout("/layouts/platform.html"){ created: async function () { this.unitList = await this.$businessTool.listUnit() this.unionList = await this.$businessTool.listUnion() + this.clubList = await this.$businessTool.listCLubByRole() this.pageData() } }) diff --git a/src/main/resources/views/platform/sys/msg/msgManage/msgManageForm.js b/src/main/resources/views/platform/sys/msg/msgManage/msgManageForm.js index 0166713..8a20575 100644 --- a/src/main/resources/views/platform/sys/msg/msgManage/msgManageForm.js +++ b/src/main/resources/views/platform/sys/msg/msgManage/msgManageForm.js @@ -64,8 +64,8 @@ const MSG_FORM_TEMPLATE = { - -
+ +
@@ -84,6 +84,9 @@ const MSG_FORM_TEMPLATE = { + + + @@ -122,7 +125,11 @@ const MSG_FORM_TEMPLATE = { unitList: { type: Array, required: true - } + }, + clubList: { + type: Array, + required: true + }, }, data() { return { @@ -269,5 +276,10 @@ const MSG_FORM_TEMPLATE = { }, async created() { this.roleList = await this.getRoleList() - } + }, + style: /*language=CSS*/ ` + /deep/.select-dialog .el-dialog__body{ + padding: 10px 20px !important; + } + ` } diff --git a/src/main/resources/views/platform/sys/msg/msgManage/viewUser.js b/src/main/resources/views/platform/sys/msg/msgManage/viewUser.js index c2e6f2b..e1eb347 100644 --- a/src/main/resources/views/platform/sys/msg/msgManage/viewUser.js +++ b/src/main/resources/views/platform/sys/msg/msgManage/viewUser.js @@ -16,6 +16,9 @@ const VIEW_USER_TEMPLATE = { + + +
{{viewUserTitle}}列表
@@ -54,7 +57,11 @@ const VIEW_USER_TEMPLATE = { unitList: { type: Array, required: true - } + }, + clubList: { + type: Array, + required: true + }, }, data() { return {