Browse Source

Merge remote-tracking branch 'origin/dev_group_act_notice' into dev_temp

master
zxc 4 years ago
parent
commit
2d169aafd9
  1. 20
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

20
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -622,7 +622,7 @@
COUNT( 1 ) AS unRead
FROM act_read_record
WHERE DEL_FLAG = 0
AND `READ_FLAG` = 'un_read'
AND `VIEW_DETAIL` = 'un_read'
AND USER_ID = #{userId}
AND GROUP_ID = #{groupId})
UNION ALL
@ -630,7 +630,7 @@
COUNT( 1 ) AS unRead
FROM notice_read_record
WHERE DEL_FLAG = 0
AND READ_FLAG = 'un_read'
AND VIEW_DETAIL = 'un_read'
AND USER_ID = #{userId}
AND GROUP_ID = #{groupId})) temp
</select>
@ -638,7 +638,7 @@
<!-- 查询阅读状态 -->
<select id="selectUserReadFlag" resultType="com.epmet.resi.group.dto.group.result.UserReadFlagResultDTO">
(SELECT
READ_FLAG,
VIEW_DETAIL AS readFlag,
USER_ID,
GROUP_ACT_ID AS id
FROM act_read_record
@ -653,7 +653,7 @@
)
UNION ALL
(SELECT
READ_FLAG,
VIEW_DETAIL AS readFlag,
USER_ID,
NOTICE_ID AS id
FROM notice_read_record
@ -680,7 +680,7 @@
GROUP_ACT_ID = #{id}
</foreach>
)
AND `READ_FLAG` = 'un_read'
AND `VIEW_DETAIL` = 'un_read'
AND GROUP_ID = #{groupId}
GROUP BY GROUP_ACT_ID
)
@ -695,7 +695,7 @@
NOTICE_ID = #{id}
</foreach>
)
AND `READ_FLAG` = 'un_read'
AND `VIEW_DETAIL` = 'un_read'
AND GROUP_ID = #{groupId}
GROUP BY NOTICE_ID
)
@ -708,7 +708,7 @@
GROUP_ACT_ID AS id
FROM act_read_record
WHERE DEL_FLAG = 0
AND READ_FLAG = 'un_read'
AND VIEW_DETAIL = 'un_read'
AND USER_ID = #{userId}
AND GROUP_ID = #{groupId}
)
@ -718,7 +718,7 @@
NOTICE_ID AS id
FROM notice_read_record
WHERE DEL_FLAG = 0
AND READ_FLAG = 'un_read'
AND VIEW_DETAIL = 'un_read'
AND USER_ID = #{userId}
AND GROUP_ID = #{groupId}
)
@ -849,7 +849,7 @@
<!-- 根据用户ID和【活动、通知ID】查询阅读状态 -->
<select id="selectReadFlagByUserAndId" resultType="com.epmet.resi.group.dto.notice.result.ReadStatusResultDTO">
(SELECT USER_ID, read_flag, GROUP_ACT_ID AS id
(SELECT USER_ID, VIEW_DETAIL AS readFlag, GROUP_ACT_ID AS id
FROM act_read_record WHERE DEL_FLAG = 0
AND (
<foreach collection="userIds" item="userId" separator=" OR ">
@ -863,7 +863,7 @@
)
)
UNION ALL
(SELECT USER_ID, read_flag, NOTICE_ID AS id
(SELECT USER_ID, VIEW_DETAIL AS readFlag, NOTICE_ID AS id
FROM notice_read_record WHERE DEL_FLAG = 0
AND (
<foreach collection="userIds" item="userId" separator=" OR ">

Loading…
Cancel
Save