|
|
@ -382,7 +382,9 @@ |
|
|
|
rt.topic_content AS topicContent, |
|
|
|
rt.created_by AS publishedUser, |
|
|
|
UNIX_TIMESTAMP(rt.created_time) AS publishedTime, |
|
|
|
rg.group_type AS groupType |
|
|
|
rg.group_type AS groupType, |
|
|
|
rg.id as groupId, |
|
|
|
rg.GROUP_NAME as groupName |
|
|
|
FROM |
|
|
|
resi_topic rt |
|
|
|
LEFT JOIN resi_group rg ON rt.group_id = rg.id |
|
|
@ -414,6 +416,7 @@ |
|
|
|
<result property="topicContent" column="TOPIC_CONTENT"/> |
|
|
|
<result property="createdBy" column="CREATED_BY" /> |
|
|
|
<result property="groupId" column="GROUP_ID" /> |
|
|
|
<result property="groupName" column="groupName" /> |
|
|
|
<result property="createdTime" column="CREATED_TIME" /> |
|
|
|
<collection property="photoList" ofType="java.lang.String"> |
|
|
|
<constructor> |
|
|
@ -424,29 +427,26 @@ |
|
|
|
|
|
|
|
<!-- 查询话题和附件信息 --> |
|
|
|
<select id="selectTopicAndAttachments" resultMap="govTopicIssueInfoResultMap"> |
|
|
|
SELECT |
|
|
|
topic.ID AS TOPIC_ID, |
|
|
|
topic.TOPIC_CONTENT , |
|
|
|
topic.CREATED_BY , |
|
|
|
topic.GROUP_ID , |
|
|
|
topic.CREATED_TIME , |
|
|
|
attachment.ATTACHMENT_URL |
|
|
|
FROM |
|
|
|
resi_topic topic |
|
|
|
LEFT JOIN |
|
|
|
resi_topic_attachment attachment |
|
|
|
ON |
|
|
|
topic.ID = attachment.TOPIC_ID |
|
|
|
AND |
|
|
|
attachment.DEL_FLAG = '0' |
|
|
|
AND |
|
|
|
attachment.ATTACHMENT_TYPE = 'image' |
|
|
|
WHERE |
|
|
|
topic.DEL_FLAG = '0' |
|
|
|
AND |
|
|
|
topic.ID = #{topicId} |
|
|
|
ORDER BY |
|
|
|
attachment.SORT ASC |
|
|
|
SELECT |
|
|
|
topic.ID AS TOPIC_ID, |
|
|
|
topic.TOPIC_CONTENT, |
|
|
|
topic.CREATED_BY, |
|
|
|
topic.GROUP_ID, |
|
|
|
rg.GROUP_NAME as groupName, |
|
|
|
topic.CREATED_TIME, |
|
|
|
attachment.ATTACHMENT_URL |
|
|
|
FROM |
|
|
|
resi_topic topic |
|
|
|
left join resi_group rg |
|
|
|
on(topic.GROUP_ID=rg.id and rg.DEL_FLAG='0') |
|
|
|
LEFT JOIN resi_topic_attachment attachment ON topic.ID = attachment.TOPIC_ID |
|
|
|
AND attachment.DEL_FLAG = '0' |
|
|
|
AND attachment.ATTACHMENT_TYPE = 'image' |
|
|
|
WHERE |
|
|
|
topic.DEL_FLAG = '0' |
|
|
|
AND topic.ID = #{topicId} |
|
|
|
ORDER BY |
|
|
|
attachment.SORT ASC |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 校验本人是不是话题发起人 --> |
|
|
|