From ea4884b44a6b44c8c4a2948fc643bdea6656a210 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期日, 09 十月 2022 16:16:16 +0800 Subject: [PATCH] 修改登录测试 --- flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java b/flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java index 0b17e82..7bd2b3d 100644 --- a/flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java +++ b/flower_city/src/main/java/com/dg/core/controller/ReplyTemplateController.java @@ -6,6 +6,7 @@ import com.dg.core.annotation.CurrentUser; import com.dg.core.db.gen.entity.ReplyTemplateEntity; import com.dg.core.db.gen.entity.SysUser; +import com.dg.core.service.IOrganizationChartService; import com.dg.core.service.IReplyTemplateService; import com.dg.core.util.TableDataInfo; import io.swagger.annotations.Api; @@ -25,19 +26,26 @@ @Autowired IReplyTemplateService iReplyTemplateService; + @Autowired + IOrganizationChartService iOrganizationChartService; + + /** * 获取模板列表 * @return */ @ApiOperation("获取模板列表") @GetMapping("/getlist") + @Authorization public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum, @RequestParam(value = "pageSize",required = false) Integer pageSize, - @RequestParam(value = "Name",required = false) String Name) + @RequestParam(value = "Name",required = false) String Name, + @CurrentUser SysUser sysUser) { Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize); - List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name); - int num=iReplyTemplateService.countNum(Name); + List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); + List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids); + int num=iReplyTemplateService.countNum(Name,ids); return getDataTable(list,num); } @@ -48,6 +56,7 @@ */ @ApiOperation("获取详情") @GetMapping("/getdata") + @Authorization public ResultData selectConfigData(@RequestParam(value = "Id",required = false) String Id) { if(StringUtils.isEmpty(Id)) @@ -91,6 +100,7 @@ */ @ApiOperation("更新模板") @PostMapping("/update") + @Authorization public ResultData updateConfig(@RequestBody ReplyTemplateEntity entity) { if(entity==null) @@ -112,6 +122,7 @@ */ @ApiOperation("删除模板") @DeleteMapping("/delete") + @Authorization public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id) { return toAjax(iReplyTemplateService.deleteConfigById(Id)); @@ -125,6 +136,7 @@ */ @ApiOperation("复制模板") @PostMapping("/copy") + @Authorization public ResultData copy(@RequestParam(value = "Id",required = false) String Id) { if(StringUtils.isEmpty(Id)) -- Gitblit v1.7.1