能力下架 npe

This commit is contained in:
wangliwen 2022-10-26 19:22:21 +08:00
parent 27d2f13fc5
commit d9a83fd41d
1 changed files with 7 additions and 5 deletions

View File

@ -68,12 +68,14 @@ public class TResourceMountApplyController {
// @RequiresPermissions("resourceMountApply:tresourcemountapply:info")
public Result<TResourceMountApplyDTO> get(@PathVariable("id") Long id) {
TResourceMountApplyDTO data = tResourceMountApplyService.get(id);
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<TResourceMountApplyDTO>().ok(data);
}