chore(system): 调整部分代码格式

This commit is contained in:
2025-06-16 21:55:51 +08:00
parent 13c18f1861
commit 35cd63ec7d
3 changed files with 10 additions and 11 deletions

View File

@@ -16,9 +16,8 @@
<select id="selectListByRoleId" resultType="top.continew.admin.system.model.entity.MenuDO">
SELECT t1.*
FROM sys_menu AS t1
LEFT JOIN sys_role_menu AS t2 ON t2.menu_id = t1.id
LEFT JOIN sys_role AS t3 ON t3.id = t2.role_id
WHERE t3.id = #{roleId}
AND t1.status = 1
LEFT JOIN sys_role_menu AS t2 ON t2.menu_id = t1.id
LEFT JOIN sys_role AS t3 ON t3.id = t2.role_id
WHERE t3.id = #{roleId} AND t1.status = 1
</select>
</mapper>

View File

@@ -14,7 +14,7 @@
t2.read_time IS NOT NULL AS isRead,
t2.read_time AS readTime
FROM sys_message AS t1
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id
<where>
<if test="query.userId != null">
(t1.scope = 1 OR (t1.scope = 2 AND JSON_EXTRACT(t1.users, "$[0]") = CAST(#{query.userId} AS CHAR)))
@@ -45,7 +45,7 @@
t2.read_time IS NOT NULL AS isRead,
t2.read_time AS readTime
FROM sys_message AS t1
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id
WHERE t1.id = #{id}
</select>
@@ -53,7 +53,7 @@
SELECT
t1.*
FROM sys_message AS t1
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id AND t2.user_id = #{userId}
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id AND t2.user_id = #{userId}
WHERE (t1.scope = 1 OR (t1.scope = 2 AND JSON_CONTAINS(t1.users, CONCAT('"', #{userId}, '"'))))
AND t2.read_time IS NULL
</select>
@@ -62,11 +62,11 @@
SELECT
COUNT(1)
FROM sys_message AS t1
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id AND t2.user_id = #{userId}
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id AND t2.user_id = #{userId}
WHERE (t1.scope = 1 OR (t1.scope = 2 AND JSON_CONTAINS(t1.users, CONCAT('"', #{userId}, '"'))))
AND t2.read_time IS NULL
<if test="type != null">
<if test="type != null">
AND t1.type = #{type}
</if>
</if>
</select>
</mapper>

View File

@@ -43,7 +43,7 @@
<select id="selectUnreadIdsByUserId" resultType="java.lang.Long">
SELECT
t1.id
t1.id
FROM sys_notice AS t1
LEFT JOIN sys_notice_log AS t2 ON t2.notice_id = t1.id AND t2.user_id = #{userId}
WHERE (t1.notice_scope = 1 OR (t1.notice_scope = 2 AND JSON_CONTAINS(t1.notice_users, CONCAT('"', #{userId}, '"'))))