From a656c28de35fd7027511cfd960d1c85c9a0b56a9 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 28 Nov 2023 18:10:30 +0800
Subject: [PATCH] 便民热线
---
src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml | 46 +++++++++++++++++++++++++++++++---------------
1 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
index d6a9c95..c95330c 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
@@ -73,22 +73,38 @@
</select>
<select id="selectTopicsList" parameterType="org.springblade.modules.discuss.dto.TopicsDTO" resultMap="TopicsDTOResult">
- <include refid="selectTopics"/>
+ SELECT
+ jt.id,
+ jt.discuss_content,
+ jt.option_range,
+ jt.sort,
+ jt.option_content,
+ jt.option_detail,
+ jt.number,
+ jt.create_time,
+ jt.update_time,
+ jt.delete_flag,
+ jt.public_discuss_id,
+ jt.parent_id,
+ jt.LEVEL,
+ ( SELECT jut.selected FROM jczz_user_topics jut WHERE jut.topics_id = jt.id AND jut.user_id = #{userId} ) selected
+ FROM
+ jczz_topics jt
<where>
- <if test="id != null "> and id = #{id}</if>
- <if test="discussContent != null and discussContent != ''"> and discuss_content = #{discussContent}</if>
- <if test="optionRange != null "> and option_range = #{optionRange}</if>
- <if test="sort != null "> and sort = #{sort}</if>
- <if test="optionContent != null and optionContent != ''"> and option_content = #{optionContent}</if>
- <if test="optionDetail != null and optionDetail != ''"> and option_detail = #{optionDetail}</if>
- <if test="number != null "> and number = #{number}</if>
- <if test="createTime != null "> and create_time = #{createTime}</if>
- <if test="updateTime != null "> and update_time = #{updateTime}</if>
- <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
- <if test="publicDiscussId != null "> and public_discuss_id = #{publicDiscussId}</if>
- <if test="parentId != null "> and parent_id = #{parentId}</if>
- <if test="level != null "> and level = #{level}</if>
- and delete_flag = 0
+ <if test="id != null "> and jt.id = #{id}</if>
+ <if test="discussContent != null and discussContent != ''"> and jt.discuss_content = #{discussContent}</if>
+ <if test="optionRange != null "> and jt.option_range = #{optionRange}</if>
+ <if test="sort != null "> and jt.sort = #{sort}</if>
+ <if test="optionContent != null and optionContent != ''"> and jt.option_content = #{optionContent}</if>
+ <if test="optionDetail != null and optionDetail != ''"> and jt.option_detail = #{optionDetail}</if>
+ <if test="number != null "> and jt.number = #{number}</if>
+ <if test="createTime != null "> and jt.create_time = #{createTime}</if>
+ <if test="updateTime != null "> and jt.update_time = #{updateTime}</if>
+ <if test="deleteFlag != null "> and jt.delete_flag = #{deleteFlag}</if>
+ <if test="publicDiscussId != null "> and jt.public_discuss_id = #{publicDiscussId}</if>
+ <if test="parentId != null "> and jt.parent_id = #{parentId}</if>
+ <if test="level != null "> and jt.level = #{level}</if>
+ and jt.delete_flag = 0
</where>
</select>
--
Gitblit v1.9.3