From 5123f48f469dba99f6929a3f6abbe3690ce3e8c2 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Fri, 29 Mar 2024 17:37:13 +0800
Subject: [PATCH] 短信验证码+导出议事报名人员+居住证申请统计bug
---
src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 102 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
index a14cf9a..745cf47 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
@@ -109,6 +109,9 @@
jh.name,
jh.phone_number phone,
jda.address_name,
+ jhs.area,
+ jhs.remark,
+ jda.houseCode,
jda.aoi_name
<if test="articleId != null ">,
group_concat(jt.option_content) optionContent </if>
@@ -118,6 +121,7 @@
LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
LEFT JOIN jczz_topics jt on jt.id = jut.topics_id
LEFT JOIN blade_user bu ON jh.associated_user_id = bu.id AND bu.is_deleted = 0
+ LEFT JOIN jczz_house jhs on jhs.house_code= jda.address_code
<where>
<if test="id != null ">and jut.id = #{id}</if>
<if test="name != null and name != ''">
@@ -147,6 +151,9 @@
jh.name,
jh.phone_number,
jda.address_name,
+ jhs.area,
+ jhs.remark,
+ jda.houseCode,
jda.aoi_name
</if>
</where>
@@ -154,4 +161,99 @@
</select>
+ <select id="getresult" resultMap="userTopicsResultMap">
+
+ SELECT
+ jts.option_content
+ FROM
+ jczz_user_topics jut
+ LEFT JOIN jczz_topics jts ON jts.id = jut.topics_id
+ WHERE
+ jut.article_id = #{articleId}
+ and jut.household_id=#{householdId}
+ and jts.discuss_content=#{discussContent}
+
+ </select>
+
+ <select id="getresultTwo" resultType="org.springblade.modules.discuss.excel.UserTopicsExcel">
+ SELECT
+ jut.article_id,
+ jut.delete_flag,
+ jut.signature_path,
+ jut.create_time,
+ jut.household_id,
+ bu.avatar,
+ jh.name,
+ jh.phone_number phone,
+ jda.address_name,
+ jhs.area,
+ jhs.remark,
+ jda.address_code houseCode,
+ jda.aoi_name,
+ jt.option_content
+ FROM
+ jczz_user_topics as jut
+ LEFT JOIN jczz_household jh ON jh.id = jut.household_id and jh.is_deleted = 0
+ LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
+ LEFT JOIN jczz_topics jt on jt.id = jut.topics_id
+ LEFT JOIN blade_user bu ON jh.associated_user_id = bu.id AND bu.is_deleted = 0
+ LEFT JOIN jczz_house jhs on jhs.house_code= jda.address_code
+ <where>
+ <if test="id != null ">and jut.id = #{id}</if>
+ <if test="name != null and name != ''">
+ and bu.name like concat('%',#{name},'%')
+ </if>
+ <if test="phone != null and phone != ''">
+ and bu.phone like concat('%',#{phone},'%')
+ </if>
+
+ <if test="aoiCodeList != null and aoiCodeList.size() > 0">
+ and jda.aoi_code in
+ <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </if>
+
+ <if test="householdId != null ">and jut.household_id = #{householdId}</if>
+ <if test="topicsId != null ">and jut.topics_id = #{topicsId}</if>
+ <if test="createTime != null ">and jut.create_time = #{createTime}</if>
+ <if test="updateTime != null ">and jut.update_time = #{updateTime}</if>
+ <if test="deleteFlag != null ">and jut.delete_flag = #{deleteFlag}</if>
+ <if test="articleId != null ">
+ and jut.article_id = #{articleId}
+ and jut.delete_flag = 0
+ </if>
+ </where>
+
+ </select>
+ <select id="getHouseholdList" resultType="org.springblade.modules.discuss.excel.householdExcel">
+ SELECT
+ DISTINCT(jh.id),
+ jh.*,
+ (
+ SELECT
+ group_concat( jt.option_content ) AS optionContent
+ FROM
+ jczz_user_topics jut
+ LEFT JOIN jczz_topics jt ON jt.id = jut.topics_id
+ WHERE
+ jut.house_code = jh.house_code
+ AND jut.article_id = #{articleId}
+ ) selectd
+ FROM
+ jczz_house jh
+ LEFT JOIN jczz_household jhd ON jhd.house_code = jh.house_code
+ AND jh.is_deleted = 0
+ LEFT JOIN jczz_user_topics jut on jut.household_id = jhd.id
+ <where>
+ <if test="districtIdList != null and districtIdList.size() > 0">
+ and jh.district_code in
+ <foreach collection="districtIdList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </if>
+ </where>
+ </select>
+
+
</mapper>
--
Gitblit v1.9.3