From 5513e69c82a82eb6be786d5cb8e23b81bffc8636 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 10 八月 2021 09:55:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
index 40d813c..400eea7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -4,10 +4,13 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.PageComActDTO;
+import com.panzhihua.common.model.dtos.community.switchs.SearchCommunityDTO;
import com.panzhihua.common.model.dtos.user.PageFeedBackDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActVO;
import com.panzhihua.common.model.vos.community.ComMngStructOtherBuildVO;
+import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO;
+import com.panzhihua.common.model.vos.community.switchs.StreetAllAppletsVO;
import com.panzhihua.service_community.dao.ComActDAO;
import com.panzhihua.service_community.dao.ComActVillageDAO;
import com.panzhihua.service_community.dao.ComStreetDAO;
@@ -204,5 +207,43 @@
return R.ok(this.comActDAO.getCommunityLists());
}
+ /**
+ * 查询社区所有列表
+ * @return 社区列表
+ */
+ @Override
+ public R getCommunityAllList(){
+ //查询街道列表
+ List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList();
+ streetList.forEach(street -> {
+ //查询街道下社区列表
+ List<CommunitySwitchAllAppletsVO> communityList = this.comActDAO.getCommunityListByStreetId(street.getStreetId());
+ if(!communityList.isEmpty()){
+ street.setChildList(communityList);
+ }
+ });
+ return R.ok(streetList);
+ }
+
+ /**
+ * 根据名字查询所有社区列表
+ * @param name 社区名字
+ * @return 社区列表
+ */
+ @Override
+ public R communitySwitchSearchList(String name){
+ return R.ok(this.comActDAO.getCommunityListByName(name));
+ }
+
+ /**
+ * 根据经纬度以及距离搜索附近社区列表
+ * @param communityDTO 请求参数
+ * @return 社区列表
+ */
+ @Override
+ public R communitySwitchSearchDistanceList(SearchCommunityDTO communityDTO){
+ return R.ok(this.comActDAO.getCommunityListByNearby(communityDTO));
+ }
+
}
--
Gitblit v1.7.1