From 251e1278f1155dd4067110a084213281e0416060 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Tue, 16 Jan 2024 10:58:42 +0800 Subject: [PATCH] Rename tables --- doc/database.drawio | 1202 ++++++++--------- .../oxygen/api/entity/permission/Func.kt | 2 +- .../oxygen/api/entity/permission/Group.kt | 2 +- .../oxygen/api/entity/permission/Menu.kt | 2 +- .../oxygen/api/entity/permission/Module.kt | 2 +- .../oxygen/api/entity/permission/Operation.kt | 2 +- .../oxygen/api/entity/permission/Power.kt | 2 +- .../oxygen/api/entity/permission/PowerRole.kt | 2 +- .../oxygen/api/entity/permission/PowerType.kt | 2 +- .../oxygen/api/entity/permission/Role.kt | 2 +- .../oxygen/api/entity/permission/RoleGroup.kt | 2 +- .../oxygen/api/entity/permission/User.kt | 2 +- .../oxygen/api/entity/permission/UserGroup.kt | 2 +- .../oxygen/api/entity/permission/UserInfo.kt | 2 +- .../oxygen/api/entity/permission/UserRole.kt | 2 +- .../oxygen/api/entity/system/EventLog.kt | 2 +- .../oxygen/api/entity/system/SensitiveWord.kt | 2 +- .../oxygen/api/entity/system/StatisticsLog.kt | 2 +- .../fatweb/oxygen/api/entity/system/SysLog.kt | 2 +- .../system/impl/SensitiveWordServiceImpl.kt | 2 - .../db/migration/master/R__Basic_data.sql | 14 +- .../V1_0_0_231019__Add_table_'t_s_user'.sql | 25 + .../V1_0_0_231019__Add_table_'t_user'.sql | 25 - ...1_0_0_231023__Add_table_'t_power_type'.sql | 7 - ...0_0_231023__Add_table_'t_s_power_type'.sql | 7 + .../V1_0_0_231024__Add_table_'t_power'.sql | 7 - .../V1_0_0_231024__Add_table_'t_s_power'.sql | 7 + ...> V1_0_0_231025__Add_table_'t_s_menu'.sql} | 6 +- ...> V1_0_0_231026__Add_table_'t_s_func'.sql} | 6 +- ...V1_0_0_231027__Add_table_'t_operation'.sql | 9 - ..._0_0_231027__Add_table_'t_s_operation'.sql | 9 + .../V1_0_0_231028__Add_table_'t_group'.sql | 13 - .../V1_0_0_231028__Add_table_'t_s_group'.sql | 13 + ..._0_231029__Add_table_'t_r_user_group'.sql} | 6 +- .../V1_0_0_231030__Add_table_'t_role'.sql | 13 - .../V1_0_0_231030__Add_table_'t_s_role'.sql | 13 + ..._0_231031__Add_table_'t_r_role_group'.sql} | 6 +- ...0_0_231101__Add_table_'t_r_user_role'.sql} | 6 +- ..._0_231102__Add_table_'t_r_power_role'.sql} | 6 +- .../V1_0_0_231103__Add_table_'t_module'.sql | 7 - .../V1_0_0_231103__Add_table_'t_s_module'.sql | 7 + ...0_0_231104__Add_table_'t_s_user_info'.sql} | 10 +- ...240103__Add_table_‘t_s_sensitive_word'.sql | 12 + ...1_0_0_231212__Add_table_'t_l_sys_log'.sql} | 4 +- ...0_0_231213__Add_table_'t_l_event_log'.sql} | 4 +- ...31214__Add_table_'t_l_statistics_log'.sql} | 4 +- ...0_240103__Add_table_‘t_sensitive_word'.sql | 9 - .../mapper/permission/GroupMapper.xml | 78 +- .../mapper/permission/RoleMapper.xml | 129 +- .../mapper/permission/UserMapper.xml | 402 +++--- .../resources/mapper/system/SysLogMapper.xml | 42 +- 51 files changed, 1074 insertions(+), 1072 deletions(-) create mode 100644 src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_s_user'.sql delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_user'.sql delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_power_type'.sql create mode 100644 src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_s_power_type'.sql delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_power'.sql create mode 100644 src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_s_power'.sql rename src/main/resources/db/migration/master/{V1_0_0_231025__Add_table_'t_menu'.sql => V1_0_0_231025__Add_table_'t_s_menu'.sql} (73%) rename src/main/resources/db/migration/master/{V1_0_0_231026__Add_table_'t_func'.sql => V1_0_0_231026__Add_table_'t_s_func'.sql} (68%) delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_operation'.sql create mode 100644 src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_s_operation'.sql delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_group'.sql create mode 100644 src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_s_group'.sql rename src/main/resources/db/migration/master/{V1_0_0_231029__Add_table_'t_user_group'.sql => V1_0_0_231029__Add_table_'t_r_user_group'.sql} (63%) delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_role'.sql create mode 100644 src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_s_role'.sql rename src/main/resources/db/migration/master/{V1_0_0_231031__Add_table_'t_role_group'.sql => V1_0_0_231031__Add_table_'t_r_role_group'.sql} (63%) rename src/main/resources/db/migration/master/{V1_0_0_231101__Add_table_'t_user_role'.sql => V1_0_0_231101__Add_table_'t_r_user_role'.sql} (63%) rename src/main/resources/db/migration/master/{V1_0_0_231102__Add_table_'t_power_role'.sql => V1_0_0_231102__Add_table_'t_r_power_role'.sql} (64%) delete mode 100644 src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_module'.sql create mode 100644 src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_s_module'.sql rename src/main/resources/db/migration/master/{V1_0_0_231104__Add_table_'t_user_info'.sql => V1_0_0_231104__Add_table_'t_s_user_info'.sql} (68%) create mode 100644 src/main/resources/db/migration/master/V1_0_0_240103__Add_table_‘t_s_sensitive_word'.sql rename src/main/resources/db/migration/sqlite/{V1_0_0_231212__Add_table_'t_sys_log'.sql => V1_0_0_231212__Add_table_'t_l_sys_log'.sql} (94%) rename src/main/resources/db/migration/sqlite/{V1_0_0_231213__Add_table_'t_event_log'.sql => V1_0_0_231213__Add_table_'t_l_event_log'.sql} (77%) rename src/main/resources/db/migration/sqlite/{V1_0_0_231214__Add_table_'t_statistics_log'.sql => V1_0_0_231214__Add_table_'t_l_statistics_log'.sql} (74%) delete mode 100644 src/main/resources/db/migration/sqlite/V1_0_0_240103__Add_table_‘t_sensitive_word'.sql diff --git a/doc/database.drawio b/doc/database.drawio index 7b56815..007b0d0 100644 --- a/doc/database.drawio +++ b/doc/database.drawio @@ -1,871 +1,871 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - - + + - + + + + - - - + + + - - + + - - - - + - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + - - - + + + - + - - - + + + - - - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - - - + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - - - - + - - - + + + - - + + - + + + + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - - + + - + + + + - - - + + + - - + + - + - - - + + + - - + + - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -874,7 +874,7 @@ - + @@ -883,7 +883,7 @@ - + @@ -892,49 +892,49 @@ - + - + - + - + - + - + - + - + - + @@ -943,7 +943,7 @@ - + @@ -952,7 +952,7 @@ - + @@ -961,13 +961,13 @@ - + - + diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Func.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Func.kt index 78014e0..61fa701 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Func.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Func.kt @@ -11,7 +11,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_func") +@TableName("t_s_func") class Func : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Group.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Group.kt index 480f857..5d779ad 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Group.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Group.kt @@ -10,7 +10,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_group") +@TableName("t_s_group") class Group : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Menu.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Menu.kt index a3f982e..d81e235 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Menu.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Menu.kt @@ -11,7 +11,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_menu") +@TableName("t_s_menu") class Menu : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Module.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Module.kt index eac5aa7..fa26a28 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Module.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Module.kt @@ -11,7 +11,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_module") +@TableName("t_s_module") class Module : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Operation.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Operation.kt index 05740b4..c111ce6 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Operation.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Operation.kt @@ -11,7 +11,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_operation") +@TableName("t_s_operation") class Operation : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Power.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Power.kt index 3ebe80a..4f1a7a0 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Power.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Power.kt @@ -11,7 +11,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_power") +@TableName("t_s_power") class Power : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerRole.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerRole.kt index 915eb5a..d99b9a1 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerRole.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerRole.kt @@ -9,7 +9,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_power_role") +@TableName("t_r_power_role") class PowerRole : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerType.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerType.kt index 676588c..c2be1e4 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerType.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/PowerType.kt @@ -11,7 +11,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_power_type") +@TableName("t_s_power_type") class PowerType : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Role.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Role.kt index 32ba4fe..e5175fc 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Role.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/Role.kt @@ -10,7 +10,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_role") +@TableName("t_s_role") class Role : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/RoleGroup.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/RoleGroup.kt index 149e31a..a6363f2 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/RoleGroup.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/RoleGroup.kt @@ -9,7 +9,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_role_group") +@TableName("t_r_role_group") class RoleGroup : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/User.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/User.kt index 67b6592..905178f 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/User.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/User.kt @@ -10,7 +10,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_user") +@TableName("t_s_user") class User() : Serializable { constructor(id: Long?, username: String, password: String, enable: Boolean = true) : this() { this.id = id diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserGroup.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserGroup.kt index ae8c102..408a75c 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserGroup.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserGroup.kt @@ -9,7 +9,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_user_group") +@TableName("t_r_user_group") class UserGroup : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserInfo.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserInfo.kt index f1cb26e..8aa8e24 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserInfo.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserInfo.kt @@ -10,7 +10,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_user_info") +@TableName("t_s_user_info") class UserInfo : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserRole.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserRole.kt index de09ff6..cc4b99b 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserRole.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/permission/UserRole.kt @@ -9,7 +9,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_user_role") +@TableName("t_r_user_role") class UserRole : Serializable { /** * ID diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/EventLog.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/EventLog.kt index a719457..c689547 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/EventLog.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/EventLog.kt @@ -15,7 +15,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_event_log") +@TableName("t_l_event_log") class EventLog : Serializable { enum class Event(@field:EnumValue @field:JsonValue val code: String) { LOGIN("LOGIN"), LOGOUT("LOGOUT"), REGISTER("REGISTER"), VERIFY("VERIFY"), API("API") diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SensitiveWord.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SensitiveWord.kt index a38413a..a024d6e 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SensitiveWord.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SensitiveWord.kt @@ -14,7 +14,7 @@ import java.io.Serializable * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_sensitive_word", autoResultMap = true) +@TableName("t_s_sensitive_word", autoResultMap = true) class SensitiveWord : Serializable { enum class Use(@field:EnumValue @field:JsonValue val code: String) { USERNAME("USERNAME"), TITLE("TITLE"); diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/StatisticsLog.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/StatisticsLog.kt index 7ba87a6..165a2c4 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/StatisticsLog.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/StatisticsLog.kt @@ -15,7 +15,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_statistics_log") +@TableName("t_l_statistics_log") class StatisticsLog : Serializable { enum class KeyItem(@field:EnumValue @field:JsonValue val code: String) { ONLINE_USERS_COUNT("ONLINE_USER_COUNT") diff --git a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SysLog.kt b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SysLog.kt index b557357..b17e2fa 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SysLog.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/entity/system/SysLog.kt @@ -15,7 +15,7 @@ import java.time.LocalDateTime * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@TableName("t_sys_log") +@TableName("t_l_sys_log") class SysLog : Serializable { /** * Log type enum diff --git a/src/main/kotlin/top/fatweb/oxygen/api/service/system/impl/SensitiveWordServiceImpl.kt b/src/main/kotlin/top/fatweb/oxygen/api/service/system/impl/SensitiveWordServiceImpl.kt index f95a233..e279160 100644 --- a/src/main/kotlin/top/fatweb/oxygen/api/service/system/impl/SensitiveWordServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/oxygen/api/service/system/impl/SensitiveWordServiceImpl.kt @@ -1,6 +1,5 @@ package top.fatweb.oxygen.api.service.system.impl -import com.baomidou.dynamic.datasource.annotation.DS import com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper import com.baomidou.mybatisplus.extension.kotlin.KtUpdateWrapper import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl @@ -22,7 +21,6 @@ import top.fatweb.oxygen.api.vo.system.SensitiveWordVo * @author FatttSnake, fatttsnake@gmail.com * @since 1.0.0 */ -@DS("sqlite") @Service class SensitiveWordServiceImpl : ServiceImpl(), ISensitiveWordService { @Transactional(propagation = Propagation.REQUIRES_NEW) diff --git a/src/main/resources/db/migration/master/R__Basic_data.sql b/src/main/resources/db/migration/master/R__Basic_data.sql index ce4e4a4..71f9147 100644 --- a/src/main/resources/db/migration/master/R__Basic_data.sql +++ b/src/main/resources/db/migration/master/R__Basic_data.sql @@ -1,11 +1,11 @@ -insert into t_power_type (id, name) +insert into t_s_power_type (id, name) values (1, 'module'), (2, 'menu'), (3, 'func'), (4, 'operation') as new_value on duplicate key update name = new_value.name; -insert into t_power (id, type_id) +insert into t_s_power (id, type_id) values (1000000, 1), (1990000, 2), (1010000, 2), @@ -70,11 +70,11 @@ insert into t_power (id, type_id) as new_value on duplicate key update type_id = new_value.type_id; -insert into t_module (id, name) +insert into t_s_module (id, name) values (1000000, '系统') as new_value -on duplicate key update name = new_value.name; +on duplicate key update name = new_value.name; -insert into t_menu (id, name, url, parent_id, module_id) +insert into t_s_menu (id, name, url, parent_id, module_id) values (1990000, '系统管理', '/system', null, 1000000), (1010000, '用户管理', '/system/user', 1990000, 1000000), (1020000, '角色管理', '/system/role', 1990000, 1000000), @@ -87,7 +87,7 @@ on duplicate key update name =new_value.name, url =new_value.url, parent_id =new_value.parent_id; -insert into t_func(id, name, menu_id, parent_id) +insert into t_s_func(id, name, menu_id, parent_id) values (1010100, '查询', 1010000, null), (1010200, '增加', 1010000, null), (1010300, '修改', 1010000, null), @@ -109,7 +109,7 @@ on duplicate key update name = new_value.name, menu_id = new_value.menu_id, parent_id = new_value.parent_id; -insert into t_operation(id, name, code, func_id) +insert into t_s_operation(id, name, code, func_id) values (1010101, '单个', 'system:user:query:one', 1010100), (1010102, '全部', 'system:user:query:all', 1010100), (1010103, '列表', 'system:user:query:list', 1010100), diff --git a/src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_s_user'.sql b/src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_s_user'.sql new file mode 100644 index 0000000..9e2287d --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_s_user'.sql @@ -0,0 +1,25 @@ +drop table if exists t_s_user; + +create table if not exists t_s_user +( + id bigint not null primary key, + username varchar(20) not null comment '用户名', + password char(70) not null comment '密码', + verify varchar(144) null comment '验证邮箱', + forget varchar(144) null comment '忘记密码', + locking int not null comment '锁定', + expiration datetime comment '过期时间', + credentials_expiration datetime comment '认证过期时间', + enable int not null comment '启用', + current_login_time datetime comment '当前登录时间', + current_login_ip varchar(128) comment '当前登录 IP', + last_login_time datetime comment '上次登录时间', + last_login_ip varchar(128) comment '上次登录 IP', + create_time datetime not null default (utc_timestamp()) comment '创建时间', + update_time datetime not null default (utc_timestamp()) comment '修改时间', + deleted bigint not null default 0, + version int not null default 0, + constraint t_s_user_unique_username unique (username, deleted), + constraint t_s_user_unique_verify unique (verify, deleted), + constraint t_s_user_unique_forget unique (forget, deleted) +) comment '系统-用户表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_user'.sql b/src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_user'.sql deleted file mode 100644 index f00170d..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231019__Add_table_'t_user'.sql +++ /dev/null @@ -1,25 +0,0 @@ -drop table if exists t_user; - -create table if not exists t_user -( - id bigint not null primary key, - username varchar(20) not null comment '用户名', - password char(70) not null comment '密码', - verify varchar(144) null comment '验证邮箱', - forget varchar(144) null comment '忘记密码', - locking int not null comment '锁定', - expiration datetime comment '过期时间', - credentials_expiration datetime comment '认证过期时间', - enable int not null comment '启用', - current_login_time datetime comment '当前登录时间', - current_login_ip varchar(128) comment '当前登录 IP', - last_login_time datetime comment '上次登录时间', - last_login_ip varchar(128) comment '上次登录 IP', - create_time datetime not null default (utc_timestamp()) comment '创建时间', - update_time datetime not null default (utc_timestamp()) comment '修改时间', - deleted bigint not null default 0, - version int not null default 0, - constraint t_user_unique_username unique (username, deleted), - constraint t_user_unique_verify unique (verify, deleted), - constraint t_user_unique_forget unique (forget, deleted) -) comment '用户表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_power_type'.sql b/src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_power_type'.sql deleted file mode 100644 index 0ac9660..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_power_type'.sql +++ /dev/null @@ -1,7 +0,0 @@ -drop table if exists t_power_type; - -create table if not exists t_power_type -( - id bigint not null primary key, - name varchar(50) not null comment '权限类型名' -) comment '权限类型表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_s_power_type'.sql b/src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_s_power_type'.sql new file mode 100644 index 0000000..8544453 --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231023__Add_table_'t_s_power_type'.sql @@ -0,0 +1,7 @@ +drop table if exists t_s_power_type; + +create table if not exists t_s_power_type +( + id bigint not null primary key, + name varchar(50) not null comment '权限类型名' +) comment '系统-权限类型表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_power'.sql b/src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_power'.sql deleted file mode 100644 index c6f1135..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_power'.sql +++ /dev/null @@ -1,7 +0,0 @@ -drop table if exists t_power; - -create table if not exists t_power -( - id bigint not null primary key, - type_id int not null comment '权限类型' -) comment '权限表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_s_power'.sql b/src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_s_power'.sql new file mode 100644 index 0000000..1407a9b --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231024__Add_table_'t_s_power'.sql @@ -0,0 +1,7 @@ +drop table if exists t_s_power; + +create table if not exists t_s_power +( + id bigint not null primary key, + type_id int not null comment '权限类型' +) comment '系统-权限表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231025__Add_table_'t_menu'.sql b/src/main/resources/db/migration/master/V1_0_0_231025__Add_table_'t_s_menu'.sql similarity index 73% rename from src/main/resources/db/migration/master/V1_0_0_231025__Add_table_'t_menu'.sql rename to src/main/resources/db/migration/master/V1_0_0_231025__Add_table_'t_s_menu'.sql index 42135de..6b8de95 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231025__Add_table_'t_menu'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231025__Add_table_'t_s_menu'.sql @@ -1,10 +1,10 @@ -drop table if exists t_menu; +drop table if exists t_s_menu; -create table if not exists t_menu +create table if not exists t_s_menu ( id bigint not null primary key, name varchar(30) not null comment ' 菜单名', url varchar(100) null comment 'URL', parent_id bigint null comment '父ID', module_id bigint not null comment '模块ID' -) comment '菜单表'; \ No newline at end of file +) comment '系统-菜单表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231026__Add_table_'t_func'.sql b/src/main/resources/db/migration/master/V1_0_0_231026__Add_table_'t_s_func'.sql similarity index 68% rename from src/main/resources/db/migration/master/V1_0_0_231026__Add_table_'t_func'.sql rename to src/main/resources/db/migration/master/V1_0_0_231026__Add_table_'t_s_func'.sql index 4951d9f..0f5f33f 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231026__Add_table_'t_func'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231026__Add_table_'t_s_func'.sql @@ -1,9 +1,9 @@ -drop table if exists t_func; +drop table if exists t_s_func; -create table if not exists t_func +create table if not exists t_s_func ( id bigint not null primary key, name varchar(100) not null comment '功能名', parent_id bigint null comment '父ID', menu_id bigint not null comment '菜单ID' -) comment '功能表'; \ No newline at end of file +) comment '系统-功能表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_operation'.sql b/src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_operation'.sql deleted file mode 100644 index 4ffe588..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_operation'.sql +++ /dev/null @@ -1,9 +0,0 @@ -drop table if exists t_operation; - -create table if not exists t_operation -( - id bigint not null primary key, - name varchar(50) not null comment '操作名', - code varchar(50) null comment '操作编码', - func_id bigint not null comment '功能ID' -) comment '操作表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_s_operation'.sql b/src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_s_operation'.sql new file mode 100644 index 0000000..a527025 --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231027__Add_table_'t_s_operation'.sql @@ -0,0 +1,9 @@ +drop table if exists t_s_operation; + +create table if not exists t_s_operation +( + id bigint not null primary key, + name varchar(50) not null comment '操作名', + code varchar(50) null comment '操作编码', + func_id bigint not null comment '功能ID' +) comment '系统-操作表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_group'.sql b/src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_group'.sql deleted file mode 100644 index 9d0c6fb..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_group'.sql +++ /dev/null @@ -1,13 +0,0 @@ -drop table if exists t_group; - -create table if not exists t_group -( - id bigint not null primary key, - name varchar(30) not null comment '用户组名', - enable int not null comment '启用', - create_time datetime not null default (utc_timestamp()) comment '创建时间', - update_time datetime not null default (utc_timestamp()) comment '修改时间', - deleted bigint not null default 0, - version int not null default 0, - constraint t_group_unique unique (name, deleted) -) comment '用户组表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_s_group'.sql b/src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_s_group'.sql new file mode 100644 index 0000000..6168a2b --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231028__Add_table_'t_s_group'.sql @@ -0,0 +1,13 @@ +drop table if exists t_s_group; + +create table if not exists t_s_group +( + id bigint not null primary key, + name varchar(30) not null comment '用户组名', + enable int not null comment '启用', + create_time datetime not null default (utc_timestamp()) comment '创建时间', + update_time datetime not null default (utc_timestamp()) comment '修改时间', + deleted bigint not null default 0, + version int not null default 0, + constraint t_s_group_unique unique (name, deleted) +) comment '系统-用户组表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231029__Add_table_'t_user_group'.sql b/src/main/resources/db/migration/master/V1_0_0_231029__Add_table_'t_r_user_group'.sql similarity index 63% rename from src/main/resources/db/migration/master/V1_0_0_231029__Add_table_'t_user_group'.sql rename to src/main/resources/db/migration/master/V1_0_0_231029__Add_table_'t_r_user_group'.sql index 27ede64..969c3a7 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231029__Add_table_'t_user_group'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231029__Add_table_'t_r_user_group'.sql @@ -1,10 +1,10 @@ -drop table if exists t_user_group; +drop table if exists t_r_user_group; -create table if not exists t_user_group +create table if not exists t_r_user_group ( id bigint not null primary key, user_id bigint not null comment '用户', group_id bigint not null comment '用户组', deleted bigint not null default 0, version int not null default 0 -) comment '中间表-用户-用户组'; \ No newline at end of file +) comment '中间表-系统-用户-用户组'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_role'.sql b/src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_role'.sql deleted file mode 100644 index 98d96de..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_role'.sql +++ /dev/null @@ -1,13 +0,0 @@ -drop table if exists t_role; - -create table if not exists t_role -( - id bigint not null primary key, - name varchar(20) not null comment '角色名', - enable int not null comment '启用', - create_time datetime not null default (utc_timestamp()) comment '创建时间', - update_time datetime not null default (utc_timestamp()) comment '修改时间', - deleted bigint not null default 0, - version int not null default 0, - constraint t_role_unique unique (name, deleted) -) comment '角色表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_s_role'.sql b/src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_s_role'.sql new file mode 100644 index 0000000..d553aea --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231030__Add_table_'t_s_role'.sql @@ -0,0 +1,13 @@ +drop table if exists t_s_role; + +create table if not exists t_s_role +( + id bigint not null primary key, + name varchar(20) not null comment '角色名', + enable int not null comment '启用', + create_time datetime not null default (utc_timestamp()) comment '创建时间', + update_time datetime not null default (utc_timestamp()) comment '修改时间', + deleted bigint not null default 0, + version int not null default 0, + constraint t_s_role_unique unique (name, deleted) +) comment '系统-角色表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231031__Add_table_'t_role_group'.sql b/src/main/resources/db/migration/master/V1_0_0_231031__Add_table_'t_r_role_group'.sql similarity index 63% rename from src/main/resources/db/migration/master/V1_0_0_231031__Add_table_'t_role_group'.sql rename to src/main/resources/db/migration/master/V1_0_0_231031__Add_table_'t_r_role_group'.sql index 89f1b93..ba976d0 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231031__Add_table_'t_role_group'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231031__Add_table_'t_r_role_group'.sql @@ -1,10 +1,10 @@ -drop table if exists t_role_group; +drop table if exists t_r_role_group; -create table if not exists t_role_group +create table if not exists t_r_role_group ( id bigint not null primary key, role_id bigint not null comment '角色', group_id bigint not null comment '用户组', deleted bigint not null default 0, version int not null default 0 -) comment '中间表-角色-用户组'; \ No newline at end of file +) comment '中间表-系统-角色-用户组'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231101__Add_table_'t_user_role'.sql b/src/main/resources/db/migration/master/V1_0_0_231101__Add_table_'t_r_user_role'.sql similarity index 63% rename from src/main/resources/db/migration/master/V1_0_0_231101__Add_table_'t_user_role'.sql rename to src/main/resources/db/migration/master/V1_0_0_231101__Add_table_'t_r_user_role'.sql index 27d674d..8703912 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231101__Add_table_'t_user_role'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231101__Add_table_'t_r_user_role'.sql @@ -1,10 +1,10 @@ -drop table if exists t_user_role; +drop table if exists t_r_user_role; -create table if not exists t_user_role +create table if not exists t_r_user_role ( id bigint not null primary key, user_id bigint not null comment '用户', role_id bigint not null comment '角色', deleted bigint not null default 0, version int not null default 0 -) comment '中间表-用户-角色'; \ No newline at end of file +) comment '中间表-系统-用户-角色'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231102__Add_table_'t_power_role'.sql b/src/main/resources/db/migration/master/V1_0_0_231102__Add_table_'t_r_power_role'.sql similarity index 64% rename from src/main/resources/db/migration/master/V1_0_0_231102__Add_table_'t_power_role'.sql rename to src/main/resources/db/migration/master/V1_0_0_231102__Add_table_'t_r_power_role'.sql index 854e78b..81bc1cc 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231102__Add_table_'t_power_role'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231102__Add_table_'t_r_power_role'.sql @@ -1,10 +1,10 @@ -drop table if exists t_power_role; +drop table if exists t_r_power_role; -create table if not exists t_power_role +create table if not exists t_r_power_role ( id bigint not null primary key, power_id bigint not null comment '权限', role_id bigint not null comment '角色', deleted bigint not null default 0, version int not null default 0 -) comment '中间表-权限-角色'; \ No newline at end of file +) comment '中间表-系统-权限-角色'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_module'.sql b/src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_module'.sql deleted file mode 100644 index a2e36b9..0000000 --- a/src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_module'.sql +++ /dev/null @@ -1,7 +0,0 @@ -drop table if exists t_module; - -create table if not exists t_module -( - id bigint not null primary key, - name varchar(100) not null comment '模块名' -) comment '模块表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_s_module'.sql b/src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_s_module'.sql new file mode 100644 index 0000000..b859553 --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_231103__Add_table_'t_s_module'.sql @@ -0,0 +1,7 @@ +drop table if exists t_s_module; + +create table if not exists t_s_module +( + id bigint not null primary key, + name varchar(100) not null comment '模块名' +) comment '系统-模块表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_231104__Add_table_'t_user_info'.sql b/src/main/resources/db/migration/master/V1_0_0_231104__Add_table_'t_s_user_info'.sql similarity index 68% rename from src/main/resources/db/migration/master/V1_0_0_231104__Add_table_'t_user_info'.sql rename to src/main/resources/db/migration/master/V1_0_0_231104__Add_table_'t_s_user_info'.sql index 75c3232..b2599f3 100644 --- a/src/main/resources/db/migration/master/V1_0_0_231104__Add_table_'t_user_info'.sql +++ b/src/main/resources/db/migration/master/V1_0_0_231104__Add_table_'t_s_user_info'.sql @@ -1,6 +1,6 @@ -drop table if exists t_user_info; +drop table if exists t_s_user_info; -create table if not exists t_user_info +create table if not exists t_s_user_info ( id bigint not null primary key, user_id bigint not null comment '用户ID', @@ -11,6 +11,6 @@ create table if not exists t_user_info update_time datetime not null default (utc_timestamp()) comment '修改时间', deleted bigint not null default 0, version int not null default 0, - constraint t_user_info_unique_user_id unique (user_id, deleted), - constraint t_user_info_unique_email unique (email, deleted) -) comment '用户资料表'; \ No newline at end of file + constraint t_s_user_info_unique_user_id unique (user_id, deleted), + constraint t_s_user_info_unique_email unique (email, deleted) +) comment '系统-用户资料表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/master/V1_0_0_240103__Add_table_‘t_s_sensitive_word'.sql b/src/main/resources/db/migration/master/V1_0_0_240103__Add_table_‘t_s_sensitive_word'.sql new file mode 100644 index 0000000..5177ab7 --- /dev/null +++ b/src/main/resources/db/migration/master/V1_0_0_240103__Add_table_‘t_s_sensitive_word'.sql @@ -0,0 +1,12 @@ +drop table if exists t_s_sensitive_word; + +create table if not exists t_s_sensitive_word +( + id bigint not null primary key, + word varchar(400) not null comment '词', + use_for varchar(50) null comment '用于', + enable int not null default 1 comment '启用', + deleted bigint not null default 0, + version int not null default 0, + constraint t_s_sensitive_word_unique_word unique (word, deleted) +) comment '系统-敏感词表'; \ No newline at end of file diff --git a/src/main/resources/db/migration/sqlite/V1_0_0_231212__Add_table_'t_sys_log'.sql b/src/main/resources/db/migration/sqlite/V1_0_0_231212__Add_table_'t_l_sys_log'.sql similarity index 94% rename from src/main/resources/db/migration/sqlite/V1_0_0_231212__Add_table_'t_sys_log'.sql rename to src/main/resources/db/migration/sqlite/V1_0_0_231212__Add_table_'t_l_sys_log'.sql index 87bd930..a49c66c 100644 --- a/src/main/resources/db/migration/sqlite/V1_0_0_231212__Add_table_'t_sys_log'.sql +++ b/src/main/resources/db/migration/sqlite/V1_0_0_231212__Add_table_'t_l_sys_log'.sql @@ -1,6 +1,6 @@ -drop table if exists t_sys_log; +drop table if exists t_l_sys_log; -create table t_sys_log -- 系统日志表 +create table t_l_sys_log -- 本地-系统日志表 ( id integer not null, log_type text not null, -- 日志类型 diff --git a/src/main/resources/db/migration/sqlite/V1_0_0_231213__Add_table_'t_event_log'.sql b/src/main/resources/db/migration/sqlite/V1_0_0_231213__Add_table_'t_l_event_log'.sql similarity index 77% rename from src/main/resources/db/migration/sqlite/V1_0_0_231213__Add_table_'t_event_log'.sql rename to src/main/resources/db/migration/sqlite/V1_0_0_231213__Add_table_'t_l_event_log'.sql index e921a6c..d729c85 100644 --- a/src/main/resources/db/migration/sqlite/V1_0_0_231213__Add_table_'t_event_log'.sql +++ b/src/main/resources/db/migration/sqlite/V1_0_0_231213__Add_table_'t_l_event_log'.sql @@ -1,6 +1,6 @@ -drop table if exists t_event_log; +drop table if exists t_l_event_log; -create table if not exists t_event_log -- 事件日志表 +create table if not exists t_l_event_log -- 本地-事件日志表 ( id integer not null primary key, event text not null, -- 事件, diff --git a/src/main/resources/db/migration/sqlite/V1_0_0_231214__Add_table_'t_statistics_log'.sql b/src/main/resources/db/migration/sqlite/V1_0_0_231214__Add_table_'t_l_statistics_log'.sql similarity index 74% rename from src/main/resources/db/migration/sqlite/V1_0_0_231214__Add_table_'t_statistics_log'.sql rename to src/main/resources/db/migration/sqlite/V1_0_0_231214__Add_table_'t_l_statistics_log'.sql index 5228202..2fb9390 100644 --- a/src/main/resources/db/migration/sqlite/V1_0_0_231214__Add_table_'t_statistics_log'.sql +++ b/src/main/resources/db/migration/sqlite/V1_0_0_231214__Add_table_'t_l_statistics_log'.sql @@ -1,6 +1,6 @@ -drop table if exists t_statistics_log; +drop table if exists t_l_statistics_log; -create table if not exists t_statistics_log -- 统计日志表 +create table if not exists t_l_statistics_log -- 本地-统计日志表 ( id integer not null primary key, key text not null, -- 记录键 diff --git a/src/main/resources/db/migration/sqlite/V1_0_0_240103__Add_table_‘t_sensitive_word'.sql b/src/main/resources/db/migration/sqlite/V1_0_0_240103__Add_table_‘t_sensitive_word'.sql deleted file mode 100644 index d078b41..0000000 --- a/src/main/resources/db/migration/sqlite/V1_0_0_240103__Add_table_‘t_sensitive_word'.sql +++ /dev/null @@ -1,9 +0,0 @@ -drop table if exists t_sensitive_word; - -create table if not exists t_sensitive_word -- 敏感词表 -( - id integer not null primary key, - word text not null unique, -- 词 - use_for text null, -- 用于 - enable integer not null default 1 -- 启用 -); diff --git a/src/main/resources/mapper/permission/GroupMapper.xml b/src/main/resources/mapper/permission/GroupMapper.xml index 24d6e8a..0523c54 100644 --- a/src/main/resources/mapper/permission/GroupMapper.xml +++ b/src/main/resources/mapper/permission/GroupMapper.xml @@ -3,16 +3,16 @@ diff --git a/src/main/resources/mapper/permission/RoleMapper.xml b/src/main/resources/mapper/permission/RoleMapper.xml index eaa0e6a..c19bb24 100644 --- a/src/main/resources/mapper/permission/RoleMapper.xml +++ b/src/main/resources/mapper/permission/RoleMapper.xml @@ -3,16 +3,16 @@ @@ -104,6 +104,7 @@ - + diff --git a/src/main/resources/mapper/permission/UserMapper.xml b/src/main/resources/mapper/permission/UserMapper.xml index 5488731..4e3770b 100644 --- a/src/main/resources/mapper/permission/UserMapper.xml +++ b/src/main/resources/mapper/permission/UserMapper.xml @@ -2,121 +2,121 @@ - select t_sys_log.id as sys_log_id, - t_sys_log.log_type as sys_log_log_type, - t_sys_log.operate_user_id as sys_log_operate_user_id, - t_sys_log.operate_time as sys_log_operate_time, - t_sys_log.request_uri as sys_log_request_uri, - t_sys_log.request_method as sys_log_request_method, - t_sys_log.request_params as sys_log_request_params, - t_sys_log.request_ip as sys_log_request_ip, - t_sys_log.request_server_address as sys_log_request_server_address, - t_sys_log.exception as sys_log_exception, - t_sys_log.exception_info as sys_log_exception_info, - t_sys_log.start_time as sys_log_start_time, - t_sys_log.end_time as sys_log_end_time, - t_sys_log.execute_time as sys_log_execute_time, - t_sys_log.user_agent as sys_log_user_agent - from t_sys_log + select t_l_sys_log.id as sys_log_id, + t_l_sys_log.log_type as sys_log_log_type, + t_l_sys_log.operate_user_id as sys_log_operate_user_id, + t_l_sys_log.operate_time as sys_log_operate_time, + t_l_sys_log.request_uri as sys_log_request_uri, + t_l_sys_log.request_method as sys_log_request_method, + t_l_sys_log.request_params as sys_log_request_params, + t_l_sys_log.request_ip as sys_log_request_ip, + t_l_sys_log.request_server_address as sys_log_request_server_address, + t_l_sys_log.exception as sys_log_exception, + t_l_sys_log.exception_info as sys_log_exception_info, + t_l_sys_log.start_time as sys_log_start_time, + t_l_sys_log.end_time as sys_log_end_time, + t_l_sys_log.execute_time as sys_log_execute_time, + t_l_sys_log.user_agent as sys_log_user_agent + from t_l_sys_log - #{item} - #{item} - and ((t_sys_log.request_server_address || t_sys_log.request_uri || - (case when length(t_sys_log.request_params) != 0 then '?' || t_sys_log.request_params else '' end)) + and ((t_l_sys_log.request_server_address || t_l_sys_log.request_uri || + (case when length(t_l_sys_log.request_params) != 0 then '?' || t_l_sys_log.request_params else '' end)) like #{searchRequestUrl}) - and t_sys_log.start_time between #{searchStartTime} and #{searchEndTime} + and t_l_sys_log.start_time between #{searchStartTime} and #{searchEndTime}