From f6b00d828e35474c0b96cd824f9a6126c2789176 Mon Sep 17 00:00:00 2001
From: huanghongfa <18228131219@163.com>
Date: 星期一, 28 十二月 2020 18:26:18 +0800
Subject: [PATCH] 查询小区bug修复

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaServiceImpl.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaServiceImpl.java
index 343de96..6221568 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngStructAreaServiceImpl.java
@@ -16,6 +16,7 @@
 import org.springframework.util.ObjectUtils;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -151,8 +152,17 @@
      */
     @Override
     public R listArea(Long communityId) {
+        List<ComMngStructAreaVO> comMngStructAreaVOS=new ArrayList<>();
         List<ComMngStructAreaDO> comMngStructAreaDOS = comMngStructAreaDAO.selectList(new QueryWrapper<ComMngStructAreaDO>().lambda().eq(ComMngStructAreaDO::getCommunityId, communityId));
-        return R.ok(comMngStructAreaDOS);
+        if (!ObjectUtils.isEmpty(comMngStructAreaDOS)) {
+            comMngStructAreaDOS.forEach(comMngStructAreaDO -> {
+                ComMngStructAreaVO comMngStructAreaVO=new ComMngStructAreaVO();
+                BeanUtils.copyProperties(comMngStructAreaDO,comMngStructAreaVO);
+                comMngStructAreaVOS.add(comMngStructAreaVO);
+            });
+
+        }
+        return R.ok(comMngStructAreaVOS);
     }
 
 

--
Gitblit v1.7.1