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); }