资源部门被删

This commit is contained in:
wangliwen 2022-08-05 11:56:16 +08:00
parent 0666081fdc
commit c065c04703
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ public class ResourceController {
page.getList().forEach(item -> { page.getList().forEach(item -> {
item.setInfoList(resourceService.selectAttrsByResourceId(item.getId())); item.setInfoList(resourceService.selectAttrsByResourceId(item.getId()));
if (item.getDeptId() != null) { if (item.getDeptId() != null) {
String deptName = sysDeptService.get(item.getDeptId()).getName(); String deptName = sysDeptService.get(item.getDeptId()) == null ? null : sysDeptService.get(item.getDeptId()).getName();
item.setDeptName(StringUtils.isNotBlank(deptName) ? deptName : "--"); item.setDeptName(StringUtils.isNotBlank(deptName) ? deptName : "--");
} }
}); });