diff --git a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java index 803a2247..1464eed4 100644 --- a/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java +++ b/renren-admin/src/main/java/io/renren/modules/resourceMountApply/controller/TResourceMountApplyController.java @@ -68,11 +68,13 @@ public class TResourceMountApplyController { // @RequiresPermissions("resourceMountApply:tresourcemountapply:info") public Result get(@PathVariable("id") Long id) { TResourceMountApplyDTO data = tResourceMountApplyService.get(id); - SysDeptDTO sysDeptDTO = sysDeptService.get(Long.valueOf(data.getDeptId())); - if (sysDeptDTO != null) { - ResourceDTO resourceDTO = data.getResourceDTO(); - resourceDTO.setDeptName(sysDeptDTO.getName()); - data.setResourceDTO(resourceDTO); + if (data.getDeptId() != null) { + SysDeptDTO sysDeptDTO = sysDeptService.get(Long.valueOf(data.getDeptId())); + if (sysDeptDTO != null) { + ResourceDTO resourceDTO = data.getResourceDTO(); + resourceDTO.setDeptName(sysDeptDTO.getName()); + data.setResourceDTO(resourceDTO); + } } return new Result().ok(data); }