feat: There is no way the,

This commit is contained in:
396572590@qq.com
2022-08-08 16:49:23 +08:00
parent 67c4a1afd9
commit b792f585a4
@@ -140,7 +140,7 @@
LEFT JOIN reply ON aq.ID = reply.ASK_ID
LEFT JOIN ts_user t1 ON t1.USID = aq.QUESTIONER
LEFT JOIN ts_user t2 ON t2.USID = reply.ANSWERER
LEFT JOIN subscription su ON su.ASK_ID = aq.ID
LEFT JOIN subscription su ON su.ASK_ID = aq.ID and su.SUB_STATE = 'y'
<where>
<if test="askQuestions.answerer !=null and askQuestions.answerer !=''">
AND su.USID = #{askQuestions.answerer}
@@ -172,7 +172,10 @@
<if test="askQuestions.type == 'mySub'">
LEFT JOIN subscription su ON su.ASK_ID = aq.ID
</if>
<where>
<where> 1=1
<if test="askQuestions.type == 'mySub'">
AND su.SUB_STATE = 'y'
</if>
<if test="askQuestions.questioner != null and askQuestions.questioner != ''">
AND aq.QUESTIONER =#{askQuestions.questioner}
</if>
@@ -214,7 +217,7 @@
LEFT JOIN reply ON aq.ID = reply.ASK_ID AND reply.STATE = '0'
LEFT JOIN ts_user t1 ON t1.USID = aq.QUESTIONER
LEFT JOIN ts_user t2 ON t2.USID = reply.ANSWERER
LEFT JOIN subscription su ON su.ASK_ID = aq.ID
LEFT JOIN subscription su ON su.ASK_ID = aq.ID and su.SUB_STATE = 'y'
<where>
<if test="askQuestions.answerer !=null and askQuestions.answerer !=''">
AND su.USID = #{askQuestions.answerer}