Browse Source

党群话题bug修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
a04a0dafb2
  1. 30
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml

30
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml

@ -180,18 +180,26 @@
</if>
left join epdc_party_topic_img t2 on t.ID = t2.REFERENCE_ID and t2.DEL_FLAG='0'
left join (select ID,USERNAME,USER_FACE,PARTY_MEMBER,CONTENT,TOPIC_ID,DEL_FLAG from epdc_party_topic_comment order by CREATED_TIME desc) t3 on t.ID = t3.TOPIC_ID and t3.DEL_FLAG='0'
where t.DEL_FLAG='0' and t.PARTY_GROUP_ID = #{partyGroupId} and t.STATE = '0'
<if test="timestamp != null and timestamp.trim() != ''">
<![CDATA[ AND DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
</if>
<if test="topicType != null and topicType != ''">
and t.TOPIC_MODULE = #{topicType}
</if>
<if test="partyTopicId!=null and partyTopicId != ''">
and t.ID = #{partyTopicId}
</if>
where
t.ID in (select tmp.ID from (SELECT
t1.ID
FROM
epdc_party_topic t1
WHERE
t1.DEL_FLAG = '0' and t1.STATE = '0'
<if test="timestamp != null and timestamp.trim() != ''">
<![CDATA[ AND DATE_FORMAT(t1.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp}
</if>
<if test="topicType != null and topicType != ''">
and t1.TOPIC_MODULE = #{topicType}
</if>
<if test="partyTopicId!=null and partyTopicId != ''">
and t1.ID = #{partyTopicId}
</if>
ORDER BY
t1.CREATED_TIME DESC
LIMIT #{pageIndex},#{pageSize}) tmp)
order by t.CREATED_TIME desc
LIMIT #{pageIndex},#{pageSize}
</select>
<update id="updateCommentNum">

Loading…
Cancel
Save