refactor: 字典重构完成
This commit is contained in:
@@ -14,14 +14,10 @@
|
||||
t1.publish_status,
|
||||
t1.publish_time,
|
||||
t1.revoke_time,
|
||||
t3.name typeLabel,
|
||||
t4.name levelLabel,
|
||||
t1.create_time
|
||||
FROM
|
||||
sys_notice t1
|
||||
LEFT JOIN sys_user t2 ON t2.id = t1.publisher_id
|
||||
LEFT JOIN sys_dict_data t3 ON t1.type = t3.value AND t3.dict_code = 'notice_type'
|
||||
LEFT JOIN sys_dict_data t4 ON t1.level = t4.value AND t4.dict_code = 'notice_level'
|
||||
WHERE
|
||||
t1.is_deleted = 0
|
||||
<if test="queryParams.title != null and queryParams.title != ''">
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
SELECT
|
||||
t2.id,
|
||||
t2.title,
|
||||
t4.name typeLabel,
|
||||
t3.nickname publisherName,
|
||||
t5.name levelLabel,
|
||||
t2.publish_time,
|
||||
t1.is_read,
|
||||
t2.level
|
||||
@@ -17,8 +15,6 @@
|
||||
sys_user_notice t1
|
||||
INNER JOIN sys_notice t2 ON t1.notice_id = t2.id AND t2.publish_status = 1
|
||||
LEFT JOIN sys_user t3 ON t2.publisher_id = t3.id
|
||||
LEFT JOIN sys_dict_data t4 ON t2.type = t4.value AND t4.dict_code = 'notice_type'
|
||||
LEFT JOIN sys_dict_data t5 ON t2.level = t5.value AND t5.dict_code = 'notice_level'
|
||||
WHERE
|
||||
t1.user_id = #{queryParams.userId} AND t1.is_deleted = 0 AND t2.is_deleted = 0
|
||||
<if test="queryParams.title != null and queryParams.title != ''">
|
||||
|
||||
Reference in New Issue
Block a user