diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index b7ad3817..6d92675d 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -544,7 +544,9 @@ public class ResourceServiceImpl extends CrudServiceImpl resultMap = new HashMap<>(); List re = resourceDao.selectTypeCount(null); //2022-07-05,ytl修改 start - re.removeIf(r->{return org.apache.commons.lang3.StringUtils.equals(r.get("type").toString(),"基础设施");}); + re.removeIf(r -> { + return org.apache.commons.lang3.StringUtils.equals(r.get("type").toString(), "基础设施"); + }); //2022-07-05,ytl修改 end switch (Constant.ProjectPlace.getByFlag(projectPlace)) { case TSINGTAO_XHA: { // 青岛西海岸 @@ -1655,8 +1657,11 @@ public class ResourceServiceImpl extends CrudServiceImpl resourceIds = getSourceIdsByProcess(list); IPage page = new Page<>(curPage, limit); QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("id", resourceIds).eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag()).orderBy(true, isAsc, orderColumn); - List dtoList = ConvertUtils.sourceToTarget(resourceDao.selectPage(page, queryWrapper).getRecords(), ResourceDTO.class); + if (!resourceIds.isEmpty()) { + queryWrapper.in("id", resourceIds); + } + queryWrapper.eq("del_flag", ResourceEntityDelFlag.NORMAL.getFlag()).orderBy(true, isAsc, orderColumn); + List dtoList = ConvertUtils.sourceToTarget(Optional.ofNullable(resourceDao.selectPage(page, queryWrapper).getRecords()).orElse(new ArrayList<>()), ResourceDTO.class); dtoList.forEach(temp -> { Map p = new HashMap(); p.put("resource_id", temp.getId());