From f1bcbc43e988d0d1a91bea66a9ebbf6d601e48c0 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 13 十月 2022 10:33:19 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActBuildingServiceImpl.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 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..f06b13b 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,19 @@ } return R.ok(); } + + /** + * 根据小区id查询楼栋列表 + * @param villageId 小区id + * @return 查询楼栋列表 + */ + @Override + public R getBuildListByVillageId(Long villageId) { + return R.ok(this.baseMapper.getBuildListByVillageId(villageId)); + } + + @Override + public R delete(Long id) { + return R.ok(this.baseMapper.deleteById(id)); + } } -- Gitblit v1.7.1