From 9c7fd8a8086a4c6cde6e142e8e8b93a49bfdf13d Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期一, 18 十月 2021 16:22:27 +0800
Subject: [PATCH] 爱心义仓bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |   28 ++++++++++------------------
 1 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
index 27e3c7d..c7a575d 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -9,6 +9,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments;
+import com.panzhihua.common.utlis.*;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
@@ -54,10 +55,6 @@
 import com.panzhihua.common.model.vos.screen.ComActPopulationScreenVO;
 import com.panzhihua.common.model.vos.screen.ComMngPopulationAgeVO;
 import com.panzhihua.common.model.vos.user.*;
-import com.panzhihua.common.utlis.AgeUtils;
-import com.panzhihua.common.utlis.DateUtils;
-import com.panzhihua.common.utlis.Snowflake;
-import com.panzhihua.common.utlis.StringUtils;
 import com.panzhihua.service_community.dao.*;
 import com.panzhihua.service_community.model.dos.*;
 import com.panzhihua.service_community.service.*;
@@ -6313,23 +6310,14 @@
     /**
      * 批量删除实有人口
      *
-     * @param Ids
-     * @return
+     * @param ids 实有人口id集合
+     * @return  删除结果
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public R deletePopulations(List<Long> Ids) {
-        if (!Ids.isEmpty()) {
-            Ids.forEach(id -> {
-                // 清除用户房屋居住信息
-                comMngPopulationHouseUserDAO.deletePopulationHouseByUserId(id);
-            });
-        }
-        int delete = populationDAO.deleteBatchIds(Ids);
-        if (delete > 0) {
-            return R.ok();
-        }
-        return R.fail();
+    public R deletePopulations(List<Long> ids, Long communityId) {
+        comMngPopulationCommunityTagsDAO.deletePopulationRelation(ids,communityId);
+        return R.ok();
     }
 
     /**
@@ -7473,6 +7461,10 @@
             if (StringUtils.isNotEmpty(detail.getMarriage())) {
                 detail.setMarriage(PopulMarriageEnum.getCnDescByName(Integer.parseInt(detail.getMarriage())));
             }
+            //查询该人口的标签
+            List<ComMngPopulationCommunityTagsVo> communityTagsList = this.baseMapper.getCommunityTagList(populationId);
+            String label = LabelUtils.assembleLabel(communityTagsList);
+            detail.setLabel(label);
         }
         return R.ok(detail);
     }

--
Gitblit v1.7.1