From 0ed29a9b6e7cdeeea5f736d5cbe196849b4f22f7 Mon Sep 17 00:00:00 2001
From: xiaogang <905166056@qq.com>
Date: 星期三, 19 七月 2023 09:40:57 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into xinghong-dev

---
 java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml
index 57397f5..77416c6 100644
--- a/java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/QuestionTitleV1ServiceDaoImplMapper.xml
@@ -20,7 +20,13 @@
         select t.title_type,t.title_type titleType,t.title_id,t.title_id titleId,t.status_cd,t.status_cd
         statusCd,t.community_id,t.community_id communityId,t.qa_title,t.qa_title qaTitle,t.create_time createTime
         from question_title t
+        <if test="qaId !=null and qaId != ''">
+             left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="qaId !=null and qaId != ''">
+             and qatr.qa_id = #{qaId}
+        </if>
         <if test="titleType !=null and titleType != ''">
             and t.title_type= #{titleType}
         </if>
@@ -70,7 +76,13 @@
     <select id="queryQuestionTitlesCount" parameterType="Map" resultType="Map">
         select count(1) count
         from question_title t
+        <if test="qaId !=null and qaId != ''">
+            left join question_answer_title_rel qatr on t.title_id = qatr.title_id and qatr.status_cd = '0'
+        </if>
         where 1 =1
+        <if test="qaId !=null and qaId != ''">
+            and qatr.qa_id = #{qaId}
+        </if>
         <if test="titleType !=null and titleType != ''">
             and t.title_type= #{titleType}
         </if>

--
Gitblit v1.8.0