From 8d5fb4ee9d27fd6a61b210eaee74af265f76aa7c Mon Sep 17 00:00:00 2001
From: manailin <261030956@qq.com>
Date: 星期五, 08 四月 2022 14:55:18 +0800
Subject: [PATCH] [修改]修改配置

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java
index 9e21817..6001f3f 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java
@@ -140,6 +140,18 @@
     public R pageBuildingAdmin(PageBuildingListDto pageBuildingListDto){
         IPage<PageBuildingListAdminVo> pageBuildingList = this.baseMapper.pageBuildingAdmin(
                 new Page(pageBuildingListDto.getPageNum(),pageBuildingListDto.getPageSize()),pageBuildingListDto);
+        pageBuildingList.getRecords().forEach(building -> {
+            //查询该楼栋下最高的楼层
+            if(StringUtils.isNotEmpty(building.getBuildFloorSum())){
+                if(building.getBuildFloorSum().length() == 3){
+                    building.setBuildFloorSum(building.getBuildFloorSum().substring(0,1));
+                }else if(building.getBuildFloorSum().length() == 4){
+                    building.setBuildFloorSum(building.getBuildFloorSum().substring(0,2));
+                }else if(building.getBuildFloorSum().length() > 4){
+                    building.setBuildFloorSum(building.getBuildFloorSum().substring(0,2));
+                }
+            }
+        });
         return R.ok(pageBuildingList);
     }
 
@@ -624,4 +636,14 @@
         }
         return R.ok();
     }
+
+    /**
+     * 根据小区id查询楼栋列表
+     * @param villageId 小区id
+     * @return  查询楼栋列表
+     */
+    @Override
+    public R getBuildListByVillageId(Long villageId) {
+        return R.ok(this.baseMapper.getBuildListByVillageId(villageId));
+    }
 }

--
Gitblit v1.7.1