Skip to content

Commit 8790ecf

Browse files
committed
fix(system/notice): 修复我的公告查询到待发布公告的问题
Closes #ID6PDL
1 parent 090412a commit 8790ecf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

continew-system/src/main/resources/mapper/NoticeMapper.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
</if>
2828
WHERE t1.deleted = 0
2929
<if test="query.userId != null">
30+
AND t1.status = 3
3031
<choose>
3132
<when test="_databaseId == 'mysql'">
3233
AND (t1.notice_scope = 1 OR (t1.notice_scope = 2 AND JSON_CONTAINS(t1.notice_users, CONCAT('"', #{query.userId}, '"'))))
@@ -55,7 +56,7 @@
5556
t1.id
5657
FROM sys_notice AS t1
5758
LEFT JOIN sys_notice_log AS t2 ON t2.notice_id = t1.id AND t2.user_id = #{userId}
58-
WHERE t1.deleted = 0
59+
WHERE t1.deleted = 0 AND t1.status = 3
5960
<choose>
6061
<when test="_databaseId == 'mysql'">
6162
AND (t1.notice_scope = 1 OR (t1.notice_scope = 2 AND JSON_CONTAINS(t1.notice_users, CONCAT('"', #{userId}, '"'))))

0 commit comments

Comments
 (0)