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 id="selectListByRoleId" resultType="top.continew.admin.system.model.entity.MenuDO">
SELECT t1.* SELECT t1.*
FROM sys_menu AS t1 FROM sys_menu AS t1
LEFT JOIN sys_role_menu AS t2 ON t2.menu_id = t1.id 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 LEFT JOIN sys_role AS t3 ON t3.id = t2.role_id
WHERE t3.id = #{roleId} WHERE t3.id = #{roleId} AND t1.status = 1
AND t1.status = 1
</select> </select>
</mapper> </mapper>

View File

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

View File

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