From 894c5c025112912a65e141805ef24547cbae50a8 Mon Sep 17 00:00:00 2001 From: lizhicheng Date: Tue, 11 Oct 2022 11:49:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E7=BB=9F=E8=AE=A1bug?= =?UTF-8?q?=E3=80=81=E4=BC=9A=E8=AE=AE=E5=AE=A4=E6=B6=88=E6=81=AF=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BookMeetingRoomController.java | 12 +++++++++--- .../io/renren/modules/notice/dto/SysNoticeDTO.java | 2 +- .../controller/TAbilityApplicationController.java | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java b/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java index 9128ae70..12664577 100644 --- a/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java +++ b/renren-admin/src/main/java/io/renren/modules/meeting/controller/BookMeetingRoomController.java @@ -103,10 +103,12 @@ public class BookMeetingRoomController { String content = "【通知】请审核" + dto.getName() + "发起的" + dto.getRoomName() + "会议室申请"; SysNoticeDTO sysNoticeDTO = new SysNoticeDTO(); - sysNoticeDTO.setType(2); sysNoticeDTO.setTitle("会议室申请审核通知"); sysNoticeDTO.setContent(content); // 通知内容 sysNoticeDTO.setReceiverType(1); + sysNoticeDTO.setType(11); + sysNoticeDTO.setApplyId(dto.getRoomId().toString()); + sysNoticeDTO.setApplyState(0); // 根据roleId查询userId List useIds = sysRoleUserService.getUserIdListByRoleId(Long.parseLong(defaultAssigneeRoleId)); if (useIds != null && useIds.size() > 0){ @@ -127,7 +129,9 @@ public class BookMeetingRoomController { String ownedContent = "【通知】您发起的" + dto.getRoomName() + "会议室申请,当前审核部门为:" + bigDateDeptName + ",审核负责人:会议室管理员" ; SysNoticeDTO ownedSysNoticeDTO = new SysNoticeDTO(); - ownedSysNoticeDTO.setType(2); + ownedSysNoticeDTO.setType(10); + ownedSysNoticeDTO.setApplyState(0); + ownedSysNoticeDTO.setApplyId(dto.getId().toString()); ownedSysNoticeDTO.setTitle("会议室申请发起通知"); ownedSysNoticeDTO.setContent(ownedContent); // 通知内容 ownedSysNoticeDTO.setReceiverType(1); @@ -178,7 +182,9 @@ public class BookMeetingRoomController { String content = "【通知】" + dto.getName() + ",您发起的" + dto.getRoomName() + "会议室申请,审核结果为:" + state; SysNoticeDTO sysNoticeDTO = new SysNoticeDTO(); - sysNoticeDTO.setType(2); + sysNoticeDTO.setType(10); + sysNoticeDTO.setApplyState(1); + sysNoticeDTO.setApplyId(dto.getId().toString()); sysNoticeDTO.setTitle("会议室申请审核结果通知"); sysNoticeDTO.setContent(content); // 通知内容 sysNoticeDTO.setReceiverType(1); diff --git a/renren-admin/src/main/java/io/renren/modules/notice/dto/SysNoticeDTO.java b/renren-admin/src/main/java/io/renren/modules/notice/dto/SysNoticeDTO.java index 7ac4e50f..c580f478 100644 --- a/renren-admin/src/main/java/io/renren/modules/notice/dto/SysNoticeDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/notice/dto/SysNoticeDTO.java @@ -20,7 +20,7 @@ public class SysNoticeDTO implements Serializable { @ApiModelProperty(value = "id") private Long id; - @ApiModelProperty(value = "通知类型 0:申请前台 1:申请后台 2:上架前台 3:上架后台 4:下架前台 5:下架后台 6:需求前台 7:需求后台 8:评论前台 9:评论后台 10:其他") + @ApiModelProperty(value = "通知类型 0:申请前台 1:申请后台 2:上架前台 3:上架后台 4:下架前台 5:下架后台 6:需求前台 7:需求后台 8:评论前台 9:评论后台 10:会议室前台 11:会议室后台 12:其他") private Integer type; @ApiModelProperty(value = "标题") private String title; diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java index bf83948e..19c33d7f 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/controller/TAbilityApplicationController.java @@ -27,6 +27,7 @@ import io.renren.modules.resource.service.ResourceService; import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.UserDetail; import io.renren.modules.sys.dto.SysDeptDTO; +import io.renren.modules.sys.enums.SuperAdminEnum; import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysUserService; import io.swagger.annotations.Api; @@ -209,9 +210,12 @@ public class TAbilityApplicationController { Map params = new HashMap() { { put("apply_flag", applyFlag); // 限定 - put("user_id", user == null ? null : user.getId()); // 只出本人 } }; + // 非超级管理员,只出本人 + if(user.getSuperAdmin() == SuperAdminEnum.NO.value()){ + params.put("user_id", user == null ? null : user.getId()); + } List applicationDTOS = tAbilityApplicationService.list(params); Map> result = applicationDTOS.stream().collect(Collectors.groupingBy(t -> { SysDeptDTO sysDeptDTO = t.getResourceOwnerDept();