|
|
@ -730,7 +730,7 @@ |
|
|
|
|
|
|
|
<!-- 查询未读的通知和活动信息 --> |
|
|
|
<select id="selectUnReadInfos" resultType="com.epmet.resi.group.dto.notice.result.UnReadListResultDTO"> |
|
|
|
SELECT id,userId,releaseTime,content,contentType,firstPhoto,isExpirat,isChanged FROM |
|
|
|
SELECT id,userId,releaseTime,content,contentType,firstPhoto,isExpirat,isChanged,status FROM |
|
|
|
( |
|
|
|
(SELECT |
|
|
|
ai.ID, |
|
|
@ -743,7 +743,8 @@ |
|
|
|
(case |
|
|
|
when ai.`STATUS`='published' and ai.IS_CHANGE='yes' then true |
|
|
|
else false |
|
|
|
end )as isChanged |
|
|
|
end )as isChanged, |
|
|
|
ai.`STATUS` AS status |
|
|
|
FROM group_act_info ai |
|
|
|
LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 |
|
|
|
WHERE ai.DEL_FLAG = '0' |
|
|
@ -762,7 +763,8 @@ |
|
|
|
'notice' AS contentType, |
|
|
|
IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, |
|
|
|
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat, |
|
|
|
(case when n.is_change = 'yes' then true else false end) AS isChanged |
|
|
|
(case when n.is_change = 'yes' then true else false end) AS isChanged, |
|
|
|
'' AS status |
|
|
|
FROM notice n |
|
|
|
LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 |
|
|
|
WHERE n.DEL_FLAG = '0' |
|
|
@ -794,7 +796,7 @@ |
|
|
|
</select> |
|
|
|
<!-- 根据IDs查询 topic,act,notice信息 --> |
|
|
|
<select id="getPastTopicListV2ByIds" resultType="com.epmet.resi.group.dto.topic.result.GetPastTopicListV2ResultDTO"> |
|
|
|
SELECT id,userId,releaseTime,content,status,issueId,contentType,isExpirat,isChanged FROM |
|
|
|
SELECT id,userId,releaseTime,content,status,issueId,contentType,isExpirat,isChanged,firstPhoto FROM |
|
|
|
((SELECT |
|
|
|
t.ID, |
|
|
|
t.CREATED_BY AS userId, |
|
|
@ -804,8 +806,10 @@ |
|
|
|
IFNULL(t.ISSUE_ID,'') AS issueId, |
|
|
|
'topic' AS contentType, |
|
|
|
false AS isExpirat, |
|
|
|
false AS isChanged |
|
|
|
false AS isChanged, |
|
|
|
IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto |
|
|
|
FROM resi_topic t |
|
|
|
LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.DEL_FLAG = '0' AND ta.SORT = 0 |
|
|
|
WHERE t.DEL_FLAG = '0' |
|
|
|
AND t.`STATUS` != 'hidden' |
|
|
|
AND ( |
|
|
@ -827,8 +831,10 @@ |
|
|
|
(case |
|
|
|
when ai.`STATUS`='published' and ai.IS_CHANGE='yes' then true |
|
|
|
else false |
|
|
|
end )as isChanged |
|
|
|
end )as isChanged, |
|
|
|
IFNULL(ac2.CONTENT,'') AS firstPhoto |
|
|
|
FROM group_act_info ai |
|
|
|
LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 |
|
|
|
WHERE ai.DEL_FLAG = '0' |
|
|
|
AND ( |
|
|
|
<foreach collection="ids" item="id" separator=" OR "> |
|
|
@ -846,8 +852,10 @@ |
|
|
|
'' AS issueId, |
|
|
|
'notice' AS contentType, |
|
|
|
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat, |
|
|
|
(case when n.is_change = 'yes' then true else false end) AS isChanged |
|
|
|
(case when n.is_change = 'yes' then true else false end) AS isChanged, |
|
|
|
IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto |
|
|
|
FROM notice n |
|
|
|
LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 |
|
|
|
WHERE n.DEL_FLAG = '0' |
|
|
|
AND ( |
|
|
|
<foreach collection="ids" item="id" separator=" OR "> |
|
|
|