From 115944b8e8f42726fc62f34e5f8974ac05fd1a22 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Mon, 25 Jul 2022 17:19:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=B3=BB=E7=BB=9F-=E8=83=BD?= =?UTF-8?q?=E5=8A=9B=E6=8C=82=E6=8E=A5=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=89=80=E5=B1=9E=E9=83=A8=E9=97=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/activiti/controller/ActRunningController.java | 1 - .../modules/resource/controller/ResourceController.java | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActRunningController.java b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActRunningController.java index d48c88f5..7cdfb174 100644 --- a/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActRunningController.java +++ b/renren-admin/src/main/java/io/renren/modules/activiti/controller/ActRunningController.java @@ -11,7 +11,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index e6332454..9ecb2558 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -21,6 +21,7 @@ import io.renren.modules.resource.videoPreview.VideoPreviewFactory; import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.service.SysDeptService; import io.swagger.annotations.*; +import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -129,7 +130,11 @@ public class ResourceController { }) public Result> page(@ApiIgnore @RequestParam Map params) { PageData page = resourceService.page(params); - page.getList().forEach(item -> item.setInfoList(resourceService.selectAttrsByResourceId(item.getId()))); + page.getList().forEach(item -> { + item.setInfoList(resourceService.selectAttrsByResourceId(item.getId())); + String deptName = sysDeptService.get(item.getDeptId()).getName(); + item.setDeptName(StringUtils.isNotBlank(deptName) ? deptName : "--"); + }); return new Result>().ok(page); }