|
|
@ -643,11 +643,7 @@ |
|
|
|
FROM act_read_record |
|
|
|
WHERE |
|
|
|
DEL_FLAG = 0 |
|
|
|
AND ( |
|
|
|
<foreach collection="userIds" item="userId" separator=" OR "> |
|
|
|
USER_ID = #{userId} |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
AND USER_ID = #{userId} |
|
|
|
AND ( |
|
|
|
<foreach collection="ids" item="id" separator=" OR "> |
|
|
|
GROUP_ACT_ID = #{id} |
|
|
@ -663,11 +659,7 @@ |
|
|
|
FROM notice_read_record |
|
|
|
WHERE |
|
|
|
DEL_FLAG = 0 |
|
|
|
AND ( |
|
|
|
<foreach collection="userIds" item="userId" separator=" OR "> |
|
|
|
USER_ID = #{userId} |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
AND USER_ID = #{userId} |
|
|
|
AND ( |
|
|
|
<foreach collection="ids" item="id" separator=" OR "> |
|
|
|
NOTICE_ID = #{id} |
|
|
@ -735,7 +727,7 @@ |
|
|
|
|
|
|
|
<!-- 查询未读的通知和活动信息 --> |
|
|
|
<select id="selectUnReadInfos" resultType="com.epmet.resi.group.dto.notice.result.UnReadListResultDTO"> |
|
|
|
SELECT id,userId,releaseTime,content,contentType,firstPhoto,isExpirat FROM |
|
|
|
SELECT id,userId,releaseTime,content,contentType,firstPhoto,isExpirat,isChanged FROM |
|
|
|
( |
|
|
|
(SELECT |
|
|
|
ai.ID, |
|
|
@ -744,7 +736,8 @@ |
|
|
|
IFNULL(ai.TITLE,'') AS content, |
|
|
|
'act' AS contentType, |
|
|
|
IFNULL(ac2.CONTENT,'') AS firstPhoto, |
|
|
|
false AS isExpirat |
|
|
|
false AS isExpirat, |
|
|
|
false AS isChanged |
|
|
|
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.SORT = 1 |
|
|
|
WHERE ai.DEL_FLAG = '0' |
|
|
@ -762,7 +755,8 @@ |
|
|
|
n.TITLE AS content, |
|
|
|
'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 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 |
|
|
|
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' |
|
|
|