java110 пре 2 година
родитељ
комит
f4db3da67b

+ 10 - 0
java110-bean/src/main/java/com/java110/dto/questionTitle/QuestionTitleDto.java

@@ -32,6 +32,8 @@ public class QuestionTitleDto extends PageDto implements Serializable {
 
     private String statusCd = "0";
 
+    private String qaId;
+
 
     public String getTitleType() {
         return titleType;
@@ -89,4 +91,12 @@ public class QuestionTitleDto extends PageDto implements Serializable {
     public void setTitleValues(List<QuestionTitleValueDto> titleValues) {
         this.titleValues = titleValues;
     }
+
+    public String getQaId() {
+        return qaId;
+    }
+
+    public void setQaId(String qaId) {
+        this.qaId = qaId;
+    }
 }

+ 12 - 0
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>

+ 1 - 1
java110-db/src/main/resources/mapper/user/UserQuestionAnswerV1ServiceDaoImplMapper.xml

@@ -158,7 +158,7 @@
     </select>
     <select id="queryOwnerQuestionAnswers" parameterType="Map" resultType="Map">
         select qa.qa_name qaName,qa.qa_type qaType,qa.start_time startTime,qa.end_time endTime,qa.remark,
-        qa.community_id communityId,qa.qa_id qaId,td.`name` qaTypeName,
+        qa.community_id communityId,qa.qa_id qaId,td.`name` qaTypeName,qa.content,
         t.owner_name ownerName,t.link,t.room_name roomName
         from user_question_answer t
         left join question_answer qa on t.qa_id = qa.qa_id and qa.status_cd = '0'