From 3c884ccd7b51edf3b36840bf99de5edaa41a38a7 Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期三, 12 十月 2022 19:05:28 +0800
Subject: [PATCH] 三说会堂事件流程处理

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java |   37 ++++++++++++++++++++++++++-----------
 1 files changed, 26 insertions(+), 11 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 e80ef41..4652fc7 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
@@ -7,6 +7,8 @@
 
 import javax.annotation.Resource;
 
+import com.panzhihua.common.model.vos.community.ComActPasswordVo;
+import com.panzhihua.service_community.util.MyAESUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.stereotype.Service;
@@ -147,6 +149,13 @@
         ComActVO comActVO = new ComActVO();
         BeanUtils.copyProperties(comActDO, comActVO);
         comActVO.setAreaName(comActDAO.selectAreaName(comActVO.getAreaCode()));
+        comActVO.setAccount(null);
+        comActVO.setPassword(null);
+        comActVO.setAddress(null);
+        comActVO.setContacts(null);
+        comActVO.setCreateAt(null);
+        comActVO.setState(null);
+        comActVO.setDistance(null);
         return R.ok(comActVO);
     }
 
@@ -180,9 +189,9 @@
      * @return 社区集合 按照创建顺序倒序排列
      */
     @Override
-    public R listCommunityAll() {
+    public R listCommunityAll(String areaCode) {
         List<ComActDO> comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState, 0)
-            .eq(ComActDO::getCityCode, "510400").orderByDesc(ComActDO::getCreateAt));
+            .eq(ComActDO::getAreaCode, areaCode).orderByDesc(ComActDO::getCreateAt));
         List<ComActVO> comActVOS = new ArrayList<>();
         if (!ObjectUtils.isEmpty(comActDOS)) {
             comActDOS.forEach(comActDO -> {
@@ -216,13 +225,13 @@
      * @return 社区列表
      */
     @Override
-    public R getCommunityLists() {
-        return R.ok(this.comActDAO.getCommunityLists());
+    public R getCommunityLists(String appId) {
+        return R.ok(this.comActDAO.getCommunityLists(appId));
     }
 
     @Override
-    public R getWestCommunityLists() {
-        return R.ok(this.comActDAO.getWestCommunityLists());
+    public R getWestCommunityLists(String areaCode) {
+        return R.ok(this.comActDAO.getWestCommunityLists(areaCode));
     }
 
     /**
@@ -231,9 +240,9 @@
      * @return 社区列表
      */
     @Override
-    public R getCommunityAllList() {
+    public R getCommunityAllList(String appId) {
         // 查询街道列表
-        List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList();
+        List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(appId);
         streetList.forEach(street -> {
             // 查询街道下社区列表
             List<CommunitySwitchAllAppletsVO> communityList =
@@ -256,8 +265,8 @@
      * @return 社区列表
      */
     @Override
-    public R communitySwitchSearchList(String name) {
-        return R.ok(this.comActDAO.getCommunityListByName(name));
+    public R communitySwitchSearchList(String name,String appId) {
+        return R.ok(this.comActDAO.getCommunityListByName(name,appId));
     }
 
     /**
@@ -274,7 +283,13 @@
 
     @Override
     public R getCommunityPassword(Long communityId){
-        return R.ok(comActDAO.getCommunityPassword(communityId));
+        ComActPasswordVo comActPasswordVo=comActDAO.getCommunityPassword(communityId);
+        try {
+            comActPasswordVo.setPassword(MyAESUtil.Decrypt(comActPasswordVo.getPassword(),"Ryo7M3n8loC5Abcd"));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return R.ok(comActPasswordVo);
     }
 
 }

--
Gitblit v1.7.1