diff --git a/backend/plugin/dict/sql/mysql/init_snowflake_test_data.sql b/backend/plugin/dict/sql/mysql/init_snowflake_test_data.sql new file mode 100644 index 00000000..61bb82e6 --- /dev/null +++ b/backend/plugin/dict/sql/mysql/init_snowflake_test_data.sql @@ -0,0 +1,41 @@ +insert into sys_dict_type (id, name, code, status, remark, created_time, updated_time) +values +(2048602512340156416, '通用状态', 'sys_status', 1, '系统通用状态:启用/停用', now(), null), +(2048602512369516544, '菜单类型', 'sys_menu_type', 1, '系统菜单类型', now(), null), +(2048602512432431104, '登录日志状态', 'sys_login_status', 1, '用户登录日志状态', now(), null), +(2048602512495345664, '数据规则运算符', 'sys_data_rule_operator', 1, '数据权限规则运算符', now(), null), +(2048602512549871616, '数据规则表达式', 'sys_data_rule_expression', 1, '数据权限规则表达式', now(), null), +(2048602512616980480, '前端参数配置', 'sys_frontend_config', 1, '前端参数配置类型', now(), null), +(2048602512692477952, '过滤数据权限', 'sys_data_permission', 1, '数据权限过滤类型', now(), null), +(2048602512755392512, '菜单显示', 'sys_menu_display', 1, '菜单是否显示', now(), null), +(2048602512818307072, '菜单缓存', 'sys_menu_cache', 1, '菜单是否缓存', now(), null); + +insert into sys_dict_data (id, label, value, sort, status, remark, type_id, created_time, updated_time) +values +(2048602512881221632, '停用', 0, 1, 1, '系统停用状态', 2048602512340156416, now(), null), +(2048602512948330496, '正常', 1, 2, 1, '系统正常状态', 2048602512340156416, now(), null), +(2048602513015439360, '目录', 0, 1, 1, '菜单目录类型', 2048602512369516544, now(), null), +(2048602513078353920, '菜单', 1, 2, 1, '普通菜单类型', 2048602512369516544, now(), null), +(2048602513128685568, '按钮', 2, 3, 1, '按钮权限类型', 2048602512369516544, now(), null), +(2048602513174822912, '内嵌', 3, 4, 1, '内嵌页面类型', 2048602512369516544, now(), null), +(2048602513241931776, '外链', 4, 5, 1, '外部链接类型', 2048602512369516544, now(), null), +(2048602513292263424, '失败', 0, 1, 1, '登录失败状态', 2048602512432431104, now(), null), +(2048602513359372288, '成功', 1, 2, 1, '登录成功状态', 2048602512432431104, now(), null), +(2048602513422286848, 'AND', 0, 1, 1, '逻辑与运算符', 2048602512495345664, now(), null), +(2048602513476812800, 'OR', 1, 2, 1, '逻辑或运算符', 2048602512495345664, now(), null), +(2048602513543921664, '等于(==)', 0, 1, 1, '等于比较表达式', 2048602512549871616, now(), null), +(2048602513590059008, '不等于(!=)', 1, 2, 1, '不等于比较表达式', 2048602512549871616, now(), null), +(2048602513657167872, '大于(>)', 2, 3, 1, '大于比较表达式', 2048602512549871616, now(), null), +(2048602513720082432, '大于等于(>=)', 3, 4, 1, '大于等于比较表达式', 2048602512549871616, now(), null), +(2048602513782996992, '小于(<)', 4, 5, 1, '小于比较表达式', 2048602512549871616, now(), null), +(2048602513850105856, '小于等于(<=)', 5, 6, 1, '小于等于比较表达式', 2048602512549871616, now(), null), +(2048602513917214720, '包含(in)', 6, 7, 1, '包含表达式', 2048602512549871616, now(), null), +(2048602513984323584, '不包含(not in)', 7, 8, 1, '不包含表达式', 2048602512549871616, now(), null), +(2048602514051432448, '否', 0, 1, 1, '不是前端参数配置', 2048602512616980480, now(), null), +(2048602514118541312, '是', 1, 2, 1, '是前端参数配置', 2048602512616980480, now(), null), +(2048602514168872960, '否', 0, 1, 1, '不进行数据权限过滤', 2048602512692477952, now(), null), +(2048602514231787520, '是', 1, 2, 1, '进行数据权限过滤', 2048602512692477952, now(), null), +(2048602514303090688, '隐藏', 0, 1, 1, '菜单隐藏', 2048602512755392512, now(), null), +(2048602514366005248, '显示', 1, 2, 1, '菜单显示', 2048602512755392512, now(), null), +(2048602514433114112, '不缓存', 0, 1, 1, '菜单不缓存', 2048602512818307072, now(), null), +(2048602514500222976, '缓存', 1, 2, 1, '菜单缓存', 2048602512818307072, now(), null); diff --git a/backend/plugin/dict/sql/mysql/init_test_data.sql b/backend/plugin/dict/sql/mysql/init_test_data.sql new file mode 100644 index 00000000..05cd0fae --- /dev/null +++ b/backend/plugin/dict/sql/mysql/init_test_data.sql @@ -0,0 +1,41 @@ +insert into sys_dict_type (id, name, code, status, remark, created_time, updated_time) +values +(1, '通用状态', 'sys_status', 1, '系统通用状态:启用/停用', now(), null), +(2, '菜单类型', 'sys_menu_type', 1, '系统菜单类型', now(), null), +(3, '登录日志状态', 'sys_login_status', 1, '用户登录日志状态', now(), null), +(4, '数据规则运算符', 'sys_data_rule_operator', 1, '数据权限规则运算符', now(), null), +(5, '数据规则表达式', 'sys_data_rule_expression', 1, '数据权限规则表达式', now(), null), +(6, '前端参数配置', 'sys_frontend_config', 1, '前端参数配置类型', now(), null), +(7, '过滤数据权限', 'sys_data_permission', 1, '数据权限过滤类型', now(), null), +(8, '菜单显示', 'sys_menu_display', 1, '菜单是否显示', now(), null), +(9, '菜单缓存', 'sys_menu_cache', 1, '菜单是否缓存', now(), null); + +insert into sys_dict_data (id, label, value, sort, status, remark, type_id, created_time, updated_time) +values +(1, '停用', 0, 1, 1, '系统停用状态', 1, now(), null), +(2, '正常', 1, 2, 1, '系统正常状态', 1, now(), null), +(3, '目录', 0, 1, 1, '菜单目录类型', 2, now(), null), +(4, '菜单', 1, 2, 1, '普通菜单类型', 2, now(), null), +(5, '按钮', 2, 3, 1, '按钮权限类型', 2, now(), null), +(6, '内嵌', 3, 4, 1, '内嵌页面类型', 2, now(), null), +(7, '外链', 4, 5, 1, '外部链接类型', 2, now(), null), +(8, '失败', 0, 1, 1, '登录失败状态', 3, now(), null), +(9, '成功', 1, 2, 1, '登录成功状态', 3, now(), null), +(10, 'AND', 0, 1, 1, '逻辑与运算符', 4, now(), null), +(11, 'OR', 1, 2, 1, '逻辑或运算符', 4, now(), null), +(12, '等于(==)', 0, 1, 1, '等于比较表达式', 5, now(), null), +(13, '不等于(!=)', 1, 2, 1, '不等于比较表达式', 5, now(), null), +(14, '大于(>)', 2, 3, 1, '大于比较表达式', 5, now(), null), +(15, '大于等于(>=)', 3, 4, 1, '大于等于比较表达式', 5, now(), null), +(16, '小于(<)', 4, 5, 1, '小于比较表达式', 5, now(), null), +(17, '小于等于(<=)', 5, 6, 1, '小于等于比较表达式', 5, now(), null), +(18, '包含(in)', 6, 7, 1, '包含表达式', 5, now(), null), +(19, '不包含(not in)', 7, 8, 1, '不包含表达式', 5, now(), null), +(20, '否', 0, 1, 1, '不是前端参数配置', 6, now(), null), +(21, '是', 1, 2, 1, '是前端参数配置', 6, now(), null), +(22, '否', 0, 1, 1, '不进行数据权限过滤', 7, now(), null), +(23, '是', 1, 2, 1, '进行数据权限过滤', 7, now(), null), +(24, '隐藏', 0, 1, 1, '菜单隐藏', 8, now(), null), +(25, '显示', 1, 2, 1, '菜单显示', 8, now(), null), +(26, '不缓存', 0, 1, 1, '菜单不缓存', 9, now(), null), +(27, '缓存', 1, 2, 1, '菜单缓存', 9, now(), null); diff --git a/backend/plugin/dict/sql/postgresql/init_snowflake_test_data.sql b/backend/plugin/dict/sql/postgresql/init_snowflake_test_data.sql new file mode 100644 index 00000000..61bb82e6 --- /dev/null +++ b/backend/plugin/dict/sql/postgresql/init_snowflake_test_data.sql @@ -0,0 +1,41 @@ +insert into sys_dict_type (id, name, code, status, remark, created_time, updated_time) +values +(2048602512340156416, '通用状态', 'sys_status', 1, '系统通用状态:启用/停用', now(), null), +(2048602512369516544, '菜单类型', 'sys_menu_type', 1, '系统菜单类型', now(), null), +(2048602512432431104, '登录日志状态', 'sys_login_status', 1, '用户登录日志状态', now(), null), +(2048602512495345664, '数据规则运算符', 'sys_data_rule_operator', 1, '数据权限规则运算符', now(), null), +(2048602512549871616, '数据规则表达式', 'sys_data_rule_expression', 1, '数据权限规则表达式', now(), null), +(2048602512616980480, '前端参数配置', 'sys_frontend_config', 1, '前端参数配置类型', now(), null), +(2048602512692477952, '过滤数据权限', 'sys_data_permission', 1, '数据权限过滤类型', now(), null), +(2048602512755392512, '菜单显示', 'sys_menu_display', 1, '菜单是否显示', now(), null), +(2048602512818307072, '菜单缓存', 'sys_menu_cache', 1, '菜单是否缓存', now(), null); + +insert into sys_dict_data (id, label, value, sort, status, remark, type_id, created_time, updated_time) +values +(2048602512881221632, '停用', 0, 1, 1, '系统停用状态', 2048602512340156416, now(), null), +(2048602512948330496, '正常', 1, 2, 1, '系统正常状态', 2048602512340156416, now(), null), +(2048602513015439360, '目录', 0, 1, 1, '菜单目录类型', 2048602512369516544, now(), null), +(2048602513078353920, '菜单', 1, 2, 1, '普通菜单类型', 2048602512369516544, now(), null), +(2048602513128685568, '按钮', 2, 3, 1, '按钮权限类型', 2048602512369516544, now(), null), +(2048602513174822912, '内嵌', 3, 4, 1, '内嵌页面类型', 2048602512369516544, now(), null), +(2048602513241931776, '外链', 4, 5, 1, '外部链接类型', 2048602512369516544, now(), null), +(2048602513292263424, '失败', 0, 1, 1, '登录失败状态', 2048602512432431104, now(), null), +(2048602513359372288, '成功', 1, 2, 1, '登录成功状态', 2048602512432431104, now(), null), +(2048602513422286848, 'AND', 0, 1, 1, '逻辑与运算符', 2048602512495345664, now(), null), +(2048602513476812800, 'OR', 1, 2, 1, '逻辑或运算符', 2048602512495345664, now(), null), +(2048602513543921664, '等于(==)', 0, 1, 1, '等于比较表达式', 2048602512549871616, now(), null), +(2048602513590059008, '不等于(!=)', 1, 2, 1, '不等于比较表达式', 2048602512549871616, now(), null), +(2048602513657167872, '大于(>)', 2, 3, 1, '大于比较表达式', 2048602512549871616, now(), null), +(2048602513720082432, '大于等于(>=)', 3, 4, 1, '大于等于比较表达式', 2048602512549871616, now(), null), +(2048602513782996992, '小于(<)', 4, 5, 1, '小于比较表达式', 2048602512549871616, now(), null), +(2048602513850105856, '小于等于(<=)', 5, 6, 1, '小于等于比较表达式', 2048602512549871616, now(), null), +(2048602513917214720, '包含(in)', 6, 7, 1, '包含表达式', 2048602512549871616, now(), null), +(2048602513984323584, '不包含(not in)', 7, 8, 1, '不包含表达式', 2048602512549871616, now(), null), +(2048602514051432448, '否', 0, 1, 1, '不是前端参数配置', 2048602512616980480, now(), null), +(2048602514118541312, '是', 1, 2, 1, '是前端参数配置', 2048602512616980480, now(), null), +(2048602514168872960, '否', 0, 1, 1, '不进行数据权限过滤', 2048602512692477952, now(), null), +(2048602514231787520, '是', 1, 2, 1, '进行数据权限过滤', 2048602512692477952, now(), null), +(2048602514303090688, '隐藏', 0, 1, 1, '菜单隐藏', 2048602512755392512, now(), null), +(2048602514366005248, '显示', 1, 2, 1, '菜单显示', 2048602512755392512, now(), null), +(2048602514433114112, '不缓存', 0, 1, 1, '菜单不缓存', 2048602512818307072, now(), null), +(2048602514500222976, '缓存', 1, 2, 1, '菜单缓存', 2048602512818307072, now(), null); diff --git a/backend/plugin/dict/sql/postgresql/init_test_data.sql b/backend/plugin/dict/sql/postgresql/init_test_data.sql new file mode 100644 index 00000000..13c21982 --- /dev/null +++ b/backend/plugin/dict/sql/postgresql/init_test_data.sql @@ -0,0 +1,45 @@ +insert into sys_dict_type (id, name, code, status, remark, created_time, updated_time) +values +(1, '通用状态', 'sys_status', 1, '系统通用状态:启用/停用', now(), null), +(2, '菜单类型', 'sys_menu_type', 1, '系统菜单类型', now(), null), +(3, '登录日志状态', 'sys_login_status', 1, '用户登录日志状态', now(), null), +(4, '数据规则运算符', 'sys_data_rule_operator', 1, '数据权限规则运算符', now(), null), +(5, '数据规则表达式', 'sys_data_rule_expression', 1, '数据权限规则表达式', now(), null), +(6, '前端参数配置', 'sys_frontend_config', 1, '前端参数配置类型', now(), null), +(7, '过滤数据权限', 'sys_data_permission', 1, '数据权限过滤类型', now(), null), +(8, '菜单显示', 'sys_menu_display', 1, '菜单是否显示', now(), null), +(9, '菜单缓存', 'sys_menu_cache', 1, '菜单是否缓存', now(), null); + +insert into sys_dict_data (id, label, value, sort, status, remark, type_id, created_time, updated_time) +values +(1, '停用', 0, 1, 1, '系统停用状态', 1, now(), null), +(2, '正常', 1, 2, 1, '系统正常状态', 1, now(), null), +(3, '目录', 0, 1, 1, '菜单目录类型', 2, now(), null), +(4, '菜单', 1, 2, 1, '普通菜单类型', 2, now(), null), +(5, '按钮', 2, 3, 1, '按钮权限类型', 2, now(), null), +(6, '内嵌', 3, 4, 1, '内嵌页面类型', 2, now(), null), +(7, '外链', 4, 5, 1, '外部链接类型', 2, now(), null), +(8, '失败', 0, 1, 1, '登录失败状态', 3, now(), null), +(9, '成功', 1, 2, 1, '登录成功状态', 3, now(), null), +(10, 'AND', 0, 1, 1, '逻辑与运算符', 4, now(), null), +(11, 'OR', 1, 2, 1, '逻辑或运算符', 4, now(), null), +(12, '等于(==)', 0, 1, 1, '等于比较表达式', 5, now(), null), +(13, '不等于(!=)', 1, 2, 1, '不等于比较表达式', 5, now(), null), +(14, '大于(>)', 2, 3, 1, '大于比较表达式', 5, now(), null), +(15, '大于等于(>=)', 3, 4, 1, '大于等于比较表达式', 5, now(), null), +(16, '小于(<)', 4, 5, 1, '小于比较表达式', 5, now(), null), +(17, '小于等于(<=)', 5, 6, 1, '小于等于比较表达式', 5, now(), null), +(18, '包含(in)', 6, 7, 1, '包含表达式', 5, now(), null), +(19, '不包含(not in)', 7, 8, 1, '不包含表达式', 5, now(), null), +(20, '否', 0, 1, 1, '不是前端参数配置', 6, now(), null), +(21, '是', 1, 2, 1, '是前端参数配置', 6, now(), null), +(22, '否', 0, 1, 1, '不进行数据权限过滤', 7, now(), null), +(23, '是', 1, 2, 1, '进行数据权限过滤', 7, now(), null), +(24, '隐藏', 0, 1, 1, '菜单隐藏', 8, now(), null), +(25, '显示', 1, 2, 1, '菜单显示', 8, now(), null), +(26, '不缓存', 0, 1, 1, '菜单不缓存', 9, now(), null), +(27, '缓存', 1, 2, 1, '菜单缓存', 9, now(), null); + +-- reset auto-increment values for each table based on max id +select setval(pg_get_serial_sequence('sys_dict_type', 'id'),coalesce(max(id), 0) + 1, true) from sys_dict_type; +select setval(pg_get_serial_sequence('sys_dict_data', 'id'),coalesce(max(id), 0) + 1, true) from sys_dict_data; diff --git a/backend/sql/mysql/init_snowflake_test_data.sql b/backend/sql/mysql/init_snowflake_test_data.sql index c9615348..42bf7cc3 100644 --- a/backend/sql/mysql/init_snowflake_test_data.sql +++ b/backend/sql/mysql/init_snowflake_test_data.sql @@ -1,109 +1,116 @@ -insert into sys_dept (id, name, sort, leader, phone, email, status, del_flag, parent_id, created_time, updated_time) -values (2047437108473364480, '测试', 0, null, null, null, 1, 0, null, '2025-05-26 17:13:45', null); +insert into sys_dept (id, name, sort, leader, phone, email, status, del_flag, parent_id, created_time, updated_time) +values (2048601258595581952, '测试', 0, null, null, null, 1, 0, null, now(), null); -insert into sys_menu (id, title, name, path, sort, icon, type, component, perms, status, display, cache, link, remark, parent_id, created_time, updated_time) -values (2047437108502724608, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:26:18', null), - (2047437108569833472, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:30:01', null), - (2047437108632748032, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:31:41', null), - (2047437108699856896, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:32:34', null), - (2047437108766965760, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:33:29', null), - (2047437108834074624, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:35:41', null), - (2047437108901183488, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 2047437108502724608, '2025-06-09 17:54:29', null), - (2047437108968292352, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 2047437108502724608, '2025-06-09 17:57:09', null), - (2047437109035401216, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 2047437108834074624, '2025-06-09 17:59:44', null), - (2047437109102510080, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 2047437108834074624, '2025-06-09 18:00:50', null), - (2047437109169618944, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 2047437108834074624, '2025-06-09 18:01:39', null), - (2047437109236727808, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:03:17', null), - (2047437109303836672, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:03:54', null), - (2047437109366751232, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:04:47', null), - (2047437109429665792, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:05:31', null), - (2047437109496774656, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:07:04', null), - (2047437109563883520, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 2047437109496774656, '2025-06-09 18:07:46', null), - (2047437109630992384, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 2047437109496774656, '2025-06-09 18:08:22', null), - (2047437109698101248, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:09:12', null), - (2047437109761015808, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:10:20', null), - (2047437109828124672, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:11:10', null), - (2047437109891039232, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2047437108569833472, '2025-06-09 18:11:38', null), - (2047437109958148096, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 2047437108632748032, '2025-06-09 18:12:38', null), - (2047437110025256960, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 2047437108632748032, '2025-06-09 18:13:19', null), - (2047437110092365824, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 2047437108699856896, '2025-06-09 18:14:35', null), - (2047437110159474688, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 2047437108699856896, '2025-06-09 18:15:26', null), - (2047437110226583552, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 2047437108766965760, '2025-06-09 18:17:12', null), - (2047437110293692416, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 2047437108766965760, '2025-06-09 18:17:42', null), - (2047437110360801280, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 2047437108766965760, '2025-06-09 18:18:12', null), - (2047437110427910144, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, '2025-06-09 18:18:12', null), - (2047437110495019008, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 2047437109236727808, '2025-06-09 18:21:17', null), - (2047437110562127872, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 2047437109236727808, '2025-06-09 18:22:01', null), - (2047437110629236736, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 2047437109236727808, '2025-06-09 18:22:39', null), - (2047437110696345600, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 2047437109303836672, '2025-06-09 18:24:09', null), - (2047437110759260160, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 2047437109366751232, '2025-06-09 18:25:08', null), - (2047437110822174720, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 2047437109366751232, '2025-06-09 18:26:30', null), - (2047437110889283584, '修改角色菜单', 'EditSysRoleMenu', null, 0, null, 2, null, 'sys:role:menu:edit', 1, 0, 1, '', null, 2047437109366751232, '2025-06-09 18:27:24', null), - (2047437110956392448, '修改角色数据范围', 'EditSysRoleScope', null, 0, null, 2, null, 'sys:role:scope:edit', 1, 0, 1, '', null, 2047437109366751232, '2025-06-09 18:28:25', null), - (2047437111023501312, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 2047437109366751232, '2025-06-09 18:28:55', null), - (2047437111090610176, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 2047437109429665792, '2025-06-09 18:29:51', null), - (2047437111157719040, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 2047437109429665792, '2025-06-09 18:30:13', null), - (2047437111220633600, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 2047437109429665792, '2025-06-09 18:30:37', null), - (2047437111287742464, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 2047437109563883520, '2025-06-09 18:31:11', null), - (2047437111350657024, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 2047437109563883520, '2025-06-09 18:31:42', null), - (2047437111417765888, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 2047437109563883520, '2025-06-09 18:32:36', null), - (2047437111484874752, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 2047437109563883520, '2025-06-09 18:33:09', null), - (2047437111551983616, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 2047437109630992384, '2025-06-09 18:35:54', null), - (2047437111614898176, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 2047437109630992384, '2025-06-09 18:36:19', null), - (2047437111682007040, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 2047437109630992384, '2025-06-09 18:36:44', null), - (2047437111749115904, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 2047437109698101248, '2025-06-09 18:38:14', null), - (2047437111816224768, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 2047437109698101248, '2025-06-09 18:39:08', null), - (2047437111883333632, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 2047437109698101248, '2025-06-09 18:39:47', null), - (2047437111950442496, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 2047437109761015808, '2025-06-09 18:45:52', null), - (2047437112017551360, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 2047437109761015808, '2025-06-09 18:46:13', null), - (2047437112084660224, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 2047437109761015808, '2025-06-09 18:46:36', null), - (2047437112151769088, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 2047437109828124672, '2025-06-09 18:48:17', null), - (2047437112218877952, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 2047437109828124672, '2025-06-09 18:48:49', null), - (2047437112285986816, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 2047437109828124672, '2025-06-09 18:49:23', null), - (2047437112353095680, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 2047437109828124672, '2025-06-09 18:50:01', null), - (2047437112416010240, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 2047437109828124672, '2025-06-09 18:50:26', null), - (2047437112483119104, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 2047437109828124672, '2025-06-09 18:50:48', null), - (2047437112550227968, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 2047437109891039232, '2025-06-09 18:51:22', null), - (2047437112617336832, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 2047437109891039232, '2025-06-09 18:51:45', null), - (2047437112684445696, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 2047437109891039232, '2025-06-09 18:52:10', null), - (2047437112751554560, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:53:07', null), - (2047437112822857728, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:53:45', null), - (2047437112889966592, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:54:11', null), - (2047437112957075456, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:54:45', null), - (2047437113024184320, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:55:08', null), - (2047437113091293184, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:55:35', null), - (2047437113154207744, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 18:58:16', null), - (2047437113221316608, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 2047437109958148096, '2025-06-09 19:01:22', null), - (2047437113284231168, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 2047437110092365824, '2025-06-09 19:02:21', null), - (2047437113351340032, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 2047437110092365824, '2025-06-09 19:02:50', null), - (2047437113418448896, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 2047437110159474688, '2025-06-09 19:03:13', null), - (2047437113485557760, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 2047437110159474688, '2025-06-09 19:03:40', null), - (2047437113552666624, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 2047437110226583552, '2025-06-09 19:04:52', null); +insert into sys_menu (id, title, name, path, sort, icon, type, component, perms, status, display, cache, link, remark, parent_id, created_time, updated_time) +values +-- 顶级菜单 +(2048601258599776256, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601258666885120, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601258729799680, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601258796908544, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601258864017408, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601258931126272, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601258998235136, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, now(), null), +-- 一级子菜单 +(2048601259061149696, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 2048601258599776256, now(), null), +(2048601259128258560, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 2048601258599776256, now(), null), +(2048601259191173120, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259258281984, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259325390848, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259388305408, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259451219968, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259518328832, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259585437696, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259652546560, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259715461120, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2048601258666885120, now(), null), +(2048601259778375680, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 2048601258729799680, now(), null), +(2048601259845484544, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 2048601258729799680, now(), null), +(2048601259908399104, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 2048601258796908544, now(), null), +(2048601259975507968, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 2048601258796908544, now(), null), +(2048601260042616832, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 2048601258864017408, now(), null), +(2048601260109725696, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 2048601258864017408, now(), null), +(2048601260176834560, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 2048601258864017408, now(), null), +(2048601260239749120, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 2048601258931126272, now(), null), +(2048601260302663680, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 2048601258931126272, now(), null), +(2048601260369772544, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 2048601258931126272, now(), null), +-- 二级子菜单 +(2048601260436881408, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 2048601259451219968, now(), null), +(2048601260503990272, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 2048601259451219968, now(), null), +-- 按钮权限 +(2048601260571099136, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 2048601259191173120, now(), null), +(2048601260638208000, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 2048601259191173120, now(), null), +(2048601260705316864, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 2048601259191173120, now(), null), +(2048601260772425728, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 2048601259258281984, now(), null), +(2048601260839534592, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 2048601259325390848, now(), null), +(2048601260906643456, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 2048601259325390848, now(), null), +(2048601260969558016, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 2048601259325390848, now(), null), +(2048601261032472576, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 2048601259388305408, now(), null), +(2048601261095387136, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 2048601259388305408, now(), null), +(2048601261162496000, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 2048601259388305408, now(), null), +(2048601261229604864, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 2048601260436881408, now(), null), +(2048601261296713728, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 2048601260436881408, now(), null), +(2048601261359628288, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 2048601260436881408, now(), null), +(2048601261426737152, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 2048601260436881408, now(), null), +(2048601261489651712, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 2048601260503990272, now(), null), +(2048601261552566272, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 2048601260503990272, now(), null), +(2048601261619675136, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 2048601260503990272, now(), null), +(2048601261686784000, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 2048601259518328832, now(), null), +(2048601261753892864, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 2048601259518328832, now(), null), +(2048601261816807424, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 2048601259518328832, now(), null), +(2048601261883916288, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 2048601259585437696, now(), null), +(2048601261946830848, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 2048601259585437696, now(), null), +(2048601262013939712, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 2048601259585437696, now(), null), +(2048601262076854272, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 2048601259652546560, now(), null), +(2048601262143963136, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 2048601259652546560, now(), null), +(2048601262211072000, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 2048601259652546560, now(), null), +(2048601262273986560, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 2048601259652546560, now(), null), +(2048601262341095424, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 2048601259652546560, now(), null), +(2048601262404009984, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 2048601259652546560, now(), null), +(2048601262471118848, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 2048601259715461120, now(), null), +(2048601262538227712, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 2048601259715461120, now(), null), +(2048601262601142272, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 2048601259715461120, now(), null), +(2048601262664056832, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601262731165696, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601262798274560, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601262861189120, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601262924103680, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601262991212544, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601263058321408, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601263121235968, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 2048601259778375680, now(), null), +(2048601263184150528, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 2048601259908399104, now(), null), +(2048601263251259392, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 2048601259908399104, now(), null), +(2048601263314173952, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 2048601259975507968, now(), null), +(2048601263381282816, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 2048601259975507968, now(), null), +(2048601263448391680, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 2048601260042616832, now(), null); -insert into sys_role (id, name, status, is_filter_scopes, remark, created_time, updated_time) -values (2047437113619775488, '测试', 1, 1, null, '2025-05-26 17:13:45', null); +insert into sys_role (id, name, status, is_filter_scopes, remark, created_time, updated_time) +values (2048601263515500544, '测试', 1, 1, null, now(), null); -insert into sys_role_menu (id, role_id, menu_id) -values (2047437113686884352, 2047437113619775488, 2047437108502724608), - (2047437113753993216, 2047437113619775488, 2047437108569833472), - (2047437113821102080, 2047437113619775488, 2047437108632748032), - (2047437113888210944, 2047437113619775488, 2047437108699856896); +insert into sys_role_menu (id, role_id, menu_id) +values +(2048601263578415104, 2048601263515500544, 2048601258599776256), +(2048601263641329664, 2048601263515500544, 2048601258666885120), +(2048601263708438528, 2048601263515500544, 2048601258729799680), +(2048601263775547392, 2048601263515500544, 2048601258796908544); -insert into sys_user (id, uuid, username, nickname, password, salt, email, is_superuser, is_staff, status, is_multi_login, avatar, phone, join_time, last_login_time, dept_id, created_time, updated_time) -values (2047437113955319808, 'af4c804f-3966-4949-ace2-3bb7416ea926', 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', 0x24326224313224387932654E7563583139566A6D5A33745968424C634F, 'admin@example.com', 1, 1, 1, 1, null, null, '2023-06-26 17:13:45', '2024-11-18 13:53:57', 2047437108473364480, '2023-06-26 17:13:45', '2024-11-18 13:53:57'); +insert into sys_user (id, uuid, username, nickname, password, salt, email, is_superuser, is_staff, status, is_multi_login, avatar, phone, join_time, last_login_time, dept_id, created_time, updated_time) +values (2048601263834267648, uuid(), 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', unhex('24326224313224387932654E7563583139566A6D5A33745968424C634F'), 'admin@example.com', 1, 1, 1, 1, null, null, now(), now(), 2048601258595581952, now(), null); -insert into sys_user_role (id, user_id, role_id) -values (2047437114022428672, 2047437113955319808, 2047437113619775488); +insert into sys_user_role (id, user_id, role_id) +values (2048601263838461952, 2048601263834267648, 2048601263515500544); -insert into sys_data_scope (id, name, status, created_time, updated_time) -values (2047437114085343232, '测试部门数据权限', 1, '2025-06-09 16:53:29', null), - (2047437114152452096, '测试部门及以下数据权限', 1, '2025-06-09 16:53:40', null); +insert into sys_data_scope (id, name, status, created_time, updated_time) +values +(2048601263901376512, '测试部门数据权限', 1, now(), null), +(2048601263968485376, '测试部门及以下数据权限', 1, now(), null); -insert into sys_data_rule (id, name, model, `column`, operator, expression, `value`, created_time, updated_time) -values (2047437114219560960, '部门名称等于测试', '部门', 'name', 1, 0, '测试', '2025-06-09 16:56:06', null), - (2047437114286669824, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', '2025-06-09 17:16:14', null); +insert into sys_data_rule (id, name, model, `column`, operator, expression, `value`, created_time, updated_time) +values +(2048601264035594240, '部门名称等于测试', '部门', 'name', 1, 0, '测试', now(), null), +(2048601264102703104, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', now(), null); -insert into sys_data_scope_rule (id, data_scope_id, data_rule_id) -values (2047437114353778688, 2047437114085343232, 2047437114219560960), - (2047437114420887552, 2047437114152452096, 2047437114219560960), - (2047437114487996416, 2047437114152452096, 2047437114286669824); +insert into sys_data_scope_rule (id, data_scope_id, data_rule_id) +values +(2048601264169811968, 2048601263901376512, 2048601264035594240), +(2048601264236920832, 2048601263968485376, 2048601264035594240), +(2048601264299835392, 2048601263968485376, 2048601264102703104); diff --git a/backend/sql/mysql/init_test_data.sql b/backend/sql/mysql/init_test_data.sql index 45700b83..d5f0e125 100644 --- a/backend/sql/mysql/init_test_data.sql +++ b/backend/sql/mysql/init_test_data.sql @@ -1,109 +1,118 @@ insert into sys_dept (id, name, sort, leader, phone, email, status, del_flag, parent_id, created_time, updated_time) -values (1, '测试', 0, null, null, null, 1, 0, null, '2025-05-26 17:13:45', null); +values (1, '测试', 0, null, null, null, 1, 0, null, now(), null); insert into sys_menu (id, title, name, path, sort, icon, type, component, perms, status, display, cache, link, remark, parent_id, created_time, updated_time) -values (1, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:26:18', null), - (2, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:30:01', null), - (3, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:31:41', null), - (4, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:32:34', null), - (5, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:33:29', null), - (6, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:35:41', null), - (7, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 1, '2025-06-09 17:54:29', null), - (8, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 1, '2025-06-09 17:57:09', null), - (9, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 6, '2025-06-09 17:59:44', null), - (10, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 6, '2025-06-09 18:00:50', null), - (11, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 6, '2025-06-09 18:01:39', null), - (12, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:03:17', null), - (13, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:03:54', null), - (14, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:04:47', null), - (15, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:05:31', null), - (16, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2, '2025-06-09 18:07:04', null), - (17, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 16, '2025-06-09 18:07:46', null), - (18, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 16, '2025-06-09 18:08:22', null), - (19, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:09:12', null), - (20, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:10:20', null), - (21, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:11:10', null), - (22, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:11:38', null), - (23, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 3, '2025-06-09 18:12:38', null), - (24, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 3, '2025-06-09 18:13:19', null), - (25, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 4, '2025-06-09 18:14:35', null), - (26, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 4, '2025-06-09 18:15:26', null), - (27, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 5, '2025-06-09 18:17:12', null), - (28, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 5, '2025-06-09 18:17:42', null), - (29, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 5, '2025-06-09 18:18:12', null), - (30, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, '2025-06-09 18:18:12', null), - (31, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 12, '2025-06-09 18:21:17', null), - (32, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 12, '2025-06-09 18:22:01', null), - (33, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 12, '2025-06-09 18:22:39', null), - (34, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 13, '2025-06-09 18:24:09', null), - (35, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 14, '2025-06-09 18:25:08', null), - (36, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 14, '2025-06-09 18:26:30', null), - (37, '修改角色菜单', 'EditSysRoleMenu', null, 0, null, 2, null, 'sys:role:menu:edit', 1, 0, 1, '', null, 14, '2025-06-09 18:27:24', null), - (38, '修改角色数据范围', 'EditSysRoleScope', null, 0, null, 2, null, 'sys:role:scope:edit', 1, 0, 1, '', null, 14, '2025-06-09 18:28:25', null), - (39, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 14, '2025-06-09 18:28:55', null), - (40, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 15, '2025-06-09 18:29:51', null), - (41, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 15, '2025-06-09 18:30:13', null), - (42, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 15, '2025-06-09 18:30:37', null), - (43, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 17, '2025-06-09 18:31:11', null), - (44, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 17, '2025-06-09 18:31:42', null), - (45, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 17, '2025-06-09 18:32:36', null), - (46, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 17, '2025-06-09 18:33:09', null), - (47, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 18, '2025-06-09 18:35:54', null), - (48, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 18, '2025-06-09 18:36:19', null), - (49, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 18, '2025-06-09 18:36:44', null), - (50, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 19, '2025-06-09 18:38:14', null), - (51, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 19, '2025-06-09 18:39:08', null), - (52, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 19, '2025-06-09 18:39:47', null), - (53, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 20, '2025-06-09 18:45:52', null), - (54, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 20, '2025-06-09 18:46:13', null), - (55, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 20, '2025-06-09 18:46:36', null), - (56, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 21, '2025-06-09 18:48:17', null), - (57, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 21, '2025-06-09 18:48:49', null), - (58, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 21, '2025-06-09 18:49:23', null), - (59, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 21, '2025-06-09 18:50:01', null), - (60, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 21, '2025-06-09 18:50:26', null), - (61, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 21, '2025-06-09 18:50:48', null), - (62, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 22, '2025-06-09 18:51:22', null), - (63, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 22, '2025-06-09 18:51:45', null), - (64, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 22, '2025-06-09 18:52:10', null), - (65, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 23, '2025-06-09 18:53:07', null), - (66, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 23, '2025-06-09 18:53:45', null), - (67, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 23, '2025-06-09 18:54:11', null), - (68, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 23, '2025-06-09 18:54:45', null), - (69, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 23, '2025-06-09 18:55:08', null), - (70, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 23, '2025-06-09 18:55:35', null), - (71, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 23, '2025-06-09 18:58:16', null), - (72, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 23, '2025-06-09 19:01:22', null), - (73, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 25, '2025-06-09 19:02:21', null), - (74, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 25, '2025-06-09 19:02:50', null), - (75, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 26, '2025-06-09 19:03:13', null), - (76, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 26, '2025-06-09 19:03:40', null), - (77, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 27, '2025-06-09 19:04:52', null); +values +-- 顶级菜单 +(1, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(3, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(4, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(5, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(6, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(7, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, now(), null), +-- 一级子菜单 +(8, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 1, now(), null), +(9, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 1, now(), null), +(10, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2, now(), null), +(11, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2, now(), null), +(12, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2, now(), null), +(13, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2, now(), null), +(14, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2, now(), null), +(15, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2, now(), null), +(16, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2, now(), null), +(17, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2, now(), null), +(18, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2, now(), null), +(19, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 3, now(), null), +(20, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 3, now(), null), +(21, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 4, now(), null), +(22, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 4, now(), null), +(23, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 5, now(), null), +(24, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 5, now(), null), +(25, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 5, now(), null), +(26, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 6, now(), null), +(27, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 6, now(), null), +(28, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 6, now(), null), +-- 二级子菜单 +(29, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 14, now(), null), +(30, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 14, now(), null), +-- 按钮权限 +(31, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 10, now(), null), +(32, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 10, now(), null), +(33, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 10, now(), null), +(34, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 11, now(), null), +(35, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 12, now(), null), +(36, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 12, now(), null), +(37, '修改角色菜单', 'EditSysRoleMenu', null, 0, null, 2, null, 'sys:role:menu:edit', 1, 0, 1, '', null, 12, now(), null), +(38, '修改角色数据范围', 'EditSysRoleScope', null, 0, null, 2, null, 'sys:role:scope:edit', 1, 0, 1, '', null, 12, now(), null), +(39, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 12, now(), null), +(40, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 13, now(), null), +(41, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 13, now(), null), +(42, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 13, now(), null), +(43, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 29, now(), null), +(44, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 29, now(), null), +(45, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 29, now(), null), +(46, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 29, now(), null), +(47, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 30, now(), null), +(48, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 30, now(), null), +(49, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 30, now(), null), +(50, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 15, now(), null), +(51, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 15, now(), null), +(52, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 15, now(), null), +(53, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 16, now(), null), +(54, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 16, now(), null), +(55, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 16, now(), null), +(56, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 17, now(), null), +(57, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 17, now(), null), +(58, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 17, now(), null), +(59, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 17, now(), null), +(60, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 17, now(), null), +(61, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 17, now(), null), +(62, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 18, now(), null), +(63, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 18, now(), null), +(64, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 18, now(), null), +(65, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 19, now(), null), +(66, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 19, now(), null), +(67, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 19, now(), null), +(68, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 19, now(), null), +(69, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 19, now(), null), +(70, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 19, now(), null), +(71, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 19, now(), null), +(72, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 19, now(), null), +(73, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 21, now(), null), +(74, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 21, now(), null), +(75, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 22, now(), null), +(76, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 22, now(), null), +(77, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 23, now(), null); insert into sys_role (id, name, status, is_filter_scopes, remark, created_time, updated_time) -values (1, '测试', 1, 1, null, '2025-05-26 17:13:45', null); +values (1, '测试', 1, 1, null, now(), null); insert into sys_role_menu (id, role_id, menu_id) -values (1, 1, 1), - (2, 1, 2), - (3, 1, 3), - (4, 1, 4); +values +(1, 1, 1), +(2, 1, 2), +(3, 1, 3), +(4, 1, 4); insert into sys_user (id, uuid, username, nickname, password, salt, email, is_superuser, is_staff, status, is_multi_login, avatar, phone, join_time, last_login_time, dept_id, created_time, updated_time) -values (1, 'af4c804f-3966-4949-ace2-3bb7416ea926', 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', 0x24326224313224387932654E7563583139566A6D5A33745968424C634F, 'admin@example.com', 1, 1, 1, 1, null, null, '2023-06-26 17:13:45', '2024-11-18 13:53:57', 1, '2023-06-26 17:13:45', '2024-11-18 13:53:57'); +values (1, uuid(), 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', unhex('24326224313224387932654E7563583139566A6D5A33745968424C634F'), 'admin@example.com', 1, 1, 1, 1, null, null, now(), now(), 1, now(), null); insert into sys_user_role (id, user_id, role_id) -values (1, 1, 1); +values (1, 1, 1); insert into sys_data_scope (id, name, status, created_time, updated_time) -values (1, '测试部门数据权限', 1, '2025-06-09 16:53:29', null), - (2, '测试部门及以下数据权限', 1, '2025-06-09 16:53:40', null); +values +(1, '测试部门数据权限', 1, now(), null), +(2, '测试部门及以下数据权限', 1, now(), null); insert into sys_data_rule (id, name, model, `column`, operator, expression, `value`, created_time, updated_time) -values (1, '部门名称等于测试', '部门', 'name', 1, 0, '测试', '2025-06-09 16:56:06', null), - (2, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', '2025-06-09 17:16:14', null); +values +(1, '部门名称等于测试', '部门', 'name', 1, 0, '测试', now(), null), +(2, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', now(), null); insert into sys_data_scope_rule (id, data_scope_id, data_rule_id) -values (1, 1, 1), - (2, 2, 1), - (3, 2, 2); +values +(1, 1, 1), +(2, 2, 1), +(3, 2, 2); diff --git a/backend/sql/postgresql/init_snowflake_test_data.sql b/backend/sql/postgresql/init_snowflake_test_data.sql index ef6d2d30..59195382 100644 --- a/backend/sql/postgresql/init_snowflake_test_data.sql +++ b/backend/sql/postgresql/init_snowflake_test_data.sql @@ -1,109 +1,116 @@ -insert into sys_dept (id, name, sort, leader, phone, email, status, del_flag, parent_id, created_time, updated_time) -values (2047437114580271104, '测试', 0, null, null, null, 1, 0, null, '2025-05-26 17:13:45', null); +insert into sys_dept (id, name, sort, leader, phone, email, status, del_flag, parent_id, created_time, updated_time) +values (2048601264366944256, '测试', 0, null, null, null, 1, 0, null, now(), null); -insert into sys_menu (id, title, name, path, sort, icon, type, component, perms, status, display, cache, link, remark, parent_id, created_time, updated_time) -values (2047437114622214144, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:26:18', null), - (2047437114689323008, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:30:01', null), - (2047437114756431872, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:31:41', null), - (2047437114819346432, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:32:34', null), - (2047437114886455296, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:33:29', null), - (2047437114949369856, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:35:41', null), - (2047437115016478720, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 2047437114622214144, '2025-06-09 17:54:29', null), - (2047437115083587584, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 2047437114622214144, '2025-06-09 17:57:09', null), - (2047437115150696448, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 2047437114949369856, '2025-06-09 17:59:44', null), - (2047437115217805312, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 2047437114949369856, '2025-06-09 18:00:50', null), - (2047437115284914176, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 2047437114949369856, '2025-06-09 18:01:39', null), - (2047437115352023040, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:03:17', null), - (2047437115414937600, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:03:54', null), - (2047437115477852160, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:04:47', null), - (2047437115540766720, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:05:31', null), - (2047437115607875584, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:07:04', null), - (2047437115674984448, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 2047437115607875584, '2025-06-09 18:07:46', null), - (2047437115742093312, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 2047437115607875584, '2025-06-09 18:08:22', null), - (2047437115809202176, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:09:12', null), - (2047437115876311040, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:10:20', null), - (2047437115943419904, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:11:10', null), - (2047437116010528768, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2047437114689323008, '2025-06-09 18:11:38', null), - (2047437116077637632, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 2047437114756431872, '2025-06-09 18:12:38', null), - (2047437116144746496, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 2047437114756431872, '2025-06-09 18:13:19', null), - (2047437116211855360, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 2047437114819346432, '2025-06-09 18:14:35', null), - (2047437116274769920, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 2047437114819346432, '2025-06-09 18:15:26', null), - (2047437116341878784, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 2047437114886455296, '2025-06-09 18:17:12', null), - (2047437116408987648, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 2047437114886455296, '2025-06-09 18:17:42', null), - (2047437116476096512, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 2047437114886455296, '2025-06-09 18:18:12', null), - (2047437116543205376, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, '2025-06-09 18:18:12', null), - (2047437116610314240, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 2047437115352023040, '2025-06-09 18:21:17', null), - (2047437116677423104, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 2047437115352023040, '2025-06-09 18:22:01', null), - (2047437116744531968, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 2047437115352023040, '2025-06-09 18:22:39', null), - (2047437116807446528, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 2047437115414937600, '2025-06-09 18:24:09', null), - (2047437116870361088, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 2047437115477852160, '2025-06-09 18:25:08', null), - (2047437116937469952, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 2047437115477852160, '2025-06-09 18:26:30', null), - (2047437117004578816, '修改角色菜单', 'EditSysRoleMenu', null, 0, null, 2, null, 'sys:role:menu:edit', 1, 0, 1, '', null, 2047437115477852160, '2025-06-09 18:27:24', null), - (2047437117067493376, '修改角色数据范围', 'EditSysRoleScope', null, 0, null, 2, null, 'sys:role:scope:edit', 1, 0, 1, '', null, 2047437115477852160, '2025-06-09 18:28:25', null), - (2047437117134602240, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 2047437115477852160, '2025-06-09 18:28:55', null), - (2047437117201711104, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 2047437115540766720, '2025-06-09 18:29:51', null), - (2047437117268819968, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 2047437115540766720, '2025-06-09 18:30:13', null), - (2047437117335928832, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 2047437115540766720, '2025-06-09 18:30:37', null), - (2047437117403037696, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 2047437115674984448, '2025-06-09 18:31:11', null), - (2047437117470146560, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 2047437115674984448, '2025-06-09 18:31:42', null), - (2047437117537255424, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 2047437115674984448, '2025-06-09 18:32:36', null), - (2047437117600169984, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 2047437115674984448, '2025-06-09 18:33:09', null), - (2047437117663084544, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 2047437115742093312, '2025-06-09 18:35:54', null), - (2047437117730193408, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 2047437115742093312, '2025-06-09 18:36:19', null), - (2047437117793107968, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 2047437115742093312, '2025-06-09 18:36:44', null), - (2047437117860216832, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 2047437115809202176, '2025-06-09 18:38:14', null), - (2047437117927325696, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 2047437115809202176, '2025-06-09 18:39:08', null), - (2047437117994434560, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 2047437115809202176, '2025-06-09 18:39:47', null), - (2047437118061543424, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 2047437115876311040, '2025-06-09 18:45:52', null), - (2047437118128652288, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 2047437115876311040, '2025-06-09 18:46:13', null), - (2047437118195761152, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 2047437115876311040, '2025-06-09 18:46:36', null), - (2047437118262870016, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 2047437115943419904, '2025-06-09 18:48:17', null), - (2047437118325784576, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 2047437115943419904, '2025-06-09 18:48:49', null), - (2047437118392893440, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 2047437115943419904, '2025-06-09 18:49:23', null), - (2047437118460002304, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 2047437115943419904, '2025-06-09 18:50:01', null), - (2047437118527111168, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 2047437115943419904, '2025-06-09 18:50:26', null), - (2047437118594220032, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 2047437115943419904, '2025-06-09 18:50:48', null), - (2047437118661328896, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 2047437116010528768, '2025-06-09 18:51:22', null), - (2047437118728437760, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 2047437116010528768, '2025-06-09 18:51:45', null), - (2047437118791352320, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 2047437116010528768, '2025-06-09 18:52:10', null), - (2047437118858461184, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:53:07', null), - (2047437118921375744, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:53:45', null), - (2047437118988484608, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:54:11', null), - (2047437119055593472, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:54:45', null), - (2047437119118508032, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:55:08', null), - (2047437119185616896, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:55:35', null), - (2047437119252725760, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 18:58:16', null), - (2047437119319834624, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 2047437116077637632, '2025-06-09 19:01:22', null), - (2047437119386943488, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 2047437116211855360, '2025-06-09 19:02:21', null), - (2047437119454052352, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 2047437116211855360, '2025-06-09 19:02:50', null), - (2047437119521161216, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 2047437116274769920, '2025-06-09 19:03:13', null), - (2047437119584075776, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 2047437116274769920, '2025-06-09 19:03:40', null), - (2047437119651184640, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 2047437116341878784, '2025-06-09 19:04:52', null); +insert into sys_menu (id, title, name, path, sort, icon, type, component, perms, status, display, cache, link, remark, parent_id, created_time, updated_time) +values +-- 顶级菜单 +(2048601264425664512, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601264492773376, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601264559882240, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601264626991104, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601264694099968, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601264761208832, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2048601264828317696, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, now(), null), +-- 一级子菜单 +(2048601264895426560, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 2048601264425664512, now(), null), +(2048601264962535424, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 2048601264425664512, now(), null), +(2048601265029644288, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265096753152, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265163862016, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265226776576, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265289691136, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265352605696, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265419714560, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265486823424, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265553932288, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2048601264492773376, now(), null), +(2048601265616846848, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 2048601264559882240, now(), null), +(2048601265679761408, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 2048601264559882240, now(), null), +(2048601265746870272, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 2048601264626991104, now(), null), +(2048601265809784832, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 2048601264626991104, now(), null), +(2048601265876893696, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 2048601264694099968, now(), null), +(2048601265944002560, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 2048601264694099968, now(), null), +(2048601266011111424, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 2048601264694099968, now(), null), +(2048601266074025984, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 2048601264761208832, now(), null), +(2048601266141134848, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 2048601264761208832, now(), null), +(2048601266204049408, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 2048601264761208832, now(), null), +-- 二级子菜单 +(2048601266271158272, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 2048601265289691136, now(), null), +(2048601266334072832, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 2048601265289691136, now(), null), +-- 按钮权限 +(2048601266401181696, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 2048601265029644288, now(), null), +(2048601266468290560, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 2048601265029644288, now(), null), +(2048601266531205120, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 2048601265029644288, now(), null), +(2048601266594119680, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 2048601265096753152, now(), null), +(2048601266661228544, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 2048601265163862016, now(), null), +(2048601266728337408, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 2048601265163862016, now(), null), +(2048601266791251968, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 2048601265163862016, now(), null), +(2048601266858360832, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 2048601265226776576, now(), null), +(2048601266921275392, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 2048601265226776576, now(), null), +(2048601266984189952, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 2048601265226776576, now(), null), +(2048601267047104512, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 2048601266271158272, now(), null), +(2048601267114213376, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 2048601266271158272, now(), null), +(2048601267181322240, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 2048601266271158272, now(), null), +(2048601267248431104, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 2048601266271158272, now(), null), +(2048601267311345664, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 2048601266334072832, now(), null), +(2048601267378454528, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 2048601266334072832, now(), null), +(2048601267445563392, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 2048601266334072832, now(), null), +(2048601267512672256, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 2048601265352605696, now(), null), +(2048601267579781120, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 2048601265352605696, now(), null), +(2048601267646889984, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 2048601265352605696, now(), null), +(2048601267709804544, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 2048601265419714560, now(), null), +(2048601267772719104, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 2048601265419714560, now(), null), +(2048601267839827968, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 2048601265419714560, now(), null), +(2048601267906936832, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 2048601265486823424, now(), null), +(2048601267969851392, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 2048601265486823424, now(), null), +(2048601268036960256, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 2048601265486823424, now(), null), +(2048601268099874816, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 2048601265486823424, now(), null), +(2048601268162789376, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 2048601265486823424, now(), null), +(2048601268229898240, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 2048601265486823424, now(), null), +(2048601268297007104, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 2048601265553932288, now(), null), +(2048601268364115968, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 2048601265553932288, now(), null), +(2048601268427030528, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 2048601265553932288, now(), null), +(2048601268494139392, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268557053952, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268624162816, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268691271680, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268754186240, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268821295104, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268884209664, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601268951318528, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 2048601265616846848, now(), null), +(2048601269018427392, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 2048601265746870272, now(), null), +(2048601269081341952, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 2048601265746870272, now(), null), +(2048601269144256512, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 2048601265809784832, now(), null), +(2048601269211365376, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 2048601265809784832, now(), null), +(2048601269278474240, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 2048601265876893696, now(), null); -insert into sys_role (id, name, status, is_filter_scopes, remark, created_time, updated_time) -values (2047437119714099200, '测试', 1, 1, null, '2025-05-26 17:13:45', null); +insert into sys_role (id, name, status, is_filter_scopes, remark, created_time, updated_time) +values (2048601269345583104, '测试', 1, 1, null, now(), null); -insert into sys_role_menu (id, role_id, menu_id) -values (2047437119781208064, 2047437119714099200, 2047437114622214144), - (2047437119844122624, 2047437119714099200, 2047437114689323008), - (2047437119911231488, 2047437119714099200, 2047437114756431872), - (2047437119974146048, 2047437119714099200, 2047437114819346432); +insert into sys_role_menu (id, role_id, menu_id) +values +(2048601269412691968, 2048601269345583104, 2048601264425664512), +(2048601269479800832, 2048601269345583104, 2048601264492773376), +(2048601269546909696, 2048601269345583104, 2048601264559882240), +(2048601269609824256, 2048601269345583104, 2048601264626991104); -insert into sys_user (id, uuid, username, nickname, password, salt, email, is_superuser, is_staff, status, is_multi_login, avatar, phone, join_time, last_login_time, dept_id, created_time, updated_time) -values (2047437120041254912, 'af4c804f-3966-4949-ace2-3bb7416ea926', 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', '0x24326224313224387932654E7563583139566A6D5A33745968424C634F', 'admin@example.com', 1, 1, 1, 1, null, null, '2023-06-26 17:13:45', '2024-11-18 13:53:57', 2047437114580271104, '2023-06-26 17:13:45', '2024-11-18 13:53:57'); +insert into sys_user (id, uuid, username, nickname, password, salt, email, is_superuser, is_staff, status, is_multi_login, avatar, phone, join_time, last_login_time, dept_id, created_time, updated_time) +values (2048601269672738816, gen_random_uuid(), 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', decode('24326224313224387932654E7563583139566A6D5A33745968424C634F', 'hex'), 'admin@example.com', 1, 1, 1, 1, null, null, now(), now(), 2048601264366944256, now(), null); -insert into sys_user_role (id, user_id, role_id) -values (2047437120108363776, 2047437120041254912, 2047437119714099200); +insert into sys_user_role (id, user_id, role_id) +values (2048601269739847680, 2048601269672738816, 2048601269345583104); -insert into sys_data_scope (id, name, status, created_time, updated_time) -values (2047437120175472640, '测试部门数据权限', 1, '2025-06-09 16:53:29', null), - (2047437120242581504, '测试部门及以下数据权限', 1, '2025-06-09 16:53:40', null); +insert into sys_data_scope (id, name, status, created_time, updated_time) +values +(2048601269806956544, '测试部门数据权限', 1, now(), null), +(2048601269869871104, '测试部门及以下数据权限', 1, now(), null); -insert into sys_data_rule (id, name, model, "column", operator, expression, "value", created_time, updated_time) -values (2047437120309690368, '部门名称等于测试', '部门', 'name', 1, 0, '测试', '2025-06-09 16:56:06', null), - (2047437120376799232, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', '2025-06-09 17:16:14', null); +insert into sys_data_rule (id, name, model, "column", operator, expression, "value", created_time, updated_time) +values +(2048601269932785664, '部门名称等于测试', '部门', 'name', 1, 0, '测试', now(), null), +(2048601269999894528, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', now(), null); -insert into sys_data_scope_rule (id, data_scope_id, data_rule_id) -values (2047437120443908096, 2047437120175472640, 2047437120309690368), - (2047437120511016960, 2047437120242581504, 2047437120309690368), - (2047437120578125824, 2047437120242581504, 2047437120376799232); +insert into sys_data_scope_rule (id, data_scope_id, data_rule_id) +values +(2048601270062809088, 2048601269806956544, 2048601269932785664), +(2048601270125723648, 2048601269869871104, 2048601269932785664), +(2048601270192832512, 2048601269869871104, 2048601269999894528); diff --git a/backend/sql/postgresql/init_test_data.sql b/backend/sql/postgresql/init_test_data.sql index 8850b172..aec26b00 100644 --- a/backend/sql/postgresql/init_test_data.sql +++ b/backend/sql/postgresql/init_test_data.sql @@ -1,120 +1,127 @@ insert into sys_dept (id, name, sort, leader, phone, email, status, del_flag, parent_id, created_time, updated_time) -values (1, '测试', 0, null, null, null, 1, 0, null, '2025-05-26 17:13:45', null); +values (1, '测试', 0, null, null, null, 1, 0, null, now(), null); insert into sys_menu (id, title, name, path, sort, icon, type, component, perms, status, display, cache, link, remark, parent_id, created_time, updated_time) -values (1, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:26:18', null), - (2, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:30:01', null), - (3, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:31:41', null), - (4, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:32:34', null), - (5, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:33:29', null), - (6, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, '2025-06-09 17:35:41', null), - (7, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 1, '2025-06-09 17:54:29', null), - (8, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 1, '2025-06-09 17:57:09', null), - (9, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 6, '2025-06-09 17:59:44', null), - (10, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 6, '2025-06-09 18:00:50', null), - (11, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 6, '2025-06-09 18:01:39', null), - (12, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:03:17', null), - (13, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:03:54', null), - (14, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:04:47', null), - (15, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:05:31', null), - (16, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2, '2025-06-09 18:07:04', null), - (17, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 16, '2025-06-09 18:07:46', null), - (18, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 16, '2025-06-09 18:08:22', null), - (19, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:09:12', null), - (20, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:10:20', null), - (21, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:11:10', null), - (22, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2, '2025-06-09 18:11:38', null), - (23, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 3, '2025-06-09 18:12:38', null), - (24, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 3, '2025-06-09 18:13:19', null), - (25, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 4, '2025-06-09 18:14:35', null), - (26, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 4, '2025-06-09 18:15:26', null), - (27, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 5, '2025-06-09 18:17:12', null), - (28, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 5, '2025-06-09 18:17:42', null), - (29, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 5, '2025-06-09 18:18:12', null), - (30, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, '2025-06-09 18:18:12', null), - (31, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 12, '2025-06-09 18:21:17', null), - (32, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 12, '2025-06-09 18:22:01', null), - (33, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 12, '2025-06-09 18:22:39', null), - (34, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 13, '2025-06-09 18:24:09', null), - (35, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 14, '2025-06-09 18:25:08', null), - (36, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 14, '2025-06-09 18:26:30', null), - (37, '修改角色菜单', 'EditSysRoleMenu', null, 0, null, 2, null, 'sys:role:menu:edit', 1, 0, 1, '', null, 14, '2025-06-09 18:27:24', null), - (38, '修改角色数据范围', 'EditSysRoleScope', null, 0, null, 2, null, 'sys:role:scope:edit', 1, 0, 1, '', null, 14, '2025-06-09 18:28:25', null), - (39, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 14, '2025-06-09 18:28:55', null), - (40, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 15, '2025-06-09 18:29:51', null), - (41, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 15, '2025-06-09 18:30:13', null), - (42, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 15, '2025-06-09 18:30:37', null), - (43, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 17, '2025-06-09 18:31:11', null), - (44, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 17, '2025-06-09 18:31:42', null), - (45, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 17, '2025-06-09 18:32:36', null), - (46, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 17, '2025-06-09 18:33:09', null), - (47, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 18, '2025-06-09 18:35:54', null), - (48, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 18, '2025-06-09 18:36:19', null), - (49, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 18, '2025-06-09 18:36:44', null), - (50, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 19, '2025-06-09 18:38:14', null), - (51, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 19, '2025-06-09 18:39:08', null), - (52, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 19, '2025-06-09 18:39:47', null), - (53, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 20, '2025-06-09 18:45:52', null), - (54, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 20, '2025-06-09 18:46:13', null), - (55, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 20, '2025-06-09 18:46:36', null), - (56, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 21, '2025-06-09 18:48:17', null), - (57, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 21, '2025-06-09 18:48:49', null), - (58, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 21, '2025-06-09 18:49:23', null), - (59, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 21, '2025-06-09 18:50:01', null), - (60, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 21, '2025-06-09 18:50:26', null), - (61, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 21, '2025-06-09 18:50:48', null), - (62, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 22, '2025-06-09 18:51:22', null), - (63, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 22, '2025-06-09 18:51:45', null), - (64, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 22, '2025-06-09 18:52:10', null), - (65, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 23, '2025-06-09 18:53:07', null), - (66, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 23, '2025-06-09 18:53:45', null), - (67, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 23, '2025-06-09 18:54:11', null), - (68, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 23, '2025-06-09 18:54:45', null), - (69, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 23, '2025-06-09 18:55:08', null), - (70, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 23, '2025-06-09 18:55:35', null), - (71, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 23, '2025-06-09 18:58:16', null), - (72, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 23, '2025-06-09 19:01:22', null), - (73, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 25, '2025-06-09 19:02:21', null), - (74, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 25, '2025-06-09 19:02:50', null), - (75, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 26, '2025-06-09 19:03:13', null), - (76, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 26, '2025-06-09 19:03:40', null), - (77, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 27, '2025-06-09 19:04:52', null); +values +-- 顶级菜单 +(1, '概览', 'Dashboard', 'dashboard', 0, 'ant-design:dashboard-outlined', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(2, '系统管理', 'System', 'system', 1, 'eos-icons:admin', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(3, '系统自动化', 'Automation', 'automation', 2, 'material-symbols:automation', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(4, '日志管理', 'Log', 'log', 3, 'carbon:cloud-logging', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(5, '系统监控', 'Monitor', 'monitor', 4, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(6, '项目', 'Project', 'fba', 5, 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 0, null, null, 1, 1, 1, '', null, null, now(), null), +(7, '个人中心', 'Profile', 'profile', 6, 'ant-design:profile-outlined', 1, '/_core/profile/index', null, 1, 0, 1, '', null, null, now(), null), +-- 一级子菜单 +(8, '分析页', 'Analytics', 'analytics', 0, 'lucide:area-chart', 1, '/dashboard/analytics/index', null, 1, 1, 1, '', null, 1, now(), null), +(9, '工作台', 'Workspace', 'workspace', 1, 'carbon:workspace', 1, '/dashboard/workspace/index', null, 1, 1, 1, '', null, 1, now(), null), +(10, '部门管理', 'SysDept', 'sys-dept', 1, 'mingcute:department-line', 1, '/system/dept/index', null, 1, 1, 1, '', null, 2, now(), null), +(11, '用户管理', 'SysUser', 'sys-user', 2, 'ant-design:user-outlined', 1, '/system/user/index', null, 1, 1, 1, '', null, 2, now(), null), +(12, '角色管理', 'SysRole', 'sys-role', 3, 'carbon:user-role', 1, '/system/role/index', null, 1, 1, 1, '', null, 2, now(), null), +(13, '菜单管理', 'SysMenu', 'sys-menu', 4, 'ant-design:menu-outlined', 1, '/system/menu/index', null, 1, 1, 1, '', null, 2, now(), null), +(14, '数据权限', 'SysDataPermission', 'sys-data-permission', 5, 'icon-park-outline:permissions', 0, null, null, 1, 1, 1, '', null, 2, now(), null), +(15, '插件管理', 'SysPlugin', 'sys-plugin', 8, 'clarity:plugin-line', 1, '/system/plugin/index', null, 1, 1, 1, '', null, 2, now(), null), +(16, '参数管理', 'SysConfig', 'sys-config', 9, 'codicon:symbol-parameter', 1, '/system/config/index', null, 1, 1, 1, '', null, 2, now(), null), +(17, '字典管理', 'SysDict', 'sys-dict', 10, 'fluent-mdl2:dictionary', 1, '/system/dict/index', null, 1, 1, 1, '', null, 2, now(), null), +(18, '通知公告', 'SysNotice', 'sys-notice', 11, 'fe:notice-push', 1, '/system/notice/index', null, 1, 1, 1, '', null, 2, now(), null), +(19, '代码生成', 'CodeGenerator', 'code-generator', 1, 'tabler:code', 1, '/automation/code-generator/index', null, 1, 1, 1, '', null, 3, now(), null), +(20, '任务调度', 'Scheduler', 'scheduler', 2, 'ix:scheduler', 1, '/automation/scheduler/index', null, 1, 1, 1, '', null, 3, now(), null), +(21, '登录日志', 'LoginLog', 'login', 1, 'mdi:login', 1, '/log/login/index', null, 1, 1, 1, '', null, 4, now(), null), +(22, '操作日志', 'OperaLog', 'opera', 2, 'carbon:operations-record', 1, '/log/opera/index', null, 1, 1, 1, '', null, 4, now(), null), +(23, '在线用户', 'Online', 'online', 1, 'wpf:online', 1, '/monitor/online/index', null, 1, 1, 1, '', null, 5, now(), null), +(24, 'Redis', 'Redis', 'redis', 2, 'devicon:redis', 1, '/monitor/redis/index', null, 1, 1, 1, '', null, 5, now(), null), +(25, 'Server', 'Server', 'server', 3, 'mdi:server-outline', 1, '/monitor/server/index', null, 1, 1, 1, '', null, 5, now(), null), +(26, '文档', 'Document', 'document', 1, 'lucide:book-open-text', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://fastapi-practices.github.io/fastapi_best_architecture_docs', null, 6, now(), null), +(27, 'Github', 'Github', 'github', 2, 'ant-design:github-filled', 4, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://github.com/fastapi-practices/fastapi_best_architecture', null, 6, now(), null), +(28, 'Apifox', 'Apifox', 'apifox', 3, 'simple-icons:apifox', 3, '/_core/fallback/iframe.vue', null, 1, 1, 1, 'https://apifox.com/apidoc/shared-28a93f02-730b-4f33-bb5e-4dad92058cc0', null, 6, now(), null), +-- 二级子菜单 +(29, '数据范围', 'SysDataScope', 'sys-data-scope', 6, 'cuida:scope-outline', 1, '/system/data-permission/scope/index', null, 1, 1, 1, '', null, 14, now(), null), +(30, '数据规则', 'SysDataRule', 'sys-data-rule', 7, 'material-symbols:rule', 1, '/system/data-permission/rule/index', null, 1, 1, 1, '', null, 14, now(), null), +-- 按钮权限 +(31, '新增', 'AddSysDept', null, 0, null, 2, null, 'sys:dept:add', 1, 0, 1, '', null, 10, now(), null), +(32, '修改', 'EditSysDept', null, 0, null, 2, null, 'sys:dept:edit', 1, 0, 1, '', null, 10, now(), null), +(33, '删除', 'DeleteSysDept', null, 0, null, 2, null, 'sys:dept:del', 1, 0, 1, '', null, 10, now(), null), +(34, '删除', 'DeleteSysUser', null, 0, null, 2, null, 'sys:user:del', 1, 0, 1, '', null, 11, now(), null), +(35, '新增', 'AddSysRole', null, 0, null, 2, null, 'sys:role:add', 1, 0, 1, '', null, 12, now(), null), +(36, '修改', 'EditSysRole', null, 0, null, 2, null, 'sys:role:edit', 1, 0, 1, '', null, 12, now(), null), +(37, '删除', 'DeleteSysRole', null, 0, null, 2, null, 'sys:role:del', 1, 0, 1, '', null, 12, now(), null), +(38, '新增', 'AddSysMenu', null, 0, null, 2, null, 'sys:menu:add', 1, 0, 1, '', null, 13, now(), null), +(39, '修改', 'EditSysMenu', null, 0, null, 2, null, 'sys:menu:edit', 1, 0, 1, '', null, 13, now(), null), +(40, '删除', 'DeleteSysMenu', null, 0, null, 2, null, 'sys:menu:del', 1, 0, 1, '', null, 13, now(), null), +(41, '新增', 'AddSysDataScope', null, 0, null, 2, null, 'data:scope:add', 1, 0, 1, '', null, 29, now(), null), +(42, '修改', 'EditSysDataScope', null, 0, null, 2, null, 'data:scope:edit', 1, 0, 1, '', null, 29, now(), null), +(43, '修改数据范围规则', 'EditDataScopeRule', null, 0, null, 2, null, 'data:scope:rule:edit', 1, 0, 1, '', null, 29, now(), null), +(44, '删除', 'DeleteSysDataScope', null, 0, null, 2, null, 'data:scope:del', 1, 0, 1, '', null, 29, now(), null), +(45, '新增', 'AddSysDataRule', null, 0, null, 2, null, 'data:rule:add', 1, 0, 1, '', null, 30, now(), null), +(46, '修改', 'EditSysDataRule', null, 0, null, 2, null, 'data:rule:edit', 1, 0, 1, '', null, 30, now(), null), +(47, '删除', 'DeleteSysDataRule', null, 0, null, 2, null, 'data:rule:del', 1, 0, 1, '', null, 30, now(), null), +(48, '安装插件', 'InstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:install', 1, 0, 1, '', null, 15, now(), null), +(49, '卸载', 'UninstallSysPlugin', null, 0, null, 2, null, 'sys:plugin:uninstall', 1, 0, 1, '', null, 15, now(), null), +(50, '修改', 'EditSysPlugin', null, 0, null, 2, null, 'sys:plugin:edit', 1, 0, 1, '', null, 15, now(), null), +(51, '新增', 'AddSysConfig', null, 0, null, 2, null, 'sys:config:add', 1, 0, 1, '', null, 16, now(), null), +(52, '修改', 'EditSysConfig', null, 0, null, 2, null, 'sys:config:edit', 1, 0, 1, '', null, 16, now(), null), +(53, '删除', 'DeleteSysConfig', null, 0, null, 2, null, 'sys:config:del', 1, 0, 1, '', null, 16, now(), null), +(54, '新增类型', 'AddSysDictType', null, 0, null, 2, null, 'dict:type:add', 1, 0, 1, '', null, 17, now(), null), +(55, '修改类型', 'EditSysDictType', null, 0, null, 2, null, 'dict:type:edit', 1, 0, 1, '', null, 17, now(), null), +(56, '删除类型', 'DeleteSysDictType', null, 0, null, 2, null, 'dict:type:del', 1, 0, 1, '', null, 17, now(), null), +(57, '新增', 'AddSysDictData', null, 0, null, 2, null, 'dict:data:add', 1, 0, 1, '', null, 17, now(), null), +(58, '修改', 'EditSysDictData', null, 0, null, 2, null, 'dict:data:edit', 1, 0, 1, '', null, 17, now(), null), +(59, '删除', 'DeleteSysDictData', null, 0, null, 2, null, 'dict:data:del', 1, 0, 1, '', null, 17, now(), null), +(60, '新增', 'AddSysNotice', null, 0, null, 2, null, 'sys:notice:add', 1, 0, 1, '', null, 18, now(), null), +(61, '修改', 'EditSysNotice', null, 0, null, 2, null, 'sys:notice:edit', 1, 0, 1, '', null, 18, now(), null), +(62, '删除', 'DeleteSysNotice', null, 0, null, 2, null, 'sys:notice:del', 1, 0, 1, '', null, 18, now(), null), +(63, '新增业务', 'AddSysGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:add', 1, 0, 1, '', null, 19, now(), null), +(64, '修改业务', 'EditGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:edit', 1, 0, 1, '', null, 19, now(), null), +(65, '删除业务', 'DeleteGenCodeBusiness', null, 0, null, 2, null, 'codegen:business:del', 1, 0, 1, '', null, 19, now(), null), +(66, '新增模型', 'AddGenCodeModel', null, 0, null, 2, null, 'codegen:model:add', 1, 0, 1, '', null, 19, now(), null), +(67, '修改模型', 'EditGenCodeModel', null, 0, null, 2, null, 'codegen:model:edit', 1, 0, 1, '', null, 19, now(), null), +(68, '删除模型', 'DeleteGenCodeModel', null, 0, null, 2, null, 'codegen:model:del', 1, 0, 1, '', null, 19, now(), null), +(69, '导入', 'ImportGenCode', null, 0, null, 2, null, 'codegen:table:import', 1, 0, 1, '', null, 19, now(), null), +(70, '写入', 'WriteGenCode', null, 0, null, 2, null, 'codegen:local:write', 1, 0, 1, '', null, 19, now(), null), +(71, '删除', 'DeleteSysLoginLog', null, 0, null, 2, null, 'log:login:del', 1, 0, 1, '', null, 21, now(), null), +(72, '清空', 'EmptyLoginLog', null, 0, null, 2, null, 'log:login:clear', 1, 0, 1, '', null, 21, now(), null), +(73, '删除', 'DeleteOperaLog', null, 0, null, 2, null, 'log:opera:del', 1, 0, 1, '', null, 22, now(), null), +(74, '清空', 'EmptyOperaLog', null, 0, null, 2, null, 'log:opera:clear', 1, 0, 1, '', null, 22, now(), null), +(75, '下线', 'KickSysToken', null, 0, null, 2, null, 'sys:session:delete', 1, 0, 1, '', null, 23, now(), null); insert into sys_role (id, name, status, is_filter_scopes, remark, created_time, updated_time) -values (1, '测试', 1, 1, null, '2025-05-26 17:13:45', null); +values (1, '测试', 1, 1, null, now(), null); insert into sys_role_menu (id, role_id, menu_id) -values (1, 1, 1), - (2, 1, 2), - (3, 1, 3), - (4, 1, 4); +values +(1, 1, 1), +(2, 1, 2), +(3, 1, 3), +(4, 1, 4); insert into sys_user (id, uuid, username, nickname, password, salt, email, is_superuser, is_staff, status, is_multi_login, avatar, phone, join_time, last_login_time, dept_id, created_time, updated_time) -values (1, 'af4c804f-3966-4949-ace2-3bb7416ea926', 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', '0x24326224313224387932654E7563583139566A6D5A33745968424C634F', 'admin@example.com', 1, 1, 1, 1, null, null, '2023-06-26 17:13:45', '2024-11-18 13:53:57', 1, '2023-06-26 17:13:45', '2024-11-18 13:53:57'); +values (1, gen_random_uuid(), 'admin', '用户88888', '$2b$12$8y2eNucX19VjmZ3tYhBLcOsBwy9w1IjBQE4SSqwMDL5bGQVp2wqS.', decode('24326224313224387932654E7563583139566A6D5A33745968424C634F', 'hex'), 'admin@example.com', 1, 1, 1, 1, null, null, now(), now(), 1, now(), null); insert into sys_user_role (id, user_id, role_id) -values (1, 1, 1); +values (1, 1, 1); insert into sys_data_scope (id, name, status, created_time, updated_time) -values (1, '测试部门数据权限', 1, '2025-06-09 16:53:29', null), - (2, '测试部门及以下数据权限', 1, '2025-06-09 16:53:40', null); +values +(1, '测试部门数据权限', 1, now(), null), +(2, '测试部门及以下数据权限', 1, now(), null); insert into sys_data_rule (id, name, model, "column", operator, expression, "value", created_time, updated_time) -values (1, '部门名称等于测试', '部门', 'name', 1, 0, '测试', '2025-06-09 16:56:06', null), - (2, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', '2025-06-09 17:16:14', null); +values +(1, '部门名称等于测试', '部门', 'name', 1, 0, '测试', now(), null), +(2, '父部门 ID 等于 1', '部门', 'parent_id', 0, 0, '1', now(), null); insert into sys_data_scope_rule (id, data_scope_id, data_rule_id) -values (1, 1, 1), - (2, 2, 1), - (3, 2, 2); +values +(1, 1, 1), +(2, 2, 1), +(3, 2, 2); --- Reset auto-increment values for each table based on max id -SELECT setval(pg_get_serial_sequence('sys_dept', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_dept; -SELECT setval(pg_get_serial_sequence('sys_menu', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_menu; -SELECT setval(pg_get_serial_sequence('sys_role', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_role; -SELECT setval(pg_get_serial_sequence('sys_role_menu', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_role_menu; -SELECT setval(pg_get_serial_sequence('sys_user', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_user; -SELECT setval(pg_get_serial_sequence('sys_user_role', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_user_role; -SELECT setval(pg_get_serial_sequence('sys_data_scope', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_data_scope; -SELECT setval(pg_get_serial_sequence('sys_data_rule', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_data_rule; -SELECT setval(pg_get_serial_sequence('sys_data_scope_rule', 'id'),COALESCE(MAX(id), 0) + 1, true) FROM sys_data_scope_rule; +-- reset auto-increment values for each table based on max id +select setval(pg_get_serial_sequence('sys_dept', 'id'),coalesce(max(id), 0) + 1, true) from sys_dept; +select setval(pg_get_serial_sequence('sys_menu', 'id'),coalesce(max(id), 0) + 1, true) from sys_menu; +select setval(pg_get_serial_sequence('sys_role', 'id'),coalesce(max(id), 0) + 1, true) from sys_role; +select setval(pg_get_serial_sequence('sys_role_menu', 'id'),coalesce(max(id), 0) + 1, true) from sys_role_menu; +select setval(pg_get_serial_sequence('sys_user', 'id'),coalesce(max(id), 0) + 1, true) from sys_user; +select setval(pg_get_serial_sequence('sys_user_role', 'id'),coalesce(max(id), 0) + 1, true) from sys_user_role; +select setval(pg_get_serial_sequence('sys_data_scope', 'id'),coalesce(max(id), 0) + 1, true) from sys_data_scope; +select setval(pg_get_serial_sequence('sys_data_rule', 'id'),coalesce(max(id), 0) + 1, true) from sys_data_rule; +select setval(pg_get_serial_sequence('sys_data_scope_rule', 'id'),coalesce(max(id), 0) + 1, true) from sys_data_scope_rule;