Browse Source

公告 只能编辑自己的 超管除外

master
PoffyZhang 1 year ago
parent
commit
dfb568ba86
2 changed files with 1 additions and 16 deletions
  1. +0
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/NoticeController.java
  2. +1
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java

+ 0
- 7
pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/NoticeController.java View File

@@ -59,13 +59,6 @@ public class NoticeController {
noticeManage.topped(id.getId());
}

@GetMapping("/list")
@ApiOperation("工作台公告列表(非编辑)")
public PageVo<NoticeListItemVO> list(@RequestParam(required = false, defaultValue = "3") Integer limit,
@RequestParam(required = false) Integer type) {
return noticeManage.list(limit, type);
}

@GetMapping("/dashboard/list")
@ApiOperation("工作台公告列表")
public PageVo<NoticeListItemVO> dashboardList(@RequestParam(required = false, defaultValue = "3") Integer limit,


+ 1
- 9
pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java View File

@@ -121,20 +121,12 @@ public class NoticeManage {
noticeService.updateById(notice);
}

public PageVo<NoticeListItemVO> list(Integer limit, Integer type) {
NoticeListReq req = new NoticeListReq();
req.setPageSize(limit);
req.setEnabled(true);
req.setType(type);
return listByManagerByPermission(req);
}

public PageVo<NoticeListItemVO> dashboardList(Integer limit, Integer type) {
NoticeListReq req = new NoticeListReq();
req.setPageSize(limit);
req.setEnabled(true);
req.setType(type);
return listByManager(req);
return listByManagerByPermission(req);
}

public PageVo<NoticeListItemVO> listByManager(NoticeListReq req) {


Loading…
Cancel
Save