资源部门被删

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 -> {
item.setInfoList(resourceService.selectAttrsByResourceId(item.getId()));
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 : "--");
}
});
@ -257,7 +257,7 @@ public class ResourceController {
public Result importResource(@RequestParam("config") MultipartFile uploadFile, HttpServletRequest request) {
List<Map<String, Object>> dept =
jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept");
logger.info("上传文件:{}" , uploadFile.getOriginalFilename());
logger.info("上传文件:{}", uploadFile.getOriginalFilename());
String format = sdf.format(new Date());
File folder = new File(uploadPath + "upload" + File.separator + format);
logger.info(folder.getPath());