From 66b6525861e566adb3db8f06f824de7751fbca9e Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 09 Apr 2024 17:26:10 +0800
Subject: [PATCH] 集成es,初始化对应表数据,新增,修改,删除方法编写

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
index 56f0938..19d8e6f 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -1249,4 +1249,38 @@
         </where>
     </select>
 
+    <!--查询住户对应的社区编号-->
+    <select id="getCommunityCode" resultType="java.lang.String">
+        SELECT
+        jpag.community_code
+        FROM
+        jczz_household jh
+        LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
+        LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
+        where jh.is_deleted = 0
+        and jh.id = #{id}
+    </select>
+
+    <!--查询所有住户总数-->
+    <select id="getAllListTotal" resultType="java.lang.Integer">
+        SELECT
+        count(*)
+        FROM
+        jczz_household jh
+        where jh.is_deleted = 0
+    </select>
+
+    <!--查询对应的住户集合-->
+    <select id="getAllList" resultType="org.springblade.modules.house.vo.HouseholdVO">
+        SELECT
+        jh.*,
+        jpag.community_code
+        FROM
+        jczz_household jh
+        LEFT JOIN jczz_house jhs ON jh.house_code = jhs.house_code and jhs.is_deleted = 0
+        LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
+        where jh.is_deleted = 0
+        limit #{i},#{size}
+    </select>
+
 </mapper>

--
Gitblit v1.9.3