refactor: 调整部分 SQL 语句,以兼容 PostgreSQL 数据库
This commit is contained in:
parent
0f393845a1
commit
9f5049bf26
@ -6,7 +6,7 @@
|
|||||||
COUNT(t1.message_id)
|
COUNT(t1.message_id)
|
||||||
FROM sys_message_user AS t1
|
FROM sys_message_user AS t1
|
||||||
LEFT JOIN sys_message AS t2 ON t2.id = t1.message_id
|
LEFT JOIN sys_message AS t2 ON t2.id = t1.message_id
|
||||||
WHERE t1.user_id = #{userId} AND t1.is_read = 0
|
WHERE t1.user_id = #{userId} AND t1.is_read = false
|
||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
AND t2.type = #{type}
|
AND t2.type = #{type}
|
||||||
</if>
|
</if>
|
||||||
|
Loading…
Reference in New Issue
Block a user