From b24f9c75c79e4de248505295bfea7055e4975ff4 Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期二, 25 五月 2021 14:23:04 +0800
Subject: [PATCH] Merge branch 'lyq' into 'test'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
index 301d159..697428e 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
@@ -1,7 +1,11 @@
 package com.panzhihua.service_community.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.panzhihua.common.model.vos.community.ComMngVillageTotalVO;
+import com.panzhihua.common.model.vos.community.ComMngVillageVO;
 import com.panzhihua.service_community.model.dos.ComMngVillageDO;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 
 
 /**
@@ -10,4 +14,20 @@
  **/
 @Mapper
 public interface ComActVillageDAO extends BaseMapper<ComMngVillageDO> {
+
+    @Select("select count(id) as houseTotal" +
+            ",(select count(DISTINCT floor) from com_mng_population_house where village_id = #{villageId}) as floorTotal" +
+            ",(select count(id) from com_mng_population where village_id = #{villageId}) as populationTotal" +
+            ",(select count(id) from com_mng_car where area_id = #{villageId}) as carTotal" +
+            " from com_mng_population_house where village_id = #{villageId}")
+    ComMngVillageVO getStatisticsCount(@Param("villageId") Long villageId);
+
+    @Select("select count(village_id) as villageTotal" +
+            ",(select count(village_id) from com_mng_village where community_id = #{communityId} and type = 1) as townTotal" +
+            ",(select count(village_id) from com_mng_village where community_id = #{communityId} and type = 2) as countrysideTotal" +
+            " from com_mng_village where community_id = #{communityId}" )
+    ComMngVillageTotalVO getVillageStatisticsCount(@Param("communityId") Long communityId);
+
+    @Select("select village_id,alley,house_num,group_at,type,address,update_at from com_mng_village where village_id = #{villageId}")
+    ComMngVillageVO getVillageById(@Param("villageId") Long villageId);
 }

--
Gitblit v1.7.1