guoenzhou преди 2 години
родител
ревизия
d4f8a73a49
променени са 1 файла, в които са добавени 22 реда и са изтрити 21 реда
  1. 22 21
      service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/BaseBuildServiceImpl.java

+ 22 - 21
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/BaseBuildServiceImpl.java

@@ -45,27 +45,28 @@ public class BaseBuildServiceImpl extends AbstractCrudService<BaseBuildMapper, B
                 .like(StringUtils.isNotBlank(buildName), BaseBuild::getBuildName, buildName)
                 .orderByDesc(BaseBuild::getId);
         page = this.page(page, queryWrapper);
-        if (CollectionUtils.isNotEmpty(page.getRecords())) {
-            for (int i = 0; i < page.getRecords().size(); i++) {
-                Map<String, Object> map = new HashMap<>();
-                map.put("id", page.getRecords().get(i).getId());
-                map.put("buildNum", page.getRecords().get(i).getBuildNum());
-                map.put("buildName", page.getRecords().get(i).getBuildName());
-                map.put("address", page.getRecords().get(i).getAddress());
-                map.put("buildArea", page.getRecords().get(i).getBuildArea());
-                map.put("fireRating", page.getRecords().get(i).getFireRating());
-                map.put("useCharacter", page.getRecords().get(i).getUseCharacter());
-                map.put("buildStructure", page.getRecords().get(i).getBuildStructure());
-                map.put("buildHigh", page.getRecords().get(i).getBuildHigh());
-                map.put("completeYear", page.getRecords().get(i).getCompleteYear());
-                map.put("safePerson", page.getRecords().get(i).getSafePerson());
-                map.put("managePerson", page.getRecords().get(i).getManagePerson());
-                map.put("fireRisk", page.getRecords().get(i).getFireRisk());
-                map.put("buildPlan", page.getRecords().get(i).getBuildPlan());
-                list.add(map);
-            }
-        }
-        return new CommonPage<>(list, page.getTotal(), pageSize, pageNum);
+        List<BaseBuild> records = page.getRecords();
+//      if (CollectionUtils.isNotEmpty(page.getRecords())) {
+//            for (int i = 0; i < page.getRecords().size(); i++) {
+//                Map<String, Object> map = new HashMap<>();
+//                map.put("id", page.getRecords().get(i).getId());
+//                map.put("buildNum", page.getRecords().get(i).getBuildNum());
+//                map.put("buildName", page.getRecords().get(i).getBuildName());
+//                map.put("address", page.getRecords().get(i).getAddress());
+//                map.put("buildArea", page.getRecords().get(i).getBuildArea());
+//                map.put("fireRating", page.getRecords().get(i).getFireRating());
+//                map.put("useCharacter", page.getRecords().get(i).getUseCharacter());
+//                map.put("buildStructure", page.getRecords().get(i).getBuildStructure());
+//                map.put("buildHigh", page.getRecords().get(i).getBuildHigh());
+//                map.put("completeYear", page.getRecords().get(i).getCompleteYear());
+//                map.put("safePerson", page.getRecords().get(i).getSafePerson());
+//                map.put("managePerson", page.getRecords().get(i).getManagePerson());
+//                map.put("fireRisk", page.getRecords().get(i).getFireRisk());
+//                map.put("buildPlan", page.getRecords().get(i).getBuildPlan());
+//                list.add(map);
+//            }
+//        }
+        return new CommonPage(records, page.getTotal(), pageSize, pageNum);
     }