From 8cb93d31d11a743110858ebb7adfe51031f7b724 Mon Sep 17 00:00:00 2001 From: zhangtao <9480807882@qq.com> Date: Sat, 6 Sep 2025 14:01:53 +0800 Subject: [PATCH 01/13] =?UTF-8?q?fix(core):=20=E4=BF=AE=E6=AD=A3=20ID=20?= =?UTF-8?q?=E8=87=AA=E5=A2=9E=E5=92=8C=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E4=BD=93=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改基础模型中主键ID的自增参数为 autoincrement=True,确保自增行为正确 - 优化操作日志路由中请求体解析逻辑,增加 JSON 解码异常处理,提升健壮性 - 分别使用 'body' 和 'path_params' 字段存储请求体和路径参数,避免参数冲突 - 调整.env.dev配置,切换数据库类型为 PostgreSQL,更新相关连接配置项 - 清理脚本数据 JSON 文件中的冗余 id 字段,保持数据格式简洁一致 --- backend/app/core/base_model.py | 2 +- backend/app/core/router_class.py | 12 +- backend/app/scripts/data/monitor_job.json | 3 - backend/app/scripts/data/system_config.json | 12 - backend/app/scripts/data/system_position.json | 7 - backend/env/.env.dev | 18 +- ...sql => fastapiadmin_2025-09-06_011342.sql} | 30 +- ...sql => fastapiadmin_2025-09-06_013358.sql} | 385 +++++++++--------- 8 files changed, 233 insertions(+), 236 deletions(-) rename backend/sql/mysql/{fastapi_vue_admin_2025-09-05_005325.sql => fastapiadmin_2025-09-06_011342.sql} (65%) rename backend/sql/postgresql/{fastapi_vue_admin_2025-09-05_004952.sql => fastapiadmin_2025-09-06_013358.sql} (84%) diff --git a/backend/app/core/base_model.py b/backend/app/core/base_model.py index 9f2e0c9c..278c3e64 100644 --- a/backend/app/core/base_model.py +++ b/backend/app/core/base_model.py @@ -42,7 +42,7 @@ class ModelMixin(MappedBase): """ __abstract__ = True - id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement='auto', comment='主键ID') + id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True, comment='主键ID') status: Mapped[bool] = mapped_column(Boolean(), default=True, nullable=False, comment="是否启用(True:启用 False:禁用)") description: Mapped[Optional[str]] = mapped_column(Text, nullable=True, comment="备注说明") created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment='创建时间') diff --git a/backend/app/core/router_class.py b/backend/app/core/router_class.py index 982d7243..94ca320d 100644 --- a/backend/app/core/router_class.py +++ b/backend/app/core/router_class.py @@ -53,10 +53,18 @@ class OperationLogRoute(APIRoute): payload = await request.body() path_params = request.path_params oper_param = {} + + # 处理请求体数据 if payload: - oper_param.update(json.loads(payload.decode())) + try: + oper_param['body'] = json.loads(payload.decode()) + except (json.JSONDecodeError, UnicodeDecodeError): + oper_param['body'] = payload.decode('utf-8', errors='ignore') + + # 处理路径参数 if path_params: - oper_param.update(path_params) + oper_param['path_params'] = dict(path_params) + payload = json.dumps(oper_param, ensure_ascii=False) # payload = str(oper_param) diff --git a/backend/app/scripts/data/monitor_job.json b/backend/app/scripts/data/monitor_job.json index 0ea21c41..547ba9dc 100644 --- a/backend/app/scripts/data/monitor_job.json +++ b/backend/app/scripts/data/monitor_job.json @@ -1,6 +1,5 @@ [ { - "id": 1, "name": "系统默认(无参)", "func": "scheduler_test.job", "trigger": "cron", @@ -18,7 +17,6 @@ "creator_id": 1 }, { - "id": 2, "name": "系统默认(有参)", "func": "scheduler_test.job", "trigger": "cron", @@ -36,7 +34,6 @@ "creator_id": 1 }, { - "id": 3, "name": "系统默认(多参)", "func": "scheduler_test.job", "trigger": "cron", diff --git a/backend/app/scripts/data/system_config.json b/backend/app/scripts/data/system_config.json index 2b4d3747..88661667 100644 --- a/backend/app/scripts/data/system_config.json +++ b/backend/app/scripts/data/system_config.json @@ -1,6 +1,5 @@ [ { - "id": 1, "config_name": "网站名称", "config_key": "sys_web_title", "config_value": "FastAPI Vue3 Admin", @@ -9,7 +8,6 @@ "creator_id": 1 }, { - "id": 2, "config_name": "网站描述", "config_key": "sys_web_description", "config_value": "FastAPI Vue3 Admin 是完全开源的权限管理系统", @@ -18,7 +16,6 @@ "creator_id": 1 }, { - "id": 3, "config_name": "网页图标", "config_key": "sys_web_favicon", "config_value": "https://service.fastapiadmin.com/api/v1/static/image/favicon.png", @@ -27,7 +24,6 @@ "creator_id": 1 }, { - "id": 4, "config_name": "网站Logo", "config_key": "sys_web_logo", "config_value": "https://service.fastapiadmin.com/api/v1/static/image/logo.png", @@ -36,7 +32,6 @@ "creator_id": 1 }, { - "id": 5, "config_name": "登录背景", "config_key": "sys_login_background", "config_value": "https://service.fastapiadmin.com/api/v1/static/image/background.svg", @@ -45,7 +40,6 @@ "creator_id": 1 }, { - "id": 6, "config_name": "版权信息", "config_key": "sys_web_copyright", "config_value": "Copyright © 2025-2026 service.fastapiadmin.com 版权所有", @@ -54,7 +48,6 @@ "creator_id": 1 }, { - "id": 7, "config_name": "备案信息", "config_key": "sys_keep_record", "config_value": "陕ICP备2025069493号-1", @@ -63,7 +56,6 @@ "creator_id": 1 }, { - "id": 8, "config_name": "帮助文档", "config_key": "sys_help_doc", "config_value": "https://service.fastapiadmin.com", @@ -72,7 +64,6 @@ "creator_id": 1 }, { - "id": 9, "config_name": "隐私政策", "config_key": "sys_web_privacy", "config_value": "https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE", @@ -81,7 +72,6 @@ "creator_id": 1 }, { - "id": 10, "config_name": "用户协议", "config_key": "sys_web_clause", "config_value": "https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE", @@ -90,7 +80,6 @@ "creator_id": 1 }, { - "id": 11, "config_name": "源码代码", "config_key": "sys_git_code", "config_value": "https://github.com/1014TaoTao/fastapi_vue3_admin.git", @@ -99,7 +88,6 @@ "creator_id": 1 }, { - "id": 12, "config_name": "项目版本", "config_key": "sys_web_version", "config_value": "2.0.0", diff --git a/backend/app/scripts/data/system_position.json b/backend/app/scripts/data/system_position.json index c300711c..e9b6f2cc 100644 --- a/backend/app/scripts/data/system_position.json +++ b/backend/app/scripts/data/system_position.json @@ -1,6 +1,5 @@ [ { - "id": 1, "name": "董事长岗", "status": true, "order": 1, @@ -8,7 +7,6 @@ "creator_id": 1 }, { - "id": 2, "name": "运营岗", "status": true, "order": 2, @@ -16,7 +14,6 @@ "creator_id": 1 }, { - "id": 3, "name": "销售岗", "status": true, "order": 3, @@ -24,7 +21,6 @@ "creator_id": 1 }, { - "id": 4, "name": "人事行政岗", "status": true, "order": 4, @@ -32,7 +28,6 @@ "creator_id": 1 }, { - "id": 5, "name": "开发岗", "status": true, "order": 5, @@ -40,7 +35,6 @@ "creator_id": 1 }, { - "id": 6, "name": "测试岗", "status": true, "order": 6, @@ -48,7 +42,6 @@ "creator_id": 1 }, { - "id": 7, "name": "演示岗", "status": true, "order": 7, diff --git a/backend/env/.env.dev b/backend/env/.env.dev index a72cd026..cbacfe7c 100644 --- a/backend/env/.env.dev +++ b/backend/env/.env.dev @@ -29,24 +29,24 @@ ROOT_PATH = "/api/v1" # API路由前缀 DEMO_ENABLE = False # 是否启用演示模式 # 数据库配置 -DATABASE_TYPE = "sqlite" # sqlite、mysql、postgresql +DATABASE_TYPE = "postgresql" # sqlite、mysql、postgresql # SQLite配置 SQLITE_DB_NAME = "dev_sql.db" # 数据库配置 -DATABASE_HOST = "localhost" -DATABASE_PORT = 3306 # MySQL默认端口3006 PostgreSQL默认端口5432 -DATABASE_USER = "root" # postgresql默认用户名tao -DATABASE_PASSWORD = "ServBay.dev" -DATABASE_NAME = "fastapiadmin" - # DATABASE_HOST = "localhost" -# DATABASE_PORT = 5432 # MySQL默认端口3006 PostgreSQL默认端口5432 -# DATABASE_USER = "tao" # postgresql默认用户名tao +# DATABASE_PORT = 3306 # MySQL默认端口3006 PostgreSQL默认端口5432 +# DATABASE_USER = "root" # postgresql默认用户名tao # DATABASE_PASSWORD = "ServBay.dev" # DATABASE_NAME = "fastapiadmin" +DATABASE_HOST = "localhost" +DATABASE_PORT = 5432 # MySQL默认端口3006 PostgreSQL默认端口5432 +DATABASE_USER = "tao" # postgresql默认用户名tao +DATABASE_PASSWORD = "ServBay.dev" +DATABASE_NAME = "fastapiadmin" + # Redis配置 REDIS_ENABLE = True REDIS_HOST = "localhost" diff --git a/backend/sql/mysql/fastapi_vue_admin_2025-09-05_005325.sql b/backend/sql/mysql/fastapiadmin_2025-09-06_011342.sql similarity index 65% rename from backend/sql/mysql/fastapi_vue_admin_2025-09-05_005325.sql rename to backend/sql/mysql/fastapiadmin_2025-09-06_011342.sql index 56ea56b3..f114397c 100644 --- a/backend/sql/mysql/fastapi_vue_admin_2025-09-05_005325.sql +++ b/backend/sql/mysql/fastapiadmin_2025-09-06_011342.sql @@ -1,6 +1,6 @@ -- MySQL dump 10.13 Distrib 8.4.3, for macos14.5 (arm64) -- --- Host: 127.0.0.1 Database: fastapi_vue_admin +-- Host: 127.0.0.1 Database: fastapiadmin -- ------------------------------------------------------ -- Server version 8.4.3 @@ -108,7 +108,7 @@ CREATE TABLE `monitor_job` ( -- /*!40000 ALTER TABLE `monitor_job` DISABLE KEYS */; -INSERT INTO `monitor_job` VALUES ('系统默认(无参)','default','default','cron','0 0 12 * * ?','scheduler_test.job',NULL,NULL,0,1,NULL,NULL,1,1,0,NULL,'2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统默认(有参)','default','default','cron','0 0 12 * * ?','scheduler_test.job','test',NULL,0,1,NULL,NULL,1,2,0,NULL,'2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统默认(多参)','default','default','cron','0 0 12 * * ?','scheduler_test.job','new','{\"test\": 111}',0,1,NULL,NULL,1,3,0,NULL,'2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `monitor_job` VALUES ('系统默认(无参)','default','default','cron','0 0 12 * * ?','scheduler_test.job',NULL,NULL,0,1,NULL,NULL,1,1,0,NULL,'2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统默认(有参)','default','default','cron','0 0 12 * * ?','scheduler_test.job','test',NULL,0,1,NULL,NULL,1,2,0,NULL,'2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统默认(多参)','default','default','cron','0 0 12 * * ?','scheduler_test.job','new','{\"test\": 111}',0,1,NULL,NULL,1,3,0,NULL,'2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `monitor_job` ENABLE KEYS */; -- @@ -173,7 +173,7 @@ CREATE TABLE `system_config` ( -- /*!40000 ALTER TABLE `system_config` DISABLE KEYS */; -INSERT INTO `system_config` VALUES ('网站名称','sys_web_title','FastAPI Vue3 Admin',1,1,1,1,'网站名称','2025-09-05 00:53:14','2025-09-05 00:53:14'),('网站描述','sys_web_description','FastAPI Vue3 Admin 是完全开源的权限管理系统',1,1,2,1,'网站描述','2025-09-05 00:53:14','2025-09-05 00:53:14'),('网页图标','sys_web_favicon','https://service.fastapiadmin.com/api/v1/static/image/favicon.png',1,1,3,1,'网页图标','2025-09-05 00:53:14','2025-09-05 00:53:14'),('网站Logo','sys_web_logo','https://service.fastapiadmin.com/api/v1/static/image/logo.png',1,1,4,1,'网站Logo','2025-09-05 00:53:14','2025-09-05 00:53:14'),('登录背景','sys_login_background','https://service.fastapiadmin.com/api/v1/static/image/background.svg',1,1,5,1,'登录背景','2025-09-05 00:53:14','2025-09-05 00:53:14'),('版权信息','sys_web_copyright','Copyright © 2025-2026 service.fastapiadmin.com 版权所有',1,1,6,1,'版权信息','2025-09-05 00:53:14','2025-09-05 00:53:14'),('备案信息','sys_keep_record','陕ICP备2025069493号-1',1,1,7,1,'备案信息','2025-09-05 00:53:14','2025-09-05 00:53:14'),('帮助文档','sys_help_doc','https://service.fastapiadmin.com',1,1,8,1,'帮助文档','2025-09-05 00:53:14','2025-09-05 00:53:14'),('隐私政策','sys_web_privacy','https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE',1,1,9,1,'隐私政策','2025-09-05 00:53:14','2025-09-05 00:53:14'),('用户协议','sys_web_clause','https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE',1,1,10,1,'用户协议','2025-09-05 00:53:14','2025-09-05 00:53:14'),('源码代码','sys_git_code','https://github.com/1014TaoTao/fastapi_vue3_admin.git',1,1,11,1,'源码代码','2025-09-05 00:53:14','2025-09-05 00:53:14'),('项目版本','sys_web_version','2.0.0',1,1,12,1,'项目版本','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_config` VALUES ('网站名称','sys_web_title','FastAPI Vue3 Admin',1,1,1,1,'网站名称','2025-09-06 01:12:22','2025-09-06 01:12:22'),('网站描述','sys_web_description','FastAPI Vue3 Admin 是完全开源的权限管理系统',1,1,2,1,'网站描述','2025-09-06 01:12:22','2025-09-06 01:12:22'),('网页图标','sys_web_favicon','https://service.fastapiadmin.com/api/v1/static/image/favicon.png',1,1,3,1,'网页图标','2025-09-06 01:12:22','2025-09-06 01:12:22'),('网站Logo','sys_web_logo','https://service.fastapiadmin.com/api/v1/static/image/logo.png',1,1,4,1,'网站Logo','2025-09-06 01:12:22','2025-09-06 01:12:22'),('登录背景','sys_login_background','https://service.fastapiadmin.com/api/v1/static/image/background.svg',1,1,5,1,'登录背景','2025-09-06 01:12:22','2025-09-06 01:12:22'),('版权信息','sys_web_copyright','Copyright © 2025-2026 service.fastapiadmin.com 版权所有',1,1,6,1,'版权信息','2025-09-06 01:12:22','2025-09-06 01:12:22'),('备案信息','sys_keep_record','陕ICP备2025069493号-1',1,1,7,1,'备案信息','2025-09-06 01:12:22','2025-09-06 01:12:22'),('帮助文档','sys_help_doc','https://service.fastapiadmin.com',1,1,8,1,'帮助文档','2025-09-06 01:12:22','2025-09-06 01:12:22'),('隐私政策','sys_web_privacy','https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE',1,1,9,1,'隐私政策','2025-09-06 01:12:22','2025-09-06 01:12:22'),('用户协议','sys_web_clause','https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE',1,1,10,1,'用户协议','2025-09-06 01:12:22','2025-09-06 01:12:22'),('源码代码','sys_git_code','https://github.com/1014TaoTao/fastapi_vue3_admin.git',1,1,11,1,'源码代码','2025-09-06 01:12:22','2025-09-06 01:12:22'),('项目版本','sys_web_version','2.0.0',1,1,12,1,'项目版本','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_config` ENABLE KEYS */; -- @@ -204,7 +204,7 @@ CREATE TABLE `system_dept` ( -- /*!40000 ALTER TABLE `system_dept` DISABLE KEYS */; -INSERT INTO `system_dept` VALUES ('集团总公司',1,NULL,1,1,'集团总公司','2025-09-05 00:53:14','2025-09-05 00:53:14'),('西安分公司',1,1,2,1,'西安分公司','2025-09-05 00:53:14','2025-09-05 00:53:14'),('深圳分公司',2,1,3,1,'深圳分公司','2025-09-05 00:53:14','2025-09-05 00:53:14'),('开发组',1,2,4,1,'开发组','2025-09-05 00:53:14','2025-09-05 00:53:14'),('测试组',2,2,5,1,'测试组','2025-09-05 00:53:14','2025-09-05 00:53:14'),('演示组',3,2,6,1,'演示组','2025-09-05 00:53:14','2025-09-05 00:53:14'),('销售部',1,3,7,1,'销售部','2025-09-05 00:53:14','2025-09-05 00:53:14'),('市场部',2,3,8,1,'市场部','2025-09-05 00:53:14','2025-09-05 00:53:14'),('财务部',3,3,9,1,'财务部','2025-09-05 00:53:14','2025-09-05 00:53:14'),('研发部',4,3,10,1,'研发部','2025-09-05 00:53:14','2025-09-05 00:53:14'),('运维部',5,3,11,1,'研发部','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_dept` VALUES ('集团总公司',1,NULL,1,1,'集团总公司','2025-09-06 01:12:22','2025-09-06 01:12:22'),('西安分公司',1,1,2,1,'西安分公司','2025-09-06 01:12:22','2025-09-06 01:12:22'),('深圳分公司',2,1,3,1,'深圳分公司','2025-09-06 01:12:22','2025-09-06 01:12:22'),('开发组',1,2,4,1,'开发组','2025-09-06 01:12:22','2025-09-06 01:12:22'),('测试组',2,2,5,1,'测试组','2025-09-06 01:12:22','2025-09-06 01:12:22'),('演示组',3,2,6,1,'演示组','2025-09-06 01:12:22','2025-09-06 01:12:22'),('销售部',1,3,7,1,'销售部','2025-09-06 01:12:22','2025-09-06 01:12:22'),('市场部',2,3,8,1,'市场部','2025-09-06 01:12:22','2025-09-06 01:12:22'),('财务部',3,3,9,1,'财务部','2025-09-06 01:12:22','2025-09-06 01:12:22'),('研发部',4,3,10,1,'研发部','2025-09-06 01:12:22','2025-09-06 01:12:22'),('运维部',5,3,11,1,'研发部','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_dept` ENABLE KEYS */; -- @@ -241,7 +241,7 @@ CREATE TABLE `system_dict_data` ( -- /*!40000 ALTER TABLE `system_dict_data` DISABLE KEYS */; -INSERT INTO `system_dict_data` VALUES (1,'男','0','sys_user_sex','blue',NULL,1,NULL,1,1,1,'性别男','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'女','1','sys_user_sex','pink',NULL,0,NULL,1,2,1,'性别女','2025-09-05 00:53:14','2025-09-05 00:53:14'),(3,'未知','2','sys_user_sex','red',NULL,0,NULL,1,3,1,'性别未知','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'启用','1','sys_common_status','','primary',0,NULL,1,4,1,'启用状态','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'停用','0','sys_common_status','','danger',0,NULL,1,5,1,'停用状态','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'是','1','sys_yes_no','','primary',1,NULL,1,6,1,'是','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'否','0','sys_yes_no','','danger',0,NULL,1,7,1,'否','2025-09-05 00:53:14','2025-09-05 00:53:14'),(99,'其他','0','sys_oper_type','','info',0,NULL,1,8,1,'其他操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'新增','1','sys_oper_type','','info',0,NULL,1,9,1,'新增操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'修改','2','sys_oper_type','','info',0,NULL,1,10,1,'修改操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(3,'删除','3','sys_oper_type','','danger',0,NULL,1,11,1,'删除操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(4,'分配权限','4','sys_oper_type','','primary',0,NULL,1,12,1,'授权操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(5,'导出','5','sys_oper_type','','warning',0,NULL,1,13,1,'导出操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(6,'导入','6','sys_oper_type','','warning',0,NULL,1,14,1,'导入操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(7,'强退','7','sys_oper_type','','danger',0,NULL,1,15,1,'强退操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(8,'生成代码','8','sys_oper_type','','warning',0,NULL,1,16,1,'生成操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(9,'清空数据','9','sys_oper_type','','danger',0,NULL,1,17,1,'清空操作','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'通知','1','sys_notice_type','blue','warning',1,NULL,1,18,1,'通知','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'公告','2','sys_notice_type','orange','success',0,NULL,1,19,1,'公告','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'默认(Memory)','default','sys_job_store','',NULL,1,NULL,1,20,1,'默认分组','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'数据库(Sqlalchemy)','sqlalchemy','sys_job_store','',NULL,0,NULL,1,21,1,'数据库分组','2025-09-05 00:53:14','2025-09-05 00:53:14'),(3,'数据库(Redis)','redis','sys_job_store','',NULL,0,NULL,1,22,1,'reids分组','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'线程池','default','sys_job_executor','',NULL,0,NULL,1,23,1,'线程池','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'进程池','processpool','sys_job_executor','',NULL,0,NULL,1,24,1,'进程池','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'演示函数','scheduler_test.job','sys_job_function','',NULL,1,NULL,1,25,1,'演示函数','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'指定日期(date)','date','sys_job_trigger','',NULL,1,NULL,1,26,1,'指定日期任务触发器','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'间隔触发器(interval)','interval','sys_job_trigger','',NULL,0,NULL,1,27,1,'间隔触发器任务触发器','2025-09-05 00:53:14','2025-09-05 00:53:14'),(3,'cron表达式','cron','sys_job_trigger','',NULL,0,NULL,1,28,1,'间隔触发器任务触发器','2025-09-05 00:53:14','2025-09-05 00:53:14'),(1,'默认(default)','default','sys_list_class','',NULL,1,NULL,1,29,1,'默认表格回显样式','2025-09-05 00:53:14','2025-09-05 00:53:14'),(2,'主要(primary)','primary','sys_list_class','',NULL,0,NULL,1,30,1,'主要表格回显样式','2025-09-05 00:53:14','2025-09-05 00:53:14'),(3,'成功(success)','success','sys_list_class','',NULL,0,NULL,1,31,1,'成功表格回显样式','2025-09-05 00:53:14','2025-09-05 00:53:14'),(4,'信息(info)','info','sys_list_class','',NULL,0,NULL,1,32,1,'信息表格回显样式','2025-09-05 00:53:14','2025-09-05 00:53:14'),(5,'警告(warning)','warning','sys_list_class','',NULL,0,NULL,1,33,1,'警告表格回显样式','2025-09-05 00:53:14','2025-09-05 00:53:14'),(6,'危险(danger)','danger','sys_list_class','',NULL,0,NULL,1,34,1,'危险表格回显样式','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_dict_data` VALUES (1,'男','0','sys_user_sex','blue',NULL,1,NULL,1,1,1,'性别男','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'女','1','sys_user_sex','pink',NULL,0,NULL,1,2,1,'性别女','2025-09-06 01:12:22','2025-09-06 01:12:22'),(3,'未知','2','sys_user_sex','red',NULL,0,NULL,1,3,1,'性别未知','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'启用','1','sys_common_status','','primary',0,NULL,1,4,1,'启用状态','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'停用','0','sys_common_status','','danger',0,NULL,1,5,1,'停用状态','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'是','1','sys_yes_no','','primary',1,NULL,1,6,1,'是','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'否','0','sys_yes_no','','danger',0,NULL,1,7,1,'否','2025-09-06 01:12:22','2025-09-06 01:12:22'),(99,'其他','0','sys_oper_type','','info',0,NULL,1,8,1,'其他操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'新增','1','sys_oper_type','','info',0,NULL,1,9,1,'新增操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'修改','2','sys_oper_type','','info',0,NULL,1,10,1,'修改操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(3,'删除','3','sys_oper_type','','danger',0,NULL,1,11,1,'删除操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(4,'分配权限','4','sys_oper_type','','primary',0,NULL,1,12,1,'授权操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(5,'导出','5','sys_oper_type','','warning',0,NULL,1,13,1,'导出操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(6,'导入','6','sys_oper_type','','warning',0,NULL,1,14,1,'导入操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(7,'强退','7','sys_oper_type','','danger',0,NULL,1,15,1,'强退操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(8,'生成代码','8','sys_oper_type','','warning',0,NULL,1,16,1,'生成操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(9,'清空数据','9','sys_oper_type','','danger',0,NULL,1,17,1,'清空操作','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'通知','1','sys_notice_type','blue','warning',1,NULL,1,18,1,'通知','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'公告','2','sys_notice_type','orange','success',0,NULL,1,19,1,'公告','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'默认(Memory)','default','sys_job_store','',NULL,1,NULL,1,20,1,'默认分组','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'数据库(Sqlalchemy)','sqlalchemy','sys_job_store','',NULL,0,NULL,1,21,1,'数据库分组','2025-09-06 01:12:22','2025-09-06 01:12:22'),(3,'数据库(Redis)','redis','sys_job_store','',NULL,0,NULL,1,22,1,'reids分组','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'线程池','default','sys_job_executor','',NULL,0,NULL,1,23,1,'线程池','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'进程池','processpool','sys_job_executor','',NULL,0,NULL,1,24,1,'进程池','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'演示函数','scheduler_test.job','sys_job_function','',NULL,1,NULL,1,25,1,'演示函数','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'指定日期(date)','date','sys_job_trigger','',NULL,1,NULL,1,26,1,'指定日期任务触发器','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'间隔触发器(interval)','interval','sys_job_trigger','',NULL,0,NULL,1,27,1,'间隔触发器任务触发器','2025-09-06 01:12:22','2025-09-06 01:12:22'),(3,'cron表达式','cron','sys_job_trigger','',NULL,0,NULL,1,28,1,'间隔触发器任务触发器','2025-09-06 01:12:22','2025-09-06 01:12:22'),(1,'默认(default)','default','sys_list_class','',NULL,1,NULL,1,29,1,'默认表格回显样式','2025-09-06 01:12:22','2025-09-06 01:12:22'),(2,'主要(primary)','primary','sys_list_class','',NULL,0,NULL,1,30,1,'主要表格回显样式','2025-09-06 01:12:22','2025-09-06 01:12:22'),(3,'成功(success)','success','sys_list_class','',NULL,0,NULL,1,31,1,'成功表格回显样式','2025-09-06 01:12:22','2025-09-06 01:12:22'),(4,'信息(info)','info','sys_list_class','',NULL,0,NULL,1,32,1,'信息表格回显样式','2025-09-06 01:12:22','2025-09-06 01:12:22'),(5,'警告(warning)','warning','sys_list_class','',NULL,0,NULL,1,33,1,'警告表格回显样式','2025-09-06 01:12:22','2025-09-06 01:12:22'),(6,'危险(danger)','danger','sys_list_class','',NULL,0,NULL,1,34,1,'危险表格回显样式','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_dict_data` ENABLE KEYS */; -- @@ -272,7 +272,7 @@ CREATE TABLE `system_dict_type` ( -- /*!40000 ALTER TABLE `system_dict_type` DISABLE KEYS */; -INSERT INTO `system_dict_type` VALUES ('用户性别','sys_user_sex',1,1,1,'用户性别列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统是否','sys_yes_no',1,2,1,'系统是否列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统状态','sys_common_status',1,3,1,'系统状态','2025-09-05 00:53:14','2025-09-05 00:53:14'),('通知类型','sys_notice_type',1,4,1,'通知类型列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('操作类型','sys_oper_type',1,5,1,'操作类型列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('任务存储器','sys_job_store',1,6,1,'任务分组列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('任务执行器','sys_job_executor',1,7,1,'任务执行器列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('任务函数','sys_job_function',1,8,1,'任务函数列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('任务触发器','sys_job_trigger',1,9,1,'任务触发器列表','2025-09-05 00:53:14','2025-09-05 00:53:14'),('表格回显样式','sys_list_class',1,10,1,'表格回显样式列表','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_dict_type` VALUES ('用户性别','sys_user_sex',1,1,1,'用户性别列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统是否','sys_yes_no',1,2,1,'系统是否列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统状态','sys_common_status',1,3,1,'系统状态','2025-09-06 01:12:22','2025-09-06 01:12:22'),('通知类型','sys_notice_type',1,4,1,'通知类型列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('操作类型','sys_oper_type',1,5,1,'操作类型列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('任务存储器','sys_job_store',1,6,1,'任务分组列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('任务执行器','sys_job_executor',1,7,1,'任务执行器列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('任务函数','sys_job_function',1,8,1,'任务函数列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('任务触发器','sys_job_trigger',1,9,1,'任务触发器列表','2025-09-06 01:12:22','2025-09-06 01:12:22'),('表格回显样式','sys_list_class',1,10,1,'表格回显样式列表','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_dict_type` ENABLE KEYS */; -- @@ -353,7 +353,7 @@ CREATE TABLE `system_menu` ( -- /*!40000 ALTER TABLE `system_menu` DISABLE KEYS */; -INSERT INTO `system_menu` VALUES ('仪表盘',1,1,'','client','Dashboard','/dashboard',NULL,'/dashboard/workplace',0,1,1,'仪表盘','null',0,NULL,1,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('工作台',2,1,'dashboard:workplace:query','homepage','Workplace','/dashboard/workplace','dashboard/workplace',NULL,0,1,0,'工作台','null',1,1,2,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('分析页',2,2,'dashboard:analysis:query','el-icon-PieChart','Analysis','/dashboard/analysis','dashboard/analysis',NULL,0,1,0,'分析页','null',0,1,3,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统管理',1,2,NULL,'system','System','/system',NULL,'/system/menu',0,1,0,'系统管理','null',0,NULL,4,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('菜单管理',2,1,'system:menu:query','menu','Menu','/system/menu','system/menu/index',NULL,0,1,0,'菜单管理','null',0,4,5,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('部门管理',2,2,'system:dept:query','tree','Dept','/system/dept','system/dept/index',NULL,0,1,0,'部门管理','null',0,4,6,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('岗位管理',2,3,'system:position:query','el-icon-Coordinate','Position','/system/position','system/position/index',NULL,0,1,0,'岗位管理','null',0,4,7,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('角色管理',2,4,'system:role:query','role','Role','/system/role','system/role/index',NULL,0,1,0,'角色管理','null',0,4,8,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('用户管理',2,5,'system:user:query','el-icon-User','User','/system/user','system/user/index',NULL,0,1,0,'用户管理','null',0,4,9,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('日志管理',2,6,'system:log:query','el-icon-Aim','Log','/system/log','system/log/index',NULL,0,1,0,'日志管理','null',0,4,10,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公告管理',2,7,'system:notice:query','bell','Notice','/system/notice','system/notice/index',NULL,0,1,0,'公告管理','null',0,4,11,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('配置管理',2,8,'system:config:query','setting','Config','/system/config','system/config/index',NULL,0,1,0,'配置管理','null',0,4,12,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('字典管理',2,9,'system:dict_type:query','dict','Dict','/system/dict','system/dict/index',NULL,0,1,0,'字典管理','null',0,4,13,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建菜单',3,1,'system:menu:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建菜单','null',0,5,14,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改菜单',3,2,'system:menu:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改菜单','null',0,5,15,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除菜单',3,3,'system:menu:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除菜单','null',0,5,16,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改菜单状态',3,4,'system:menu:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改菜单状态','null',0,5,17,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建部门',3,1,'system:dept:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建部门','null',0,6,18,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改部门',3,2,'system:dept:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改部门','null',0,6,19,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除部门',3,3,'system:dept:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除部门','null',0,6,20,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改部门状态',3,4,'system:dept:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改部门状态','null',0,6,21,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建岗位',3,1,'system:position:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建岗位','null',0,7,22,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改岗位',3,2,'system:position:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改岗位','null',0,7,23,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除岗位',3,3,'system:position:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改岗位','null',0,7,24,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改岗位状态',3,4,'system:position:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改岗位状态','null',0,7,25,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('岗位导出',3,5,'system:position:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'岗位导出','null',0,7,26,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建角色',3,1,'system:role:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建角色','null',0,8,27,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改角色',3,2,'system:role:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改角色','null',0,8,28,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除角色',3,3,'system:role:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除角色','null',0,8,29,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改角色状态',3,4,'system:role:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改角色状态','null',0,8,30,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('设置角色权限',3,8,'system:role:permission',NULL,NULL,NULL,NULL,NULL,0,1,0,'设置角色权限','null',0,7,31,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('角色导出',3,6,'system:role:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'角色导出','null',0,8,32,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建用户',3,1,'system:user:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建用户','null',0,9,33,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改用户',3,2,'system:user:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改用户','null',0,9,34,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除用户',3,3,'system:user:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除用户','null',0,9,35,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改用户状态',3,4,'system:user:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改用户状态','null',0,9,36,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出用户',3,5,'system:user:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出用户','null',0,9,37,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导入用户',3,6,'system:user:import',NULL,NULL,NULL,NULL,NULL,0,1,0,'导入用户','null',0,9,38,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('日志删除',3,1,'system:operation_log:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'日志删除','null',0,10,39,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('日志导出',3,2,'system:operation_log:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'日志导出','null',0,10,40,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公告创建',3,1,'system:notice:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告创建','null',0,11,41,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公告修改',3,2,'system:notice:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改用户','null',0,11,42,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公告删除',3,3,'system:notice:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告删除','null',0,11,43,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公告导出',3,4,'system:notice:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告导出','null',0,11,44,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公告批量修改状态',3,5,'system:notice:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告批量修改状态','null',0,11,45,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建配置',3,1,'system:config:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建配置','null',0,12,46,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改配置',3,2,'system:config:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改配置','null',0,12,47,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除配置',3,3,'system:config:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除配置','null',0,12,48,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出配置',3,4,'system:config:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出配置','null',0,12,49,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('配置上传',3,5,'system:config:upload',NULL,NULL,NULL,NULL,NULL,0,1,0,'配置上传','null',0,12,50,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建字典类型',3,1,'system:dict_type:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建字典类型','null',0,13,51,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改字典类型',3,2,'system:dict_type:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改字典类型','null',0,13,52,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除字典类型',3,3,'system:dict_type:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除字典类型','null',0,13,53,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出字典类型',3,4,'system:dict_type:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出字典类型','null',0,13,54,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改字典状态',3,5,'system:dict_type:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出字典类型','null',0,13,55,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('字典数据查询',3,6,'system:dict_data:query',NULL,NULL,NULL,NULL,NULL,0,1,0,'字典数据查询','null',0,13,56,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建字典数据',3,7,'system:dict_data:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建字典数据','null',0,13,57,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改字典数据',3,8,'system:dict_data:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改字典数据','null',0,13,58,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除字典数据',3,9,'system:dict_data:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除字典数据','null',0,13,59,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出字典数据',3,10,'system:dict_data:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出字典数据','null',0,13,60,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改字典数据状态',3,11,'system:dict_data:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改字典数据状态','null',0,13,61,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('监控管理',1,3,NULL,'monitor','Monitor','/monitor',NULL,'/monitor/online',0,0,0,'监控管理','null',0,NULL,62,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('任务管理',2,1,'monitor:job:query','el-icon-DataLine','Job','/monitor/job','monitor/job/index',NULL,0,1,0,'任务管理','null',0,62,63,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建任务',3,1,'monitor:job:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建任务','null',0,63,64,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改和操作任务',3,2,'monitor:job:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改和操作任务','null',0,63,65,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除和清除任务',3,3,'monitor:job:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除和清除任务','null',0,63,66,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出定时任务',3,4,'monitor:job:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出定时任务','null',0,63,67,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('在线用户',2,2,'monitor:online:query','el-icon-Headset','MonitorOnline','/monitor/online','monitor/online/index',NULL,0,0,0,'在线用户','null',0,62,68,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('在线用户强制下线',3,1,'monitor:online:delete',NULL,NULL,NULL,NULL,NULL,0,0,0,'在线用户强制下线','null',0,68,69,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('服务器监控',2,3,'monitor:server:query','el-icon-Odometer','MonitorServer','/monitor/server','monitor/server/index',NULL,0,0,0,'服务器监控','null',0,62,70,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('缓存监控',2,4,'monitor:cache:query','el-icon-Stopwatch','MonitorCache','/monitor/cache','monitor/cache/index',NULL,0,0,0,'缓存监控','null',0,62,71,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('清除缓存',3,1,'monitor:cache:delete',NULL,NULL,NULL,NULL,NULL,0,0,0,'清除缓存','null',0,71,72,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('公共模块',1,4,NULL,'document','Common','/common',NULL,'/common/docs',0,0,0,'公共模块','null',0,NULL,73,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('接口管理',4,1,'common:docs:query','api','Docs','/common/docs','common/docs/index',NULL,0,0,0,'接口管理','null',0,73,74,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文档管理',4,2,'common:redoc:query','el-icon-Document','Redoc','/common/redoc','common/redoc/index',NULL,0,0,0,'文档管理','null',0,73,75,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('演示模块',1,5,NULL,'el-icon-Document','Demo','/demo',NULL,'/demo/example',0,0,0,'演示模块','null',0,NULL,76,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('示例管理',2,1,'demo:example:query','el-icon-DataLine','Example','/demo/example','demo/example/index',NULL,0,1,0,'示例管理','null',0,76,77,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建示例',3,1,'demo:example:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建示例','null',0,77,78,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('更新示例',3,2,'demo:example:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'更新示例','null',0,77,79,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除示例',3,3,'demo:example:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除示例','null',0,77,80,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改示例状态',3,4,'demo:example:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改示例状态','null',0,77,81,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出示例',3,5,'demo:example:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出示例','null',0,77,82,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导入示例',3,6,'demo:example:import',NULL,NULL,NULL,NULL,NULL,0,1,0,'导入示例','null',0,77,83,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('下载导入示例模版',3,7,'demo:example:download',NULL,NULL,NULL,NULL,NULL,0,1,0,'下载导入示例模版','null',0,77,84,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('应用管理',1,6,NULL,'applications','Application','/application',NULL,'/application/myapp',0,0,0,'应用管理','null',0,NULL,85,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('我的应用',2,1,'application:myapp:query','system-application','ApplicationSystem','/application/myapp','application/myapp/index',NULL,0,1,0,'应用系统管理','null',0,85,86,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建应用',3,1,'application:myapp:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建应用','null',0,86,87,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('修改应用',3,2,'application:myapp:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改应用','null',0,86,88,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('删除应用',3,3,'application:myapp:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除应用','null',0,86,89,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('批量修改应用状态',3,4,'application:myapp:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改应用状态','null',0,86,90,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('资源管理',1,7,NULL,'folder','Resource','/resource',NULL,'/resource/file',0,0,0,'资源管理','null',0,NULL,91,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件管理',2,1,'resource:file:query','el-icon-FolderOpened','ResourceFile','/resource/file','resource/file/index',NULL,0,1,0,'文件管理','null',0,91,92,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件上传',3,1,'resource:file:upload',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件上传','null',0,92,93,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件下载',3,2,'resource:file:download',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件下载','null',0,92,94,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件删除',3,3,'resource:file:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件删除','null',0,92,95,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件移动',3,4,'resource:file:move',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件移动','null',0,92,96,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件复制',3,5,'resource:file:copy',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件复制','null',0,92,97,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件重命名',3,6,'resource:file:rename',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件重命名','null',0,92,98,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('创建目录',3,7,'resource:file:create_dir',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建目录','null',0,92,99,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('文件搜索',3,8,'resource:file:search',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件搜索','null',0,92,100,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'),('导出文件列表',3,9,'resource:file:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出文件列表','null',0,92,101,1,'初始化数据','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_menu` VALUES ('仪表盘',1,1,'','client','Dashboard','/dashboard',NULL,'/dashboard/workplace',0,1,1,'仪表盘','null',0,NULL,1,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('工作台',2,1,'dashboard:workplace:query','homepage','Workplace','/dashboard/workplace','dashboard/workplace',NULL,0,1,0,'工作台','null',1,1,2,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('分析页',2,2,'dashboard:analysis:query','el-icon-PieChart','Analysis','/dashboard/analysis','dashboard/analysis',NULL,0,1,0,'分析页','null',0,1,3,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统管理',1,2,NULL,'system','System','/system',NULL,'/system/menu',0,1,0,'系统管理','null',0,NULL,4,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('菜单管理',2,1,'system:menu:query','menu','Menu','/system/menu','system/menu/index',NULL,0,1,0,'菜单管理','null',0,4,5,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('部门管理',2,2,'system:dept:query','tree','Dept','/system/dept','system/dept/index',NULL,0,1,0,'部门管理','null',0,4,6,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('岗位管理',2,3,'system:position:query','el-icon-Coordinate','Position','/system/position','system/position/index',NULL,0,1,0,'岗位管理','null',0,4,7,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('角色管理',2,4,'system:role:query','role','Role','/system/role','system/role/index',NULL,0,1,0,'角色管理','null',0,4,8,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('用户管理',2,5,'system:user:query','el-icon-User','User','/system/user','system/user/index',NULL,0,1,0,'用户管理','null',0,4,9,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('日志管理',2,6,'system:log:query','el-icon-Aim','Log','/system/log','system/log/index',NULL,0,1,0,'日志管理','null',0,4,10,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公告管理',2,7,'system:notice:query','bell','Notice','/system/notice','system/notice/index',NULL,0,1,0,'公告管理','null',0,4,11,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('配置管理',2,8,'system:config:query','setting','Config','/system/config','system/config/index',NULL,0,1,0,'配置管理','null',0,4,12,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('字典管理',2,9,'system:dict_type:query','dict','Dict','/system/dict','system/dict/index',NULL,0,1,0,'字典管理','null',0,4,13,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建菜单',3,1,'system:menu:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建菜单','null',0,5,14,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改菜单',3,2,'system:menu:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改菜单','null',0,5,15,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除菜单',3,3,'system:menu:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除菜单','null',0,5,16,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改菜单状态',3,4,'system:menu:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改菜单状态','null',0,5,17,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建部门',3,1,'system:dept:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建部门','null',0,6,18,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改部门',3,2,'system:dept:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改部门','null',0,6,19,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除部门',3,3,'system:dept:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除部门','null',0,6,20,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改部门状态',3,4,'system:dept:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改部门状态','null',0,6,21,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建岗位',3,1,'system:position:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建岗位','null',0,7,22,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改岗位',3,2,'system:position:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改岗位','null',0,7,23,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除岗位',3,3,'system:position:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改岗位','null',0,7,24,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改岗位状态',3,4,'system:position:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改岗位状态','null',0,7,25,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('岗位导出',3,5,'system:position:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'岗位导出','null',0,7,26,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建角色',3,1,'system:role:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建角色','null',0,8,27,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改角色',3,2,'system:role:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改角色','null',0,8,28,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除角色',3,3,'system:role:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除角色','null',0,8,29,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改角色状态',3,4,'system:role:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改角色状态','null',0,8,30,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('设置角色权限',3,8,'system:role:permission',NULL,NULL,NULL,NULL,NULL,0,1,0,'设置角色权限','null',0,7,31,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('角色导出',3,6,'system:role:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'角色导出','null',0,8,32,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建用户',3,1,'system:user:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建用户','null',0,9,33,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改用户',3,2,'system:user:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改用户','null',0,9,34,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除用户',3,3,'system:user:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除用户','null',0,9,35,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改用户状态',3,4,'system:user:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改用户状态','null',0,9,36,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出用户',3,5,'system:user:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出用户','null',0,9,37,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导入用户',3,6,'system:user:import',NULL,NULL,NULL,NULL,NULL,0,1,0,'导入用户','null',0,9,38,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('日志删除',3,1,'system:operation_log:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'日志删除','null',0,10,39,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('日志导出',3,2,'system:operation_log:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'日志导出','null',0,10,40,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公告创建',3,1,'system:notice:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告创建','null',0,11,41,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公告修改',3,2,'system:notice:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改用户','null',0,11,42,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公告删除',3,3,'system:notice:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告删除','null',0,11,43,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公告导出',3,4,'system:notice:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告导出','null',0,11,44,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公告批量修改状态',3,5,'system:notice:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'公告批量修改状态','null',0,11,45,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建配置',3,1,'system:config:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建配置','null',0,12,46,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改配置',3,2,'system:config:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改配置','null',0,12,47,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除配置',3,3,'system:config:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除配置','null',0,12,48,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出配置',3,4,'system:config:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出配置','null',0,12,49,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('配置上传',3,5,'system:config:upload',NULL,NULL,NULL,NULL,NULL,0,1,0,'配置上传','null',0,12,50,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建字典类型',3,1,'system:dict_type:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建字典类型','null',0,13,51,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改字典类型',3,2,'system:dict_type:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改字典类型','null',0,13,52,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除字典类型',3,3,'system:dict_type:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除字典类型','null',0,13,53,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出字典类型',3,4,'system:dict_type:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出字典类型','null',0,13,54,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改字典状态',3,5,'system:dict_type:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出字典类型','null',0,13,55,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('字典数据查询',3,6,'system:dict_data:query',NULL,NULL,NULL,NULL,NULL,0,1,0,'字典数据查询','null',0,13,56,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建字典数据',3,7,'system:dict_data:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建字典数据','null',0,13,57,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改字典数据',3,8,'system:dict_data:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改字典数据','null',0,13,58,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除字典数据',3,9,'system:dict_data:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除字典数据','null',0,13,59,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出字典数据',3,10,'system:dict_data:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出字典数据','null',0,13,60,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改字典数据状态',3,11,'system:dict_data:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改字典数据状态','null',0,13,61,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('监控管理',1,3,NULL,'monitor','Monitor','/monitor',NULL,'/monitor/online',0,0,0,'监控管理','null',0,NULL,62,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('任务管理',2,1,'monitor:job:query','el-icon-DataLine','Job','/monitor/job','monitor/job/index',NULL,0,1,0,'任务管理','null',0,62,63,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建任务',3,1,'monitor:job:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建任务','null',0,63,64,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改和操作任务',3,2,'monitor:job:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改和操作任务','null',0,63,65,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除和清除任务',3,3,'monitor:job:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除和清除任务','null',0,63,66,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出定时任务',3,4,'monitor:job:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出定时任务','null',0,63,67,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('在线用户',2,2,'monitor:online:query','el-icon-Headset','MonitorOnline','/monitor/online','monitor/online/index',NULL,0,0,0,'在线用户','null',0,62,68,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('在线用户强制下线',3,1,'monitor:online:delete',NULL,NULL,NULL,NULL,NULL,0,0,0,'在线用户强制下线','null',0,68,69,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('服务器监控',2,3,'monitor:server:query','el-icon-Odometer','MonitorServer','/monitor/server','monitor/server/index',NULL,0,0,0,'服务器监控','null',0,62,70,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('缓存监控',2,4,'monitor:cache:query','el-icon-Stopwatch','MonitorCache','/monitor/cache','monitor/cache/index',NULL,0,0,0,'缓存监控','null',0,62,71,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('清除缓存',3,1,'monitor:cache:delete',NULL,NULL,NULL,NULL,NULL,0,0,0,'清除缓存','null',0,71,72,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('公共模块',1,4,NULL,'document','Common','/common',NULL,'/common/docs',0,0,0,'公共模块','null',0,NULL,73,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('接口管理',4,1,'common:docs:query','api','Docs','/common/docs','common/docs/index',NULL,0,0,0,'接口管理','null',0,73,74,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文档管理',4,2,'common:redoc:query','el-icon-Document','Redoc','/common/redoc','common/redoc/index',NULL,0,0,0,'文档管理','null',0,73,75,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('演示模块',1,5,NULL,'el-icon-Document','Demo','/demo',NULL,'/demo/example',0,0,0,'演示模块','null',0,NULL,76,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('示例管理',2,1,'demo:example:query','el-icon-DataLine','Example','/demo/example','demo/example/index',NULL,0,1,0,'示例管理','null',0,76,77,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建示例',3,1,'demo:example:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建示例','null',0,77,78,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('更新示例',3,2,'demo:example:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'更新示例','null',0,77,79,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除示例',3,3,'demo:example:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除示例','null',0,77,80,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改示例状态',3,4,'demo:example:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改示例状态','null',0,77,81,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出示例',3,5,'demo:example:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出示例','null',0,77,82,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导入示例',3,6,'demo:example:import',NULL,NULL,NULL,NULL,NULL,0,1,0,'导入示例','null',0,77,83,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('下载导入示例模版',3,7,'demo:example:download',NULL,NULL,NULL,NULL,NULL,0,1,0,'下载导入示例模版','null',0,77,84,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('应用管理',1,6,NULL,'captcha','Application','/application',NULL,'/application/myapp',0,0,0,'应用管理','null',0,NULL,85,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('我的应用',2,1,'application:myapp:query','el-icon-DataLine','ApplicationSystem','/application/myapp','application/myapp/index',NULL,0,1,0,'应用系统管理','null',0,85,86,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建应用',3,1,'application:myapp:create',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建应用','null',0,86,87,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('修改应用',3,2,'application:myapp:update',NULL,NULL,NULL,NULL,NULL,0,1,0,'修改应用','null',0,86,88,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('删除应用',3,3,'application:myapp:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'删除应用','null',0,86,89,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('批量修改应用状态',3,4,'application:myapp:patch',NULL,NULL,NULL,NULL,NULL,0,1,0,'批量修改应用状态','null',0,86,90,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('资源管理',1,7,NULL,'document','Resource','/resource',NULL,'/resource/file',0,0,0,'资源管理','null',0,NULL,91,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件管理',2,1,'resource:file:query','el-icon-Files','ResourceFile','/resource/file','resource/file/index',NULL,0,1,0,'文件管理','null',0,91,92,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件上传',3,1,'resource:file:upload',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件上传','null',0,92,93,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件下载',3,2,'resource:file:download',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件下载','null',0,92,94,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件删除',3,3,'resource:file:delete',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件删除','null',0,92,95,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件移动',3,4,'resource:file:move',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件移动','null',0,92,96,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件复制',3,5,'resource:file:copy',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件复制','null',0,92,97,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件重命名',3,6,'resource:file:rename',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件重命名','null',0,92,98,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('创建目录',3,7,'resource:file:create_dir',NULL,NULL,NULL,NULL,NULL,0,1,0,'创建目录','null',0,92,99,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('文件搜索',3,8,'resource:file:search',NULL,NULL,NULL,NULL,NULL,0,1,0,'文件搜索','null',0,92,100,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'),('导出文件列表',3,9,'resource:file:export',NULL,NULL,NULL,NULL,NULL,0,1,0,'导出文件列表','null',0,92,101,1,'初始化数据','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_menu` ENABLE KEYS */; -- @@ -383,7 +383,7 @@ CREATE TABLE `system_notice` ( -- /*!40000 ALTER TABLE `system_notice` DISABLE KEYS */; -INSERT INTO `system_notice` VALUES ('系统更新','1','2099年9月9日,晚上12:00,系统更新',1,1,1,'系统更新','2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统维护','2','2099年9月9日,晚上12:00,系统维护',1,2,1,'系统维护','2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统更新完成','1','2099年9月9日,晚上12:00,系统更新完成',1,3,0,'系统更新完成','2025-09-05 00:53:14','2025-09-05 00:53:14'),('系统维护完成','2','2099年9月9日,晚上12:00,系统维护完成',1,4,0,'系统维护完成','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_notice` VALUES ('系统更新','1','2099年9月9日,晚上12:00,系统更新',1,1,1,'系统更新','2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统维护','2','2099年9月9日,晚上12:00,系统维护',1,2,1,'系统维护','2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统更新完成','1','2099年9月9日,晚上12:00,系统更新完成',1,3,0,'系统更新完成','2025-09-06 01:12:22','2025-09-06 01:12:22'),('系统维护完成','2','2099年9月9日,晚上12:00,系统维护完成',1,4,0,'系统维护完成','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_notice` ENABLE KEYS */; -- @@ -413,7 +413,7 @@ CREATE TABLE `system_position` ( -- /*!40000 ALTER TABLE `system_position` DISABLE KEYS */; -INSERT INTO `system_position` VALUES ('董事长岗',1,1,1,1,'董事长岗位','2025-09-05 00:53:14','2025-09-05 00:53:14'),('运营岗',2,1,2,1,'运营岗位','2025-09-05 00:53:14','2025-09-05 00:53:14'),('销售岗',3,1,3,1,'销售岗','2025-09-05 00:53:14','2025-09-05 00:53:14'),('人事行政岗',4,1,4,1,'人事行政岗','2025-09-05 00:53:14','2025-09-05 00:53:14'),('开发岗',5,1,5,1,'开发岗','2025-09-05 00:53:14','2025-09-05 00:53:14'),('测试岗',6,1,6,1,'测试岗','2025-09-05 00:53:14','2025-09-05 00:53:14'),('演示岗',7,1,7,1,'演示岗','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_position` VALUES ('董事长岗',1,1,1,1,'董事长岗位','2025-09-06 01:12:22','2025-09-06 01:12:22'),('运营岗',2,1,2,1,'运营岗位','2025-09-06 01:12:22','2025-09-06 01:12:22'),('销售岗',3,1,3,1,'销售岗','2025-09-06 01:12:22','2025-09-06 01:12:22'),('人事行政岗',4,1,4,1,'人事行政岗','2025-09-06 01:12:22','2025-09-06 01:12:22'),('开发岗',5,1,5,1,'开发岗','2025-09-06 01:12:22','2025-09-06 01:12:22'),('测试岗',6,1,6,1,'测试岗','2025-09-06 01:12:22','2025-09-06 01:12:22'),('演示岗',7,1,7,1,'演示岗','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_position` ENABLE KEYS */; -- @@ -446,7 +446,7 @@ CREATE TABLE `system_role` ( -- /*!40000 ALTER TABLE `system_role` DISABLE KEYS */; -INSERT INTO `system_role` VALUES ('管理员角色',NULL,1,4,1,1,1,'管理员','2025-09-05 00:53:14','2025-09-05 00:53:14'),('普通角色',NULL,2,1,1,2,1,'普通角色','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_role` VALUES ('管理员角色',NULL,1,4,1,1,1,'管理员','2025-09-06 01:12:22','2025-09-06 01:12:22'),('普通角色',NULL,2,1,1,2,1,'普通角色','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_role` ENABLE KEYS */; -- @@ -496,7 +496,7 @@ CREATE TABLE `system_role_menus` ( -- /*!40000 ALTER TABLE `system_role_menus` DISABLE KEYS */; -INSERT INTO `system_role_menus` VALUES (1,1),(2,1),(1,2),(2,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),(1,14),(1,15),(1,16),(1,17),(1,18),(1,19),(1,20),(1,21),(1,22),(1,23),(1,24),(1,25),(1,26),(1,27),(1,28),(1,29),(1,30),(1,31),(1,32),(1,33),(1,34),(1,35),(1,36),(1,37),(1,38),(1,39),(1,40),(1,41),(1,42),(1,43),(1,44),(1,45),(1,46),(1,47),(1,48),(1,49),(1,50),(1,51),(1,52),(1,53),(1,54),(1,55),(1,56),(1,57),(1,58),(1,59),(1,60),(1,61),(1,62),(1,63),(1,64),(1,65),(1,66),(1,67),(1,68),(1,69),(1,70),(1,71),(1,72),(1,73),(1,74),(1,75),(1,76),(1,77),(1,78),(1,79),(1,80),(1,81),(1,82),(1,83),(1,84),(1,85),(1,86),(1,87),(1,88),(1,89),(1,90); +INSERT INTO `system_role_menus` VALUES (1,1),(2,1),(1,2),(2,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),(1,14),(1,15),(1,16),(1,17),(1,18),(1,19),(1,20),(1,21),(1,22),(1,23),(1,24),(1,25),(1,26),(1,27),(1,28),(1,29),(1,30),(1,31),(1,32),(1,33),(1,34),(1,35),(1,36),(1,37),(1,38),(1,39),(1,40),(1,41),(1,42),(1,43),(1,44),(1,45),(1,46),(1,47),(1,48),(1,49),(1,50),(1,51),(1,52),(1,53),(1,54),(1,55),(1,56),(1,57),(1,58),(1,59),(1,60),(1,61),(1,62),(1,63),(1,64),(1,65),(1,66),(1,67),(1,68),(1,69),(1,70),(1,71),(1,72),(1,73),(1,74),(1,75),(1,76),(1,77),(1,78),(1,79),(1,80),(1,81),(1,82),(1,83),(1,84),(1,85),(1,86),(1,87),(1,88),(1,89),(1,90),(1,91),(1,92),(1,93),(1,94),(1,95),(1,96),(1,97),(1,98),(1,99),(1,100),(1,101); /*!40000 ALTER TABLE `system_role_menus` ENABLE KEYS */; -- @@ -577,8 +577,8 @@ CREATE TABLE `system_users` ( UNIQUE KEY `username` (`username`), UNIQUE KEY `mobile` (`mobile`), UNIQUE KEY `email` (`email`), - KEY `ix_system_users_dept_id` (`dept_id`), KEY `ix_system_users_creator_id` (`creator_id`), + KEY `ix_system_users_dept_id` (`dept_id`), CONSTRAINT `system_users_ibfk_1` FOREIGN KEY (`dept_id`) REFERENCES `system_dept` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表'; /*!40101 SET character_set_client = @saved_cs_client */; @@ -588,11 +588,11 @@ CREATE TABLE `system_users` ( -- /*!40000 ALTER TABLE `system_users` DISABLE KEYS */; -INSERT INTO `system_users` VALUES ('superadmin','$2b$12$/Df5YczDGF41zCh2F8Xbu.yHTJXGm3tONgsXz1KLUdG0mtpKUOLD2','超级管理员','15382112620','948080782@qq.com','1','https://service.fastapiadmin.com/api/v1/static/image/avatar.png',1,NULL,1,NULL,1,1,'超级管理员','2025-09-05 00:53:14','2025-09-05 00:53:14'),('admin','$2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa','管理员','15382112222','admin@qq.com','0','https://service.fastapiadmin.com/api/v1/static/image/avatar.png',0,NULL,1,1,2,1,'管理员','2025-09-05 00:53:14','2025-09-05 00:53:14'),('demo','$2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa','演示用户','15382112121','demo@qq.com','1','https://service.fastapiadmin.com/api/v1/static/image/avatar.png',0,NULL,6,1,3,1,'演示用户','2025-09-05 00:53:14','2025-09-05 00:53:14'); +INSERT INTO `system_users` VALUES ('superadmin','$2b$12$/Df5YczDGF41zCh2F8Xbu.yHTJXGm3tONgsXz1KLUdG0mtpKUOLD2','超级管理员','15382112620','948080782@qq.com','1','https://service.fastapiadmin.com/api/v1/static/image/avatar.png',1,NULL,1,NULL,1,1,'超级管理员','2025-09-06 01:12:22','2025-09-06 01:12:22'),('admin','$2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa','管理员','15382112222','admin@qq.com','0','https://service.fastapiadmin.com/api/v1/static/image/avatar.png',0,NULL,1,1,2,1,'管理员','2025-09-06 01:12:22','2025-09-06 01:12:22'),('demo','$2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa','演示用户','15382112121','demo@qq.com','1','https://service.fastapiadmin.com/api/v1/static/image/avatar.png',0,NULL,6,1,3,1,'演示用户','2025-09-06 01:12:22','2025-09-06 01:12:22'); /*!40000 ALTER TABLE `system_users` ENABLE KEYS */; -- --- Dumping routines for database 'fastapi_vue_admin' +-- Dumping routines for database 'fastapiadmin' -- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -604,4 +604,4 @@ INSERT INTO `system_users` VALUES ('superadmin','$2b$12$/Df5YczDGF41zCh2F8Xbu.yH /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2025-09-05 0:53:35 +-- Dump completed on 2025-09-06 1:14:17 diff --git a/backend/sql/postgresql/fastapi_vue_admin_2025-09-05_004952.sql b/backend/sql/postgresql/fastapiadmin_2025-09-06_013358.sql similarity index 84% rename from backend/sql/postgresql/fastapi_vue_admin_2025-09-05_004952.sql rename to backend/sql/postgresql/fastapiadmin_2025-09-06_013358.sql index fbbfad52..229feaa9 100644 --- a/backend/sql/postgresql/fastapi_vue_admin_2025-09-05_004952.sql +++ b/backend/sql/postgresql/fastapiadmin_2025-09-06_013358.sql @@ -2146,9 +2146,9 @@ COPY public.example_demo (name, creator_id, id, status, description, created_at, -- COPY public.monitor_job (name, jobstore, executor, trigger, trigger_args, func, args, kwargs, "coalesce", max_instances, start_date, end_date, creator_id, id, status, description, created_at, updated_at) FROM stdin; -系统默认(无参) default default cron 0 0 12 * * ? scheduler_test.job \N \N f 1 \N \N 1 1 f \N 2025-09-05 00:49:41.690554 2025-09-05 00:49:41.690555 -系统默认(有参) default default cron 0 0 12 * * ? scheduler_test.job test \N f 1 \N \N 1 2 f \N 2025-09-05 00:49:41.690556 2025-09-05 00:49:41.690556 -系统默认(多参) default default cron 0 0 12 * * ? scheduler_test.job new {"test": 111} f 1 \N \N 1 3 f \N 2025-09-05 00:49:41.690556 2025-09-05 00:49:41.690557 +系统默认(无参) default default cron 0 0 12 * * ? scheduler_test.job \N \N f 1 \N \N 1 1 f \N 2025-09-06 01:12:52.929482 2025-09-06 01:12:52.929483 +系统默认(有参) default default cron 0 0 12 * * ? scheduler_test.job test \N f 1 \N \N 1 2 f \N 2025-09-06 01:12:52.929484 2025-09-06 01:12:52.929484 +系统默认(多参) default default cron 0 0 12 * * ? scheduler_test.job new {"test": 111} f 1 \N \N 1 3 f \N 2025-09-06 01:12:52.929485 2025-09-06 01:12:52.929485 \. @@ -2165,18 +2165,18 @@ COPY public.monitor_job_log (id, job_name, job_group, job_executor, invoke_targe -- COPY public.system_config (config_name, config_key, config_value, config_type, creator_id, id, status, description, created_at, updated_at) FROM stdin; -网站名称 sys_web_title FastAPI Vue3 Admin t 1 1 t 网站名称 2025-09-05 00:49:41.679135 2025-09-05 00:49:41.679136 -网站描述 sys_web_description FastAPI Vue3 Admin 是完全开源的权限管理系统 t 1 2 t 网站描述 2025-09-05 00:49:41.679137 2025-09-05 00:49:41.679138 -网页图标 sys_web_favicon https://service.fastapiadmin.com/api/v1/static/image/favicon.png t 1 3 t 网页图标 2025-09-05 00:49:41.679138 2025-09-05 00:49:41.679138 -网站Logo sys_web_logo https://service.fastapiadmin.com/api/v1/static/image/logo.png t 1 4 t 网站Logo 2025-09-05 00:49:41.679139 2025-09-05 00:49:41.679139 -登录背景 sys_login_background https://service.fastapiadmin.com/api/v1/static/image/background.svg t 1 5 t 登录背景 2025-09-05 00:49:41.67914 2025-09-05 00:49:41.67914 -版权信息 sys_web_copyright Copyright © 2025-2026 service.fastapiadmin.com 版权所有 t 1 6 t 版权信息 2025-09-05 00:49:41.67914 2025-09-05 00:49:41.679141 -备案信息 sys_keep_record 陕ICP备2025069493号-1 t 1 7 t 备案信息 2025-09-05 00:49:41.679141 2025-09-05 00:49:41.679142 -帮助文档 sys_help_doc https://service.fastapiadmin.com t 1 8 t 帮助文档 2025-09-05 00:49:41.679142 2025-09-05 00:49:41.679142 -隐私政策 sys_web_privacy https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE t 1 9 t 隐私政策 2025-09-05 00:49:41.679143 2025-09-05 00:49:41.679143 -用户协议 sys_web_clause https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE t 1 10 t 用户协议 2025-09-05 00:49:41.679143 2025-09-05 00:49:41.679144 -源码代码 sys_git_code https://github.com/1014TaoTao/fastapi_vue3_admin.git t 1 11 t 源码代码 2025-09-05 00:49:41.679144 2025-09-05 00:49:41.679145 -项目版本 sys_web_version 2.0.0 t 1 12 t 项目版本 2025-09-05 00:49:41.679145 2025-09-05 00:49:41.679145 +网站名称 sys_web_title FastAPI Vue3 Admin t 1 1 t 网站名称 2025-09-06 01:12:52.92001 2025-09-06 01:12:52.920011 +网站描述 sys_web_description FastAPI Vue3 Admin 是完全开源的权限管理系统 t 1 2 t 网站描述 2025-09-06 01:12:52.920012 2025-09-06 01:12:52.920012 +网页图标 sys_web_favicon https://service.fastapiadmin.com/api/v1/static/image/favicon.png t 1 3 t 网页图标 2025-09-06 01:12:52.920013 2025-09-06 01:12:52.920013 +网站Logo sys_web_logo https://service.fastapiadmin.com/api/v1/static/image/logo.png t 1 4 t 网站Logo 2025-09-06 01:12:52.920014 2025-09-06 01:12:52.920014 +登录背景 sys_login_background https://service.fastapiadmin.com/api/v1/static/image/background.svg t 1 5 t 登录背景 2025-09-06 01:12:52.920014 2025-09-06 01:12:52.920015 +版权信息 sys_web_copyright Copyright © 2025-2026 service.fastapiadmin.com 版权所有 t 1 6 t 版权信息 2025-09-06 01:12:52.920015 2025-09-06 01:12:52.920016 +备案信息 sys_keep_record 陕ICP备2025069493号-1 t 1 7 t 备案信息 2025-09-06 01:12:52.920016 2025-09-06 01:12:52.920016 +帮助文档 sys_help_doc https://service.fastapiadmin.com t 1 8 t 帮助文档 2025-09-06 01:12:52.920017 2025-09-06 01:12:52.920017 +隐私政策 sys_web_privacy https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE t 1 9 t 隐私政策 2025-09-06 01:12:52.920018 2025-09-06 01:12:52.920018 +用户协议 sys_web_clause https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE t 1 10 t 用户协议 2025-09-06 01:12:52.920019 2025-09-06 01:12:52.920019 +源码代码 sys_git_code https://github.com/1014TaoTao/fastapi_vue3_admin.git t 1 11 t 源码代码 2025-09-06 01:12:52.920019 2025-09-06 01:12:52.92002 +项目版本 sys_web_version 2.0.0 t 1 12 t 项目版本 2025-09-06 01:12:52.92002 2025-09-06 01:12:52.920021 \. @@ -2185,17 +2185,17 @@ COPY public.system_config (config_name, config_key, config_value, config_type, c -- COPY public.system_dept (name, "order", parent_id, id, status, description, created_at, updated_at) FROM stdin; -集团总公司 1 \N 1 t 集团总公司 2025-09-05 00:49:41.656756 2025-09-05 00:49:41.656759 -西安分公司 1 1 2 t 西安分公司 2025-09-05 00:49:41.65676 2025-09-05 00:49:41.65676 -深圳分公司 2 1 3 t 深圳分公司 2025-09-05 00:49:41.656761 2025-09-05 00:49:41.656761 -开发组 1 2 4 t 开发组 2025-09-05 00:49:41.656761 2025-09-05 00:49:41.656762 -测试组 2 2 5 t 测试组 2025-09-05 00:49:41.656762 2025-09-05 00:49:41.656762 -演示组 3 2 6 t 演示组 2025-09-05 00:49:41.656763 2025-09-05 00:49:41.656763 -销售部 1 3 7 t 销售部 2025-09-05 00:49:41.656764 2025-09-05 00:49:41.656764 -市场部 2 3 8 t 市场部 2025-09-05 00:49:41.656764 2025-09-05 00:49:41.656765 -财务部 3 3 9 t 财务部 2025-09-05 00:49:41.656765 2025-09-05 00:49:41.656765 -研发部 4 3 10 t 研发部 2025-09-05 00:49:41.656766 2025-09-05 00:49:41.656766 -运维部 5 3 11 t 研发部 2025-09-05 00:49:41.656767 2025-09-05 00:49:41.656767 +集团总公司 1 \N 1 t 集团总公司 2025-09-06 01:12:52.901006 2025-09-06 01:12:52.901009 +西安分公司 1 1 2 t 西安分公司 2025-09-06 01:12:52.90101 2025-09-06 01:12:52.90101 +深圳分公司 2 1 3 t 深圳分公司 2025-09-06 01:12:52.90101 2025-09-06 01:12:52.901011 +开发组 1 2 4 t 开发组 2025-09-06 01:12:52.901011 2025-09-06 01:12:52.901011 +测试组 2 2 5 t 测试组 2025-09-06 01:12:52.901012 2025-09-06 01:12:52.901012 +演示组 3 2 6 t 演示组 2025-09-06 01:12:52.901012 2025-09-06 01:12:52.901013 +销售部 1 3 7 t 销售部 2025-09-06 01:12:52.901013 2025-09-06 01:12:52.901013 +市场部 2 3 8 t 市场部 2025-09-06 01:12:52.901014 2025-09-06 01:12:52.901014 +财务部 3 3 9 t 财务部 2025-09-06 01:12:52.901015 2025-09-06 01:12:52.901015 +研发部 4 3 10 t 研发部 2025-09-06 01:12:52.901015 2025-09-06 01:12:52.901016 +运维部 5 3 11 t 研发部 2025-09-06 01:12:52.901016 2025-09-06 01:12:52.901016 \. @@ -2204,40 +2204,40 @@ COPY public.system_dept (name, "order", parent_id, id, status, description, crea -- COPY public.system_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, dict_type_id, creator_id, id, status, description, created_at, updated_at) FROM stdin; -1 男 0 sys_user_sex blue \N t \N 1 1 t 性别男 2025-09-05 00:49:41.688008 2025-09-05 00:49:41.68801 -2 女 1 sys_user_sex pink \N f \N 1 2 t 性别女 2025-09-05 00:49:41.688011 2025-09-05 00:49:41.688011 -3 未知 2 sys_user_sex red \N f \N 1 3 t 性别未知 2025-09-05 00:49:41.688012 2025-09-05 00:49:41.688012 -1 启用 1 sys_common_status primary f \N 1 4 t 启用状态 2025-09-05 00:49:41.688012 2025-09-05 00:49:41.688013 -2 停用 0 sys_common_status danger f \N 1 5 t 停用状态 2025-09-05 00:49:41.688013 2025-09-05 00:49:41.688013 -1 是 1 sys_yes_no primary t \N 1 6 t 是 2025-09-05 00:49:41.688014 2025-09-05 00:49:41.688014 -2 否 0 sys_yes_no danger f \N 1 7 t 否 2025-09-05 00:49:41.688015 2025-09-05 00:49:41.688015 -99 其他 0 sys_oper_type info f \N 1 8 t 其他操作 2025-09-05 00:49:41.688015 2025-09-05 00:49:41.688016 -1 新增 1 sys_oper_type info f \N 1 9 t 新增操作 2025-09-05 00:49:41.688016 2025-09-05 00:49:41.688016 -2 修改 2 sys_oper_type info f \N 1 10 t 修改操作 2025-09-05 00:49:41.688017 2025-09-05 00:49:41.688017 -3 删除 3 sys_oper_type danger f \N 1 11 t 删除操作 2025-09-05 00:49:41.688017 2025-09-05 00:49:41.688018 -4 分配权限 4 sys_oper_type primary f \N 1 12 t 授权操作 2025-09-05 00:49:41.688018 2025-09-05 00:49:41.688018 -5 导出 5 sys_oper_type warning f \N 1 13 t 导出操作 2025-09-05 00:49:41.688019 2025-09-05 00:49:41.688019 -6 导入 6 sys_oper_type warning f \N 1 14 t 导入操作 2025-09-05 00:49:41.68802 2025-09-05 00:49:41.68802 -7 强退 7 sys_oper_type danger f \N 1 15 t 强退操作 2025-09-05 00:49:41.68802 2025-09-05 00:49:41.688021 -8 生成代码 8 sys_oper_type warning f \N 1 16 t 生成操作 2025-09-05 00:49:41.688021 2025-09-05 00:49:41.688021 -9 清空数据 9 sys_oper_type danger f \N 1 17 t 清空操作 2025-09-05 00:49:41.688022 2025-09-05 00:49:41.688022 -1 通知 1 sys_notice_type blue warning t \N 1 18 t 通知 2025-09-05 00:49:41.688022 2025-09-05 00:49:41.688023 -2 公告 2 sys_notice_type orange success f \N 1 19 t 公告 2025-09-05 00:49:41.688023 2025-09-05 00:49:41.688023 -1 默认(Memory) default sys_job_store \N t \N 1 20 t 默认分组 2025-09-05 00:49:41.688024 2025-09-05 00:49:41.688024 -2 数据库(Sqlalchemy) sqlalchemy sys_job_store \N f \N 1 21 t 数据库分组 2025-09-05 00:49:41.688025 2025-09-05 00:49:41.688025 -3 数据库(Redis) redis sys_job_store \N f \N 1 22 t reids分组 2025-09-05 00:49:41.688025 2025-09-05 00:49:41.688026 -1 线程池 default sys_job_executor \N f \N 1 23 t 线程池 2025-09-05 00:49:41.688026 2025-09-05 00:49:41.688026 -2 进程池 processpool sys_job_executor \N f \N 1 24 t 进程池 2025-09-05 00:49:41.688027 2025-09-05 00:49:41.688027 -1 演示函数 scheduler_test.job sys_job_function \N t \N 1 25 t 演示函数 2025-09-05 00:49:41.688027 2025-09-05 00:49:41.688028 -1 指定日期(date) date sys_job_trigger \N t \N 1 26 t 指定日期任务触发器 2025-09-05 00:49:41.688028 2025-09-05 00:49:41.688028 -2 间隔触发器(interval) interval sys_job_trigger \N f \N 1 27 t 间隔触发器任务触发器 2025-09-05 00:49:41.688029 2025-09-05 00:49:41.688029 -3 cron表达式 cron sys_job_trigger \N f \N 1 28 t 间隔触发器任务触发器 2025-09-05 00:49:41.688029 2025-09-05 00:49:41.68803 -1 默认(default) default sys_list_class \N t \N 1 29 t 默认表格回显样式 2025-09-05 00:49:41.68803 2025-09-05 00:49:41.68803 -2 主要(primary) primary sys_list_class \N f \N 1 30 t 主要表格回显样式 2025-09-05 00:49:41.688031 2025-09-05 00:49:41.688031 -3 成功(success) success sys_list_class \N f \N 1 31 t 成功表格回显样式 2025-09-05 00:49:41.688032 2025-09-05 00:49:41.688032 -4 信息(info) info sys_list_class \N f \N 1 32 t 信息表格回显样式 2025-09-05 00:49:41.688032 2025-09-05 00:49:41.688033 -5 警告(warning) warning sys_list_class \N f \N 1 33 t 警告表格回显样式 2025-09-05 00:49:41.688033 2025-09-05 00:49:41.688033 -6 危险(danger) danger sys_list_class \N f \N 1 34 t 危险表格回显样式 2025-09-05 00:49:41.688034 2025-09-05 00:49:41.688034 +1 男 0 sys_user_sex blue \N t \N 1 1 t 性别男 2025-09-06 01:12:52.927183 2025-09-06 01:12:52.927184 +2 女 1 sys_user_sex pink \N f \N 1 2 t 性别女 2025-09-06 01:12:52.927185 2025-09-06 01:12:52.927185 +3 未知 2 sys_user_sex red \N f \N 1 3 t 性别未知 2025-09-06 01:12:52.927186 2025-09-06 01:12:52.927186 +1 启用 1 sys_common_status primary f \N 1 4 t 启用状态 2025-09-06 01:12:52.927187 2025-09-06 01:12:52.927187 +2 停用 0 sys_common_status danger f \N 1 5 t 停用状态 2025-09-06 01:12:52.927187 2025-09-06 01:12:52.927188 +1 是 1 sys_yes_no primary t \N 1 6 t 是 2025-09-06 01:12:52.927188 2025-09-06 01:12:52.927188 +2 否 0 sys_yes_no danger f \N 1 7 t 否 2025-09-06 01:12:52.927189 2025-09-06 01:12:52.927189 +99 其他 0 sys_oper_type info f \N 1 8 t 其他操作 2025-09-06 01:12:52.92719 2025-09-06 01:12:52.92719 +1 新增 1 sys_oper_type info f \N 1 9 t 新增操作 2025-09-06 01:12:52.92719 2025-09-06 01:12:52.927191 +2 修改 2 sys_oper_type info f \N 1 10 t 修改操作 2025-09-06 01:12:52.927191 2025-09-06 01:12:52.927191 +3 删除 3 sys_oper_type danger f \N 1 11 t 删除操作 2025-09-06 01:12:52.927192 2025-09-06 01:12:52.927192 +4 分配权限 4 sys_oper_type primary f \N 1 12 t 授权操作 2025-09-06 01:12:52.927192 2025-09-06 01:12:52.927193 +5 导出 5 sys_oper_type warning f \N 1 13 t 导出操作 2025-09-06 01:12:52.927193 2025-09-06 01:12:52.927193 +6 导入 6 sys_oper_type warning f \N 1 14 t 导入操作 2025-09-06 01:12:52.927194 2025-09-06 01:12:52.927194 +7 强退 7 sys_oper_type danger f \N 1 15 t 强退操作 2025-09-06 01:12:52.927195 2025-09-06 01:12:52.927195 +8 生成代码 8 sys_oper_type warning f \N 1 16 t 生成操作 2025-09-06 01:12:52.927195 2025-09-06 01:12:52.927196 +9 清空数据 9 sys_oper_type danger f \N 1 17 t 清空操作 2025-09-06 01:12:52.927196 2025-09-06 01:12:52.927196 +1 通知 1 sys_notice_type blue warning t \N 1 18 t 通知 2025-09-06 01:12:52.927197 2025-09-06 01:12:52.927197 +2 公告 2 sys_notice_type orange success f \N 1 19 t 公告 2025-09-06 01:12:52.927197 2025-09-06 01:12:52.927198 +1 默认(Memory) default sys_job_store \N t \N 1 20 t 默认分组 2025-09-06 01:12:52.927198 2025-09-06 01:12:52.927198 +2 数据库(Sqlalchemy) sqlalchemy sys_job_store \N f \N 1 21 t 数据库分组 2025-09-06 01:12:52.927199 2025-09-06 01:12:52.927199 +3 数据库(Redis) redis sys_job_store \N f \N 1 22 t reids分组 2025-09-06 01:12:52.927199 2025-09-06 01:12:52.9272 +1 线程池 default sys_job_executor \N f \N 1 23 t 线程池 2025-09-06 01:12:52.9272 2025-09-06 01:12:52.927201 +2 进程池 processpool sys_job_executor \N f \N 1 24 t 进程池 2025-09-06 01:12:52.927201 2025-09-06 01:12:52.927201 +1 演示函数 scheduler_test.job sys_job_function \N t \N 1 25 t 演示函数 2025-09-06 01:12:52.927202 2025-09-06 01:12:52.927202 +1 指定日期(date) date sys_job_trigger \N t \N 1 26 t 指定日期任务触发器 2025-09-06 01:12:52.927202 2025-09-06 01:12:52.927203 +2 间隔触发器(interval) interval sys_job_trigger \N f \N 1 27 t 间隔触发器任务触发器 2025-09-06 01:12:52.927203 2025-09-06 01:12:52.927203 +3 cron表达式 cron sys_job_trigger \N f \N 1 28 t 间隔触发器任务触发器 2025-09-06 01:12:52.927204 2025-09-06 01:12:52.927204 +1 默认(default) default sys_list_class \N t \N 1 29 t 默认表格回显样式 2025-09-06 01:12:52.927204 2025-09-06 01:12:52.927205 +2 主要(primary) primary sys_list_class \N f \N 1 30 t 主要表格回显样式 2025-09-06 01:12:52.927205 2025-09-06 01:12:52.927205 +3 成功(success) success sys_list_class \N f \N 1 31 t 成功表格回显样式 2025-09-06 01:12:52.927206 2025-09-06 01:12:52.927206 +4 信息(info) info sys_list_class \N f \N 1 32 t 信息表格回显样式 2025-09-06 01:12:52.927206 2025-09-06 01:12:52.927207 +5 警告(warning) warning sys_list_class \N f \N 1 33 t 警告表格回显样式 2025-09-06 01:12:52.927207 2025-09-06 01:12:52.927207 +6 危险(danger) danger sys_list_class \N f \N 1 34 t 危险表格回显样式 2025-09-06 01:12:52.927208 2025-09-06 01:12:52.927208 \. @@ -2246,16 +2246,16 @@ COPY public.system_dict_data (dict_sort, dict_label, dict_value, dict_type, css_ -- COPY public.system_dict_type (dict_name, dict_type, creator_id, id, status, description, created_at, updated_at) FROM stdin; -用户性别 sys_user_sex 1 1 t 用户性别列表 2025-09-05 00:49:41.681183 2025-09-05 00:49:41.681184 -系统是否 sys_yes_no 1 2 t 系统是否列表 2025-09-05 00:49:41.681185 2025-09-05 00:49:41.681185 -系统状态 sys_common_status 1 3 t 系统状态 2025-09-05 00:49:41.681186 2025-09-05 00:49:41.681186 -通知类型 sys_notice_type 1 4 t 通知类型列表 2025-09-05 00:49:41.681186 2025-09-05 00:49:41.681187 -操作类型 sys_oper_type 1 5 t 操作类型列表 2025-09-05 00:49:41.681187 2025-09-05 00:49:41.681187 -任务存储器 sys_job_store 1 6 t 任务分组列表 2025-09-05 00:49:41.681188 2025-09-05 00:49:41.681188 -任务执行器 sys_job_executor 1 7 t 任务执行器列表 2025-09-05 00:49:41.681189 2025-09-05 00:49:41.681189 -任务函数 sys_job_function 1 8 t 任务函数列表 2025-09-05 00:49:41.681189 2025-09-05 00:49:41.68119 -任务触发器 sys_job_trigger 1 9 t 任务触发器列表 2025-09-05 00:49:41.68119 2025-09-05 00:49:41.68119 -表格回显样式 sys_list_class 1 10 t 表格回显样式列表 2025-09-05 00:49:41.681191 2025-09-05 00:49:41.681191 +用户性别 sys_user_sex 1 1 t 用户性别列表 2025-09-06 01:12:52.921936 2025-09-06 01:12:52.921937 +系统是否 sys_yes_no 1 2 t 系统是否列表 2025-09-06 01:12:52.921937 2025-09-06 01:12:52.921937 +系统状态 sys_common_status 1 3 t 系统状态 2025-09-06 01:12:52.921938 2025-09-06 01:12:52.921938 +通知类型 sys_notice_type 1 4 t 通知类型列表 2025-09-06 01:12:52.921939 2025-09-06 01:12:52.921939 +操作类型 sys_oper_type 1 5 t 操作类型列表 2025-09-06 01:12:52.921939 2025-09-06 01:12:52.92194 +任务存储器 sys_job_store 1 6 t 任务分组列表 2025-09-06 01:12:52.92194 2025-09-06 01:12:52.92194 +任务执行器 sys_job_executor 1 7 t 任务执行器列表 2025-09-06 01:12:52.921941 2025-09-06 01:12:52.921941 +任务函数 sys_job_function 1 8 t 任务函数列表 2025-09-06 01:12:52.921941 2025-09-06 01:12:52.921942 +任务触发器 sys_job_trigger 1 9 t 任务触发器列表 2025-09-06 01:12:52.921942 2025-09-06 01:12:52.921942 +表格回显样式 sys_list_class 1 10 t 表格回显样式列表 2025-09-06 01:12:52.921943 2025-09-06 01:12:52.921943 \. @@ -2272,107 +2272,107 @@ COPY public.system_log (type, request_path, request_method, request_payload, req -- COPY public.system_menu (name, type, "order", permission, icon, route_name, route_path, component_path, redirect, hidden, keep_alive, always_show, title, params, affix, parent_id, id, status, description, created_at, updated_at) FROM stdin; -仪表盘 1 1 client Dashboard /dashboard \N /dashboard/workplace f t t 仪表盘 null f \N 1 t 初始化数据 2025-09-05 00:49:41.666398 2025-09-05 00:49:41.666402 -工作台 2 1 dashboard:workplace:query homepage Workplace /dashboard/workplace dashboard/workplace \N f t f 工作台 null t 1 2 t 初始化数据 2025-09-05 00:49:41.666409 2025-09-05 00:49:41.666418 -分析页 2 2 dashboard:analysis:query el-icon-PieChart Analysis /dashboard/analysis dashboard/analysis \N f t f 分析页 null f 1 3 t 初始化数据 2025-09-05 00:49:41.666419 2025-09-05 00:49:41.666425 -系统管理 1 2 \N system System /system \N /system/menu f t f 系统管理 null f \N 4 t 初始化数据 2025-09-05 00:49:41.666426 2025-09-05 00:49:41.666427 -菜单管理 2 1 system:menu:query menu Menu /system/menu system/menu/index \N f t f 菜单管理 null f 4 5 t 初始化数据 2025-09-05 00:49:41.666427 2025-09-05 00:49:41.666428 -部门管理 2 2 system:dept:query tree Dept /system/dept system/dept/index \N f t f 部门管理 null f 4 6 t 初始化数据 2025-09-05 00:49:41.666428 2025-09-05 00:49:41.666428 -岗位管理 2 3 system:position:query el-icon-Coordinate Position /system/position system/position/index \N f t f 岗位管理 null f 4 7 t 初始化数据 2025-09-05 00:49:41.666435 2025-09-05 00:49:41.666436 -角色管理 2 4 system:role:query role Role /system/role system/role/index \N f t f 角色管理 null f 4 8 t 初始化数据 2025-09-05 00:49:41.666437 2025-09-05 00:49:41.666437 -用户管理 2 5 system:user:query el-icon-User User /system/user system/user/index \N f t f 用户管理 null f 4 9 t 初始化数据 2025-09-05 00:49:41.666438 2025-09-05 00:49:41.666438 -日志管理 2 6 system:log:query el-icon-Aim Log /system/log system/log/index \N f t f 日志管理 null f 4 10 t 初始化数据 2025-09-05 00:49:41.666438 2025-09-05 00:49:41.666439 -公告管理 2 7 system:notice:query bell Notice /system/notice system/notice/index \N f t f 公告管理 null f 4 11 t 初始化数据 2025-09-05 00:49:41.666439 2025-09-05 00:49:41.66644 -配置管理 2 8 system:config:query setting Config /system/config system/config/index \N f t f 配置管理 null f 4 12 t 初始化数据 2025-09-05 00:49:41.66644 2025-09-05 00:49:41.666441 -字典管理 2 9 system:dict_type:query dict Dict /system/dict system/dict/index \N f t f 字典管理 null f 4 13 t 初始化数据 2025-09-05 00:49:41.666441 2025-09-05 00:49:41.666441 -创建菜单 3 1 system:menu:create \N \N \N \N \N f t f 创建菜单 null f 5 14 t 初始化数据 2025-09-05 00:49:41.666442 2025-09-05 00:49:41.666442 -修改菜单 3 2 system:menu:update \N \N \N \N \N f t f 修改菜单 null f 5 15 t 初始化数据 2025-09-05 00:49:41.666443 2025-09-05 00:49:41.666443 -删除菜单 3 3 system:menu:delete \N \N \N \N \N f t f 删除菜单 null f 5 16 t 初始化数据 2025-09-05 00:49:41.666443 2025-09-05 00:49:41.666444 -批量修改菜单状态 3 4 system:menu:patch \N \N \N \N \N f t f 批量修改菜单状态 null f 5 17 t 初始化数据 2025-09-05 00:49:41.666444 2025-09-05 00:49:41.666445 -创建部门 3 1 system:dept:create \N \N \N \N \N f t f 创建部门 null f 6 18 t 初始化数据 2025-09-05 00:49:41.666445 2025-09-05 00:49:41.666445 -修改部门 3 2 system:dept:update \N \N \N \N \N f t f 修改部门 null f 6 19 t 初始化数据 2025-09-05 00:49:41.666446 2025-09-05 00:49:41.666446 -删除部门 3 3 system:dept:delete \N \N \N \N \N f t f 删除部门 null f 6 20 t 初始化数据 2025-09-05 00:49:41.666447 2025-09-05 00:49:41.666447 -批量修改部门状态 3 4 system:dept:patch \N \N \N \N \N f t f 批量修改部门状态 null f 6 21 t 初始化数据 2025-09-05 00:49:41.666447 2025-09-05 00:49:41.666448 -创建岗位 3 1 system:position:create \N \N \N \N \N f t f 创建岗位 null f 7 22 t 初始化数据 2025-09-05 00:49:41.666448 2025-09-05 00:49:41.666448 -修改岗位 3 2 system:position:update \N \N \N \N \N f t f 修改岗位 null f 7 23 t 初始化数据 2025-09-05 00:49:41.666449 2025-09-05 00:49:41.666449 -删除岗位 3 3 system:position:delete \N \N \N \N \N f t f 修改岗位 null f 7 24 t 初始化数据 2025-09-05 00:49:41.66645 2025-09-05 00:49:41.66645 -批量修改岗位状态 3 4 system:position:patch \N \N \N \N \N f t f 批量修改岗位状态 null f 7 25 t 初始化数据 2025-09-05 00:49:41.66645 2025-09-05 00:49:41.666451 -岗位导出 3 5 system:position:export \N \N \N \N \N f t f 岗位导出 null f 7 26 t 初始化数据 2025-09-05 00:49:41.666451 2025-09-05 00:49:41.666452 -创建角色 3 1 system:role:create \N \N \N \N \N f t f 创建角色 null f 8 27 t 初始化数据 2025-09-05 00:49:41.666452 2025-09-05 00:49:41.666452 -修改角色 3 2 system:role:update \N \N \N \N \N f t f 修改角色 null f 8 28 t 初始化数据 2025-09-05 00:49:41.666453 2025-09-05 00:49:41.666453 -删除角色 3 3 system:role:delete \N \N \N \N \N f t f 删除角色 null f 8 29 t 初始化数据 2025-09-05 00:49:41.666454 2025-09-05 00:49:41.666454 -批量修改角色状态 3 4 system:role:patch \N \N \N \N \N f t f 批量修改角色状态 null f 8 30 t 初始化数据 2025-09-05 00:49:41.666455 2025-09-05 00:49:41.666455 -设置角色权限 3 8 system:role:permission \N \N \N \N \N f t f 设置角色权限 null f 7 31 t 初始化数据 2025-09-05 00:49:41.666455 2025-09-05 00:49:41.666456 -角色导出 3 6 system:role:export \N \N \N \N \N f t f 角色导出 null f 8 32 t 初始化数据 2025-09-05 00:49:41.666456 2025-09-05 00:49:41.666457 -创建用户 3 1 system:user:create \N \N \N \N \N f t f 创建用户 null f 9 33 t 初始化数据 2025-09-05 00:49:41.666457 2025-09-05 00:49:41.666458 -修改用户 3 2 system:user:update \N \N \N \N \N f t f 修改用户 null f 9 34 t 初始化数据 2025-09-05 00:49:41.666458 2025-09-05 00:49:41.666458 -删除用户 3 3 system:user:delete \N \N \N \N \N f t f 删除用户 null f 9 35 t 初始化数据 2025-09-05 00:49:41.666459 2025-09-05 00:49:41.666459 -批量修改用户状态 3 4 system:user:patch \N \N \N \N \N f t f 批量修改用户状态 null f 9 36 t 初始化数据 2025-09-05 00:49:41.66646 2025-09-05 00:49:41.66646 -导出用户 3 5 system:user:export \N \N \N \N \N f t f 导出用户 null f 9 37 t 初始化数据 2025-09-05 00:49:41.666461 2025-09-05 00:49:41.666461 -导入用户 3 6 system:user:import \N \N \N \N \N f t f 导入用户 null f 9 38 t 初始化数据 2025-09-05 00:49:41.666461 2025-09-05 00:49:41.666462 -日志删除 3 1 system:operation_log:delete \N \N \N \N \N f t f 日志删除 null f 10 39 t 初始化数据 2025-09-05 00:49:41.666462 2025-09-05 00:49:41.666462 -日志导出 3 2 system:operation_log:export \N \N \N \N \N f t f 日志导出 null f 10 40 t 初始化数据 2025-09-05 00:49:41.666463 2025-09-05 00:49:41.666463 -公告创建 3 1 system:notice:create \N \N \N \N \N f t f 公告创建 null f 11 41 t 初始化数据 2025-09-05 00:49:41.666464 2025-09-05 00:49:41.666464 -公告修改 3 2 system:notice:update \N \N \N \N \N f t f 修改用户 null f 11 42 t 初始化数据 2025-09-05 00:49:41.666464 2025-09-05 00:49:41.666465 -公告删除 3 3 system:notice:delete \N \N \N \N \N f t f 公告删除 null f 11 43 t 初始化数据 2025-09-05 00:49:41.666465 2025-09-05 00:49:41.666466 -公告导出 3 4 system:notice:export \N \N \N \N \N f t f 公告导出 null f 11 44 t 初始化数据 2025-09-05 00:49:41.666466 2025-09-05 00:49:41.666466 -公告批量修改状态 3 5 system:notice:patch \N \N \N \N \N f t f 公告批量修改状态 null f 11 45 t 初始化数据 2025-09-05 00:49:41.666467 2025-09-05 00:49:41.666467 -创建配置 3 1 system:config:create \N \N \N \N \N f t f 创建配置 null f 12 46 t 初始化数据 2025-09-05 00:49:41.666467 2025-09-05 00:49:41.666468 -修改配置 3 2 system:config:update \N \N \N \N \N f t f 修改配置 null f 12 47 t 初始化数据 2025-09-05 00:49:41.666497 2025-09-05 00:49:41.666498 -删除配置 3 3 system:config:delete \N \N \N \N \N f t f 删除配置 null f 12 48 t 初始化数据 2025-09-05 00:49:41.666499 2025-09-05 00:49:41.666499 -导出配置 3 4 system:config:export \N \N \N \N \N f t f 导出配置 null f 12 49 t 初始化数据 2025-09-05 00:49:41.6665 2025-09-05 00:49:41.6665 -配置上传 3 5 system:config:upload \N \N \N \N \N f t f 配置上传 null f 12 50 t 初始化数据 2025-09-05 00:49:41.666501 2025-09-05 00:49:41.666501 -创建字典类型 3 1 system:dict_type:create \N \N \N \N \N f t f 创建字典类型 null f 13 51 t 初始化数据 2025-09-05 00:49:41.666501 2025-09-05 00:49:41.666502 -修改字典类型 3 2 system:dict_type:update \N \N \N \N \N f t f 修改字典类型 null f 13 52 t 初始化数据 2025-09-05 00:49:41.666502 2025-09-05 00:49:41.666502 -删除字典类型 3 3 system:dict_type:delete \N \N \N \N \N f t f 删除字典类型 null f 13 53 t 初始化数据 2025-09-05 00:49:41.666503 2025-09-05 00:49:41.666503 -导出字典类型 3 4 system:dict_type:export \N \N \N \N \N f t f 导出字典类型 null f 13 54 t 初始化数据 2025-09-05 00:49:41.666504 2025-09-05 00:49:41.666504 -批量修改字典状态 3 5 system:dict_type:patch \N \N \N \N \N f t f 导出字典类型 null f 13 55 t 初始化数据 2025-09-05 00:49:41.666504 2025-09-05 00:49:41.666505 -字典数据查询 3 6 system:dict_data:query \N \N \N \N \N f t f 字典数据查询 null f 13 56 t 初始化数据 2025-09-05 00:49:41.666505 2025-09-05 00:49:41.666505 -创建字典数据 3 7 system:dict_data:create \N \N \N \N \N f t f 创建字典数据 null f 13 57 t 初始化数据 2025-09-05 00:49:41.666506 2025-09-05 00:49:41.666506 -修改字典数据 3 8 system:dict_data:update \N \N \N \N \N f t f 修改字典数据 null f 13 58 t 初始化数据 2025-09-05 00:49:41.666506 2025-09-05 00:49:41.666507 -删除字典数据 3 9 system:dict_data:delete \N \N \N \N \N f t f 删除字典数据 null f 13 59 t 初始化数据 2025-09-05 00:49:41.666507 2025-09-05 00:49:41.666507 -导出字典数据 3 10 system:dict_data:export \N \N \N \N \N f t f 导出字典数据 null f 13 60 t 初始化数据 2025-09-05 00:49:41.666508 2025-09-05 00:49:41.666508 -批量修改字典数据状态 3 11 system:dict_data:patch \N \N \N \N \N f t f 批量修改字典数据状态 null f 13 61 t 初始化数据 2025-09-05 00:49:41.666508 2025-09-05 00:49:41.666509 -监控管理 1 3 \N monitor Monitor /monitor \N /monitor/online f f f 监控管理 null f \N 62 t 初始化数据 2025-09-05 00:49:41.666509 2025-09-05 00:49:41.66651 -任务管理 2 1 monitor:job:query el-icon-DataLine Job /monitor/job monitor/job/index \N f t f 任务管理 null f 62 63 t 初始化数据 2025-09-05 00:49:41.66651 2025-09-05 00:49:41.66651 -创建任务 3 1 monitor:job:create \N \N \N \N \N f t f 创建任务 null f 63 64 t 初始化数据 2025-09-05 00:49:41.666511 2025-09-05 00:49:41.666511 -修改和操作任务 3 2 monitor:job:update \N \N \N \N \N f t f 修改和操作任务 null f 63 65 t 初始化数据 2025-09-05 00:49:41.666512 2025-09-05 00:49:41.666512 -删除和清除任务 3 3 monitor:job:delete \N \N \N \N \N f t f 删除和清除任务 null f 63 66 t 初始化数据 2025-09-05 00:49:41.666512 2025-09-05 00:49:41.666513 -导出定时任务 3 4 monitor:job:export \N \N \N \N \N f t f 导出定时任务 null f 63 67 t 初始化数据 2025-09-05 00:49:41.666552 2025-09-05 00:49:41.666553 -在线用户 2 2 monitor:online:query el-icon-Headset MonitorOnline /monitor/online monitor/online/index \N f f f 在线用户 null f 62 68 t 初始化数据 2025-09-05 00:49:41.666554 2025-09-05 00:49:41.666555 -在线用户强制下线 3 1 monitor:online:delete \N \N \N \N \N f f f 在线用户强制下线 null f 68 69 t 初始化数据 2025-09-05 00:49:41.666555 2025-09-05 00:49:41.666555 -服务器监控 2 3 monitor:server:query el-icon-Odometer MonitorServer /monitor/server monitor/server/index \N f f f 服务器监控 null f 62 70 t 初始化数据 2025-09-05 00:49:41.666556 2025-09-05 00:49:41.666556 -缓存监控 2 4 monitor:cache:query el-icon-Stopwatch MonitorCache /monitor/cache monitor/cache/index \N f f f 缓存监控 null f 62 71 t 初始化数据 2025-09-05 00:49:41.666557 2025-09-05 00:49:41.666557 -清除缓存 3 1 monitor:cache:delete \N \N \N \N \N f f f 清除缓存 null f 71 72 t 初始化数据 2025-09-05 00:49:41.666557 2025-09-05 00:49:41.666558 -公共模块 1 4 \N document Common /common \N /common/docs f f f 公共模块 null f \N 73 t 初始化数据 2025-09-05 00:49:41.666558 2025-09-05 00:49:41.666558 -接口管理 4 1 common:docs:query api Docs /common/docs common/docs/index \N f f f 接口管理 null f 73 74 t 初始化数据 2025-09-05 00:49:41.666559 2025-09-05 00:49:41.666559 -文档管理 4 2 common:redoc:query el-icon-Document Redoc /common/redoc common/redoc/index \N f f f 文档管理 null f 73 75 t 初始化数据 2025-09-05 00:49:41.666559 2025-09-05 00:49:41.66656 -演示模块 1 5 \N el-icon-Document Demo /demo \N /demo/example f f f 演示模块 null f \N 76 t 初始化数据 2025-09-05 00:49:41.66656 2025-09-05 00:49:41.666561 -示例管理 2 1 demo:example:query el-icon-DataLine Example /demo/example demo/example/index \N f t f 示例管理 null f 76 77 t 初始化数据 2025-09-05 00:49:41.666561 2025-09-05 00:49:41.666561 -创建示例 3 1 demo:example:create \N \N \N \N \N f t f 创建示例 null f 77 78 t 初始化数据 2025-09-05 00:49:41.666562 2025-09-05 00:49:41.666562 -更新示例 3 2 demo:example:update \N \N \N \N \N f t f 更新示例 null f 77 79 t 初始化数据 2025-09-05 00:49:41.666563 2025-09-05 00:49:41.666563 -删除示例 3 3 demo:example:delete \N \N \N \N \N f t f 删除示例 null f 77 80 t 初始化数据 2025-09-05 00:49:41.666563 2025-09-05 00:49:41.666564 -批量修改示例状态 3 4 demo:example:patch \N \N \N \N \N f t f 批量修改示例状态 null f 77 81 t 初始化数据 2025-09-05 00:49:41.666564 2025-09-05 00:49:41.666564 -导出示例 3 5 demo:example:export \N \N \N \N \N f t f 导出示例 null f 77 82 t 初始化数据 2025-09-05 00:49:41.666565 2025-09-05 00:49:41.666565 -导入示例 3 6 demo:example:import \N \N \N \N \N f t f 导入示例 null f 77 83 t 初始化数据 2025-09-05 00:49:41.666566 2025-09-05 00:49:41.666566 -下载导入示例模版 3 7 demo:example:download \N \N \N \N \N f t f 下载导入示例模版 null f 77 84 t 初始化数据 2025-09-05 00:49:41.666566 2025-09-05 00:49:41.666567 -应用管理 1 6 \N applications Application /application \N /application/myapp f f f 应用管理 null f \N 85 t 初始化数据 2025-09-05 00:49:41.666567 2025-09-05 00:49:41.666568 -我的应用 2 1 application:myapp:query system-application ApplicationSystem /application/myapp application/myapp/index \N f t f 应用系统管理 null f 85 86 t 初始化数据 2025-09-05 00:49:41.666568 2025-09-05 00:49:41.666568 -创建应用 3 1 application:myapp:create \N \N \N \N \N f t f 创建应用 null f 86 87 t 初始化数据 2025-09-05 00:49:41.666569 2025-09-05 00:49:41.666569 -修改应用 3 2 application:myapp:update \N \N \N \N \N f t f 修改应用 null f 86 88 t 初始化数据 2025-09-05 00:49:41.666569 2025-09-05 00:49:41.66657 -删除应用 3 3 application:myapp:delete \N \N \N \N \N f t f 删除应用 null f 86 89 t 初始化数据 2025-09-05 00:49:41.66657 2025-09-05 00:49:41.666571 -批量修改应用状态 3 4 application:myapp:patch \N \N \N \N \N f t f 批量修改应用状态 null f 86 90 t 初始化数据 2025-09-05 00:49:41.666571 2025-09-05 00:49:41.666571 -资源管理 1 7 \N folder Resource /resource \N /resource/file f f f 资源管理 null f \N 91 t 初始化数据 2025-09-05 00:49:41.666572 2025-09-05 00:49:41.666572 -文件管理 2 1 resource:file:query el-icon-FolderOpened ResourceFile /resource/file resource/file/index \N f t f 文件管理 null f 91 92 t 初始化数据 2025-09-05 00:49:41.666573 2025-09-05 00:49:41.666573 -文件上传 3 1 resource:file:upload \N \N \N \N \N f t f 文件上传 null f 92 93 t 初始化数据 2025-09-05 00:49:41.666573 2025-09-05 00:49:41.666574 -文件下载 3 2 resource:file:download \N \N \N \N \N f t f 文件下载 null f 92 94 t 初始化数据 2025-09-05 00:49:41.666574 2025-09-05 00:49:41.666575 -文件删除 3 3 resource:file:delete \N \N \N \N \N f t f 文件删除 null f 92 95 t 初始化数据 2025-09-05 00:49:41.666575 2025-09-05 00:49:41.666575 -文件移动 3 4 resource:file:move \N \N \N \N \N f t f 文件移动 null f 92 96 t 初始化数据 2025-09-05 00:49:41.666576 2025-09-05 00:49:41.666576 -文件复制 3 5 resource:file:copy \N \N \N \N \N f t f 文件复制 null f 92 97 t 初始化数据 2025-09-05 00:49:41.666576 2025-09-05 00:49:41.666577 -文件重命名 3 6 resource:file:rename \N \N \N \N \N f t f 文件重命名 null f 92 98 t 初始化数据 2025-09-05 00:49:41.666577 2025-09-05 00:49:41.666578 -创建目录 3 7 resource:file:create_dir \N \N \N \N \N f t f 创建目录 null f 92 99 t 初始化数据 2025-09-05 00:49:41.666578 2025-09-05 00:49:41.666578 -文件搜索 3 8 resource:file:search \N \N \N \N \N f t f 文件搜索 null f 92 100 t 初始化数据 2025-09-05 00:49:41.666579 2025-09-05 00:49:41.666579 -导出文件列表 3 9 resource:file:export \N \N \N \N \N f t f 导出文件列表 null f 92 101 t 初始化数据 2025-09-05 00:49:41.666579 2025-09-05 00:49:41.66658 +仪表盘 1 1 client Dashboard /dashboard \N /dashboard/workplace f t t 仪表盘 null f \N 1 t 初始化数据 2025-09-06 01:12:52.908967 2025-09-06 01:12:52.908969 +工作台 2 1 dashboard:workplace:query homepage Workplace /dashboard/workplace dashboard/workplace \N f t f 工作台 null t 1 2 t 初始化数据 2025-09-06 01:12:52.908969 2025-09-06 01:12:52.90897 +分析页 2 2 dashboard:analysis:query el-icon-PieChart Analysis /dashboard/analysis dashboard/analysis \N f t f 分析页 null f 1 3 t 初始化数据 2025-09-06 01:12:52.90897 2025-09-06 01:12:52.908971 +系统管理 1 2 \N system System /system \N /system/menu f t f 系统管理 null f \N 4 t 初始化数据 2025-09-06 01:12:52.908971 2025-09-06 01:12:52.908971 +菜单管理 2 1 system:menu:query menu Menu /system/menu system/menu/index \N f t f 菜单管理 null f 4 5 t 初始化数据 2025-09-06 01:12:52.908972 2025-09-06 01:12:52.908972 +部门管理 2 2 system:dept:query tree Dept /system/dept system/dept/index \N f t f 部门管理 null f 4 6 t 初始化数据 2025-09-06 01:12:52.908972 2025-09-06 01:12:52.908973 +岗位管理 2 3 system:position:query el-icon-Coordinate Position /system/position system/position/index \N f t f 岗位管理 null f 4 7 t 初始化数据 2025-09-06 01:12:52.908973 2025-09-06 01:12:52.908974 +角色管理 2 4 system:role:query role Role /system/role system/role/index \N f t f 角色管理 null f 4 8 t 初始化数据 2025-09-06 01:12:52.908974 2025-09-06 01:12:52.908974 +用户管理 2 5 system:user:query el-icon-User User /system/user system/user/index \N f t f 用户管理 null f 4 9 t 初始化数据 2025-09-06 01:12:52.908975 2025-09-06 01:12:52.908975 +日志管理 2 6 system:log:query el-icon-Aim Log /system/log system/log/index \N f t f 日志管理 null f 4 10 t 初始化数据 2025-09-06 01:12:52.908975 2025-09-06 01:12:52.908976 +公告管理 2 7 system:notice:query bell Notice /system/notice system/notice/index \N f t f 公告管理 null f 4 11 t 初始化数据 2025-09-06 01:12:52.908976 2025-09-06 01:12:52.908977 +配置管理 2 8 system:config:query setting Config /system/config system/config/index \N f t f 配置管理 null f 4 12 t 初始化数据 2025-09-06 01:12:52.908977 2025-09-06 01:12:52.908977 +字典管理 2 9 system:dict_type:query dict Dict /system/dict system/dict/index \N f t f 字典管理 null f 4 13 t 初始化数据 2025-09-06 01:12:52.908978 2025-09-06 01:12:52.908978 +创建菜单 3 1 system:menu:create \N \N \N \N \N f t f 创建菜单 null f 5 14 t 初始化数据 2025-09-06 01:12:52.908978 2025-09-06 01:12:52.908979 +修改菜单 3 2 system:menu:update \N \N \N \N \N f t f 修改菜单 null f 5 15 t 初始化数据 2025-09-06 01:12:52.908979 2025-09-06 01:12:52.90898 +删除菜单 3 3 system:menu:delete \N \N \N \N \N f t f 删除菜单 null f 5 16 t 初始化数据 2025-09-06 01:12:52.90898 2025-09-06 01:12:52.90898 +批量修改菜单状态 3 4 system:menu:patch \N \N \N \N \N f t f 批量修改菜单状态 null f 5 17 t 初始化数据 2025-09-06 01:12:52.908981 2025-09-06 01:12:52.908981 +创建部门 3 1 system:dept:create \N \N \N \N \N f t f 创建部门 null f 6 18 t 初始化数据 2025-09-06 01:12:52.908981 2025-09-06 01:12:52.908982 +修改部门 3 2 system:dept:update \N \N \N \N \N f t f 修改部门 null f 6 19 t 初始化数据 2025-09-06 01:12:52.908982 2025-09-06 01:12:52.908982 +删除部门 3 3 system:dept:delete \N \N \N \N \N f t f 删除部门 null f 6 20 t 初始化数据 2025-09-06 01:12:52.908983 2025-09-06 01:12:52.908983 +批量修改部门状态 3 4 system:dept:patch \N \N \N \N \N f t f 批量修改部门状态 null f 6 21 t 初始化数据 2025-09-06 01:12:52.908984 2025-09-06 01:12:52.908984 +创建岗位 3 1 system:position:create \N \N \N \N \N f t f 创建岗位 null f 7 22 t 初始化数据 2025-09-06 01:12:52.908984 2025-09-06 01:12:52.908985 +修改岗位 3 2 system:position:update \N \N \N \N \N f t f 修改岗位 null f 7 23 t 初始化数据 2025-09-06 01:12:52.908985 2025-09-06 01:12:52.908985 +删除岗位 3 3 system:position:delete \N \N \N \N \N f t f 修改岗位 null f 7 24 t 初始化数据 2025-09-06 01:12:52.908986 2025-09-06 01:12:52.908986 +批量修改岗位状态 3 4 system:position:patch \N \N \N \N \N f t f 批量修改岗位状态 null f 7 25 t 初始化数据 2025-09-06 01:12:52.908986 2025-09-06 01:12:52.908987 +岗位导出 3 5 system:position:export \N \N \N \N \N f t f 岗位导出 null f 7 26 t 初始化数据 2025-09-06 01:12:52.908987 2025-09-06 01:12:52.908988 +创建角色 3 1 system:role:create \N \N \N \N \N f t f 创建角色 null f 8 27 t 初始化数据 2025-09-06 01:12:52.908988 2025-09-06 01:12:52.908988 +修改角色 3 2 system:role:update \N \N \N \N \N f t f 修改角色 null f 8 28 t 初始化数据 2025-09-06 01:12:52.908989 2025-09-06 01:12:52.908989 +删除角色 3 3 system:role:delete \N \N \N \N \N f t f 删除角色 null f 8 29 t 初始化数据 2025-09-06 01:12:52.90899 2025-09-06 01:12:52.90899 +批量修改角色状态 3 4 system:role:patch \N \N \N \N \N f t f 批量修改角色状态 null f 8 30 t 初始化数据 2025-09-06 01:12:52.90899 2025-09-06 01:12:52.908991 +设置角色权限 3 8 system:role:permission \N \N \N \N \N f t f 设置角色权限 null f 7 31 t 初始化数据 2025-09-06 01:12:52.908991 2025-09-06 01:12:52.908992 +角色导出 3 6 system:role:export \N \N \N \N \N f t f 角色导出 null f 8 32 t 初始化数据 2025-09-06 01:12:52.908992 2025-09-06 01:12:52.908992 +创建用户 3 1 system:user:create \N \N \N \N \N f t f 创建用户 null f 9 33 t 初始化数据 2025-09-06 01:12:52.908993 2025-09-06 01:12:52.908994 +修改用户 3 2 system:user:update \N \N \N \N \N f t f 修改用户 null f 9 34 t 初始化数据 2025-09-06 01:12:52.908994 2025-09-06 01:12:52.908995 +删除用户 3 3 system:user:delete \N \N \N \N \N f t f 删除用户 null f 9 35 t 初始化数据 2025-09-06 01:12:52.908995 2025-09-06 01:12:52.908995 +批量修改用户状态 3 4 system:user:patch \N \N \N \N \N f t f 批量修改用户状态 null f 9 36 t 初始化数据 2025-09-06 01:12:52.908996 2025-09-06 01:12:52.908996 +导出用户 3 5 system:user:export \N \N \N \N \N f t f 导出用户 null f 9 37 t 初始化数据 2025-09-06 01:12:52.908997 2025-09-06 01:12:52.908997 +导入用户 3 6 system:user:import \N \N \N \N \N f t f 导入用户 null f 9 38 t 初始化数据 2025-09-06 01:12:52.908997 2025-09-06 01:12:52.908998 +日志删除 3 1 system:operation_log:delete \N \N \N \N \N f t f 日志删除 null f 10 39 t 初始化数据 2025-09-06 01:12:52.908998 2025-09-06 01:12:52.908999 +日志导出 3 2 system:operation_log:export \N \N \N \N \N f t f 日志导出 null f 10 40 t 初始化数据 2025-09-06 01:12:52.908999 2025-09-06 01:12:52.908999 +公告创建 3 1 system:notice:create \N \N \N \N \N f t f 公告创建 null f 11 41 t 初始化数据 2025-09-06 01:12:52.909 2025-09-06 01:12:52.909 +公告修改 3 2 system:notice:update \N \N \N \N \N f t f 修改用户 null f 11 42 t 初始化数据 2025-09-06 01:12:52.909 2025-09-06 01:12:52.909001 +公告删除 3 3 system:notice:delete \N \N \N \N \N f t f 公告删除 null f 11 43 t 初始化数据 2025-09-06 01:12:52.909001 2025-09-06 01:12:52.909001 +公告导出 3 4 system:notice:export \N \N \N \N \N f t f 公告导出 null f 11 44 t 初始化数据 2025-09-06 01:12:52.909002 2025-09-06 01:12:52.909002 +公告批量修改状态 3 5 system:notice:patch \N \N \N \N \N f t f 公告批量修改状态 null f 11 45 t 初始化数据 2025-09-06 01:12:52.909003 2025-09-06 01:12:52.909003 +创建配置 3 1 system:config:create \N \N \N \N \N f t f 创建配置 null f 12 46 t 初始化数据 2025-09-06 01:12:52.909003 2025-09-06 01:12:52.909004 +修改配置 3 2 system:config:update \N \N \N \N \N f t f 修改配置 null f 12 47 t 初始化数据 2025-09-06 01:12:52.909004 2025-09-06 01:12:52.909004 +删除配置 3 3 system:config:delete \N \N \N \N \N f t f 删除配置 null f 12 48 t 初始化数据 2025-09-06 01:12:52.909005 2025-09-06 01:12:52.909005 +导出配置 3 4 system:config:export \N \N \N \N \N f t f 导出配置 null f 12 49 t 初始化数据 2025-09-06 01:12:52.909006 2025-09-06 01:12:52.909006 +配置上传 3 5 system:config:upload \N \N \N \N \N f t f 配置上传 null f 12 50 t 初始化数据 2025-09-06 01:12:52.909006 2025-09-06 01:12:52.909007 +创建字典类型 3 1 system:dict_type:create \N \N \N \N \N f t f 创建字典类型 null f 13 51 t 初始化数据 2025-09-06 01:12:52.909007 2025-09-06 01:12:52.909007 +修改字典类型 3 2 system:dict_type:update \N \N \N \N \N f t f 修改字典类型 null f 13 52 t 初始化数据 2025-09-06 01:12:52.909008 2025-09-06 01:12:52.909008 +删除字典类型 3 3 system:dict_type:delete \N \N \N \N \N f t f 删除字典类型 null f 13 53 t 初始化数据 2025-09-06 01:12:52.909009 2025-09-06 01:12:52.909009 +导出字典类型 3 4 system:dict_type:export \N \N \N \N \N f t f 导出字典类型 null f 13 54 t 初始化数据 2025-09-06 01:12:52.909009 2025-09-06 01:12:52.90901 +批量修改字典状态 3 5 system:dict_type:patch \N \N \N \N \N f t f 导出字典类型 null f 13 55 t 初始化数据 2025-09-06 01:12:52.90901 2025-09-06 01:12:52.90901 +字典数据查询 3 6 system:dict_data:query \N \N \N \N \N f t f 字典数据查询 null f 13 56 t 初始化数据 2025-09-06 01:12:52.909011 2025-09-06 01:12:52.909011 +创建字典数据 3 7 system:dict_data:create \N \N \N \N \N f t f 创建字典数据 null f 13 57 t 初始化数据 2025-09-06 01:12:52.909011 2025-09-06 01:12:52.909012 +修改字典数据 3 8 system:dict_data:update \N \N \N \N \N f t f 修改字典数据 null f 13 58 t 初始化数据 2025-09-06 01:12:52.909012 2025-09-06 01:12:52.909013 +删除字典数据 3 9 system:dict_data:delete \N \N \N \N \N f t f 删除字典数据 null f 13 59 t 初始化数据 2025-09-06 01:12:52.909013 2025-09-06 01:12:52.909013 +导出字典数据 3 10 system:dict_data:export \N \N \N \N \N f t f 导出字典数据 null f 13 60 t 初始化数据 2025-09-06 01:12:52.909014 2025-09-06 01:12:52.909014 +批量修改字典数据状态 3 11 system:dict_data:patch \N \N \N \N \N f t f 批量修改字典数据状态 null f 13 61 t 初始化数据 2025-09-06 01:12:52.909014 2025-09-06 01:12:52.909015 +监控管理 1 3 \N monitor Monitor /monitor \N /monitor/online f f f 监控管理 null f \N 62 t 初始化数据 2025-09-06 01:12:52.909015 2025-09-06 01:12:52.909016 +任务管理 2 1 monitor:job:query el-icon-DataLine Job /monitor/job monitor/job/index \N f t f 任务管理 null f 62 63 t 初始化数据 2025-09-06 01:12:52.909016 2025-09-06 01:12:52.909016 +创建任务 3 1 monitor:job:create \N \N \N \N \N f t f 创建任务 null f 63 64 t 初始化数据 2025-09-06 01:12:52.909017 2025-09-06 01:12:52.909017 +修改和操作任务 3 2 monitor:job:update \N \N \N \N \N f t f 修改和操作任务 null f 63 65 t 初始化数据 2025-09-06 01:12:52.909017 2025-09-06 01:12:52.909018 +删除和清除任务 3 3 monitor:job:delete \N \N \N \N \N f t f 删除和清除任务 null f 63 66 t 初始化数据 2025-09-06 01:12:52.909018 2025-09-06 01:12:52.909018 +导出定时任务 3 4 monitor:job:export \N \N \N \N \N f t f 导出定时任务 null f 63 67 t 初始化数据 2025-09-06 01:12:52.909019 2025-09-06 01:12:52.909019 +在线用户 2 2 monitor:online:query el-icon-Headset MonitorOnline /monitor/online monitor/online/index \N f f f 在线用户 null f 62 68 t 初始化数据 2025-09-06 01:12:52.90902 2025-09-06 01:12:52.90902 +在线用户强制下线 3 1 monitor:online:delete \N \N \N \N \N f f f 在线用户强制下线 null f 68 69 t 初始化数据 2025-09-06 01:12:52.90902 2025-09-06 01:12:52.909021 +服务器监控 2 3 monitor:server:query el-icon-Odometer MonitorServer /monitor/server monitor/server/index \N f f f 服务器监控 null f 62 70 t 初始化数据 2025-09-06 01:12:52.909021 2025-09-06 01:12:52.909021 +缓存监控 2 4 monitor:cache:query el-icon-Stopwatch MonitorCache /monitor/cache monitor/cache/index \N f f f 缓存监控 null f 62 71 t 初始化数据 2025-09-06 01:12:52.909022 2025-09-06 01:12:52.909022 +清除缓存 3 1 monitor:cache:delete \N \N \N \N \N f f f 清除缓存 null f 71 72 t 初始化数据 2025-09-06 01:12:52.909022 2025-09-06 01:12:52.909023 +公共模块 1 4 \N document Common /common \N /common/docs f f f 公共模块 null f \N 73 t 初始化数据 2025-09-06 01:12:52.909023 2025-09-06 01:12:52.909023 +接口管理 4 1 common:docs:query api Docs /common/docs common/docs/index \N f f f 接口管理 null f 73 74 t 初始化数据 2025-09-06 01:12:52.909024 2025-09-06 01:12:52.909024 +文档管理 4 2 common:redoc:query el-icon-Document Redoc /common/redoc common/redoc/index \N f f f 文档管理 null f 73 75 t 初始化数据 2025-09-06 01:12:52.909025 2025-09-06 01:12:52.909025 +演示模块 1 5 \N el-icon-Document Demo /demo \N /demo/example f f f 演示模块 null f \N 76 t 初始化数据 2025-09-06 01:12:52.909025 2025-09-06 01:12:52.909026 +示例管理 2 1 demo:example:query el-icon-DataLine Example /demo/example demo/example/index \N f t f 示例管理 null f 76 77 t 初始化数据 2025-09-06 01:12:52.909026 2025-09-06 01:12:52.909026 +创建示例 3 1 demo:example:create \N \N \N \N \N f t f 创建示例 null f 77 78 t 初始化数据 2025-09-06 01:12:52.909027 2025-09-06 01:12:52.909027 +更新示例 3 2 demo:example:update \N \N \N \N \N f t f 更新示例 null f 77 79 t 初始化数据 2025-09-06 01:12:52.909027 2025-09-06 01:12:52.909028 +删除示例 3 3 demo:example:delete \N \N \N \N \N f t f 删除示例 null f 77 80 t 初始化数据 2025-09-06 01:12:52.909028 2025-09-06 01:12:52.909029 +批量修改示例状态 3 4 demo:example:patch \N \N \N \N \N f t f 批量修改示例状态 null f 77 81 t 初始化数据 2025-09-06 01:12:52.909029 2025-09-06 01:12:52.909029 +导出示例 3 5 demo:example:export \N \N \N \N \N f t f 导出示例 null f 77 82 t 初始化数据 2025-09-06 01:12:52.90903 2025-09-06 01:12:52.90903 +导入示例 3 6 demo:example:import \N \N \N \N \N f t f 导入示例 null f 77 83 t 初始化数据 2025-09-06 01:12:52.90903 2025-09-06 01:12:52.909031 +下载导入示例模版 3 7 demo:example:download \N \N \N \N \N f t f 下载导入示例模版 null f 77 84 t 初始化数据 2025-09-06 01:12:52.909031 2025-09-06 01:12:52.909031 +应用管理 1 6 \N captcha Application /application \N /application/myapp f f f 应用管理 null f \N 85 t 初始化数据 2025-09-06 01:12:52.909032 2025-09-06 01:12:52.909032 +我的应用 2 1 application:myapp:query el-icon-DataLine ApplicationSystem /application/myapp application/myapp/index \N f t f 应用系统管理 null f 85 86 t 初始化数据 2025-09-06 01:12:52.909033 2025-09-06 01:12:52.909033 +创建应用 3 1 application:myapp:create \N \N \N \N \N f t f 创建应用 null f 86 87 t 初始化数据 2025-09-06 01:12:52.909033 2025-09-06 01:12:52.909034 +修改应用 3 2 application:myapp:update \N \N \N \N \N f t f 修改应用 null f 86 88 t 初始化数据 2025-09-06 01:12:52.909034 2025-09-06 01:12:52.909034 +删除应用 3 3 application:myapp:delete \N \N \N \N \N f t f 删除应用 null f 86 89 t 初始化数据 2025-09-06 01:12:52.909035 2025-09-06 01:12:52.909035 +批量修改应用状态 3 4 application:myapp:patch \N \N \N \N \N f t f 批量修改应用状态 null f 86 90 t 初始化数据 2025-09-06 01:12:52.909036 2025-09-06 01:12:52.909036 +资源管理 1 7 \N document Resource /resource \N /resource/file f f f 资源管理 null f \N 91 t 初始化数据 2025-09-06 01:12:52.909036 2025-09-06 01:12:52.909037 +文件管理 2 1 resource:file:query el-icon-Files ResourceFile /resource/file resource/file/index \N f t f 文件管理 null f 91 92 t 初始化数据 2025-09-06 01:12:52.909037 2025-09-06 01:12:52.909037 +文件上传 3 1 resource:file:upload \N \N \N \N \N f t f 文件上传 null f 92 93 t 初始化数据 2025-09-06 01:12:52.909038 2025-09-06 01:12:52.909038 +文件下载 3 2 resource:file:download \N \N \N \N \N f t f 文件下载 null f 92 94 t 初始化数据 2025-09-06 01:12:52.909038 2025-09-06 01:12:52.909039 +文件删除 3 3 resource:file:delete \N \N \N \N \N f t f 文件删除 null f 92 95 t 初始化数据 2025-09-06 01:12:52.909039 2025-09-06 01:12:52.909039 +文件移动 3 4 resource:file:move \N \N \N \N \N f t f 文件移动 null f 92 96 t 初始化数据 2025-09-06 01:12:52.90904 2025-09-06 01:12:52.90904 +文件复制 3 5 resource:file:copy \N \N \N \N \N f t f 文件复制 null f 92 97 t 初始化数据 2025-09-06 01:12:52.909041 2025-09-06 01:12:52.909041 +文件重命名 3 6 resource:file:rename \N \N \N \N \N f t f 文件重命名 null f 92 98 t 初始化数据 2025-09-06 01:12:52.909041 2025-09-06 01:12:52.909042 +创建目录 3 7 resource:file:create_dir \N \N \N \N \N f t f 创建目录 null f 92 99 t 初始化数据 2025-09-06 01:12:52.909042 2025-09-06 01:12:52.909042 +文件搜索 3 8 resource:file:search \N \N \N \N \N f t f 文件搜索 null f 92 100 t 初始化数据 2025-09-06 01:12:52.909043 2025-09-06 01:12:52.909043 +导出文件列表 3 9 resource:file:export \N \N \N \N \N f t f 导出文件列表 null f 92 101 t 初始化数据 2025-09-06 01:12:52.909043 2025-09-06 01:12:52.909044 \. @@ -2381,10 +2381,10 @@ COPY public.system_menu (name, type, "order", permission, icon, route_name, rout -- COPY public.system_notice (notice_title, notice_type, notice_content, creator_id, id, status, description, created_at, updated_at) FROM stdin; -系统更新 1 2099年9月9日,晚上12:00,系统更新 1 1 t 系统更新 2025-09-05 00:49:41.683079 2025-09-05 00:49:41.68308 -系统维护 2 2099年9月9日,晚上12:00,系统维护 1 2 t 系统维护 2025-09-05 00:49:41.683081 2025-09-05 00:49:41.683081 -系统更新完成 1 2099年9月9日,晚上12:00,系统更新完成 1 3 f 系统更新完成 2025-09-05 00:49:41.683081 2025-09-05 00:49:41.683082 -系统维护完成 2 2099年9月9日,晚上12:00,系统维护完成 1 4 f 系统维护完成 2025-09-05 00:49:41.683082 2025-09-05 00:49:41.683083 +系统更新 1 2099年9月9日,晚上12:00,系统更新 1 1 t 系统更新 2025-09-06 01:12:52.923567 2025-09-06 01:12:52.923568 +系统维护 2 2099年9月9日,晚上12:00,系统维护 1 2 t 系统维护 2025-09-06 01:12:52.923569 2025-09-06 01:12:52.923569 +系统更新完成 1 2099年9月9日,晚上12:00,系统更新完成 1 3 f 系统更新完成 2025-09-06 01:12:52.92357 2025-09-06 01:12:52.92357 +系统维护完成 2 2099年9月9日,晚上12:00,系统维护完成 1 4 f 系统维护完成 2025-09-06 01:12:52.92357 2025-09-06 01:12:52.923571 \. @@ -2393,13 +2393,13 @@ COPY public.system_notice (notice_title, notice_type, notice_content, creator_id -- COPY public.system_position (name, "order", creator_id, id, status, description, created_at, updated_at) FROM stdin; -董事长岗 1 1 1 t 董事长岗位 2025-09-05 00:49:41.676741 2025-09-05 00:49:41.676742 -运营岗 2 1 2 t 运营岗位 2025-09-05 00:49:41.676743 2025-09-05 00:49:41.676744 -销售岗 3 1 3 t 销售岗 2025-09-05 00:49:41.676744 2025-09-05 00:49:41.676744 -人事行政岗 4 1 4 t 人事行政岗 2025-09-05 00:49:41.676745 2025-09-05 00:49:41.676745 -开发岗 5 1 5 t 开发岗 2025-09-05 00:49:41.676746 2025-09-05 00:49:41.676746 -测试岗 6 1 6 t 测试岗 2025-09-05 00:49:41.676746 2025-09-05 00:49:41.676747 -演示岗 7 1 7 t 演示岗 2025-09-05 00:49:41.676747 2025-09-05 00:49:41.676748 +董事长岗 1 1 1 t 董事长岗位 2025-09-06 01:12:52.917888 2025-09-06 01:12:52.917889 +运营岗 2 1 2 t 运营岗位 2025-09-06 01:12:52.917889 2025-09-06 01:12:52.91789 +销售岗 3 1 3 t 销售岗 2025-09-06 01:12:52.91789 2025-09-06 01:12:52.91789 +人事行政岗 4 1 4 t 人事行政岗 2025-09-06 01:12:52.917891 2025-09-06 01:12:52.917891 +开发岗 5 1 5 t 开发岗 2025-09-06 01:12:52.917892 2025-09-06 01:12:52.917892 +测试岗 6 1 6 t 测试岗 2025-09-06 01:12:52.917892 2025-09-06 01:12:52.917893 +演示岗 7 1 7 t 演示岗 2025-09-06 01:12:52.917893 2025-09-06 01:12:52.917893 \. @@ -2408,8 +2408,8 @@ COPY public.system_position (name, "order", creator_id, id, status, description, -- COPY public.system_role (name, code, "order", data_scope, creator_id, id, status, description, created_at, updated_at) FROM stdin; -管理员角色 \N 1 4 1 1 t 管理员 2025-09-05 00:49:41.674899 2025-09-05 00:49:41.6749 -普通角色 \N 2 1 1 2 t 普通角色 2025-09-05 00:49:41.674901 2025-09-05 00:49:41.674901 +管理员角色 \N 1 4 1 1 t 管理员 2025-09-06 01:12:52.916162 2025-09-06 01:12:52.916163 +普通角色 \N 2 1 1 2 t 普通角色 2025-09-06 01:12:52.916163 2025-09-06 01:12:52.916164 \. @@ -2519,6 +2519,17 @@ COPY public.system_role_menus (role_id, menu_id) FROM stdin; 1 88 1 89 1 90 +1 91 +1 92 +1 93 +1 94 +1 95 +1 96 +1 97 +1 98 +1 99 +1 100 +1 101 2 1 2 2 \. @@ -2551,9 +2562,9 @@ COPY public.system_user_roles (user_id, role_id) FROM stdin; -- COPY public.system_users (username, password, name, mobile, email, gender, avatar, is_superuser, last_login, dept_id, creator_id, id, status, description, created_at, updated_at) FROM stdin; -superadmin $2b$12$/Df5YczDGF41zCh2F8Xbu.yHTJXGm3tONgsXz1KLUdG0mtpKUOLD2 超级管理员 15382112620 948080782@qq.com 1 https://service.fastapiadmin.com/api/v1/static/image/avatar.png t \N 1 \N 1 t 超级管理员 2025-09-05 00:49:41.672459 2025-09-05 00:49:41.672461 -admin $2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa 管理员 15382112222 admin@qq.com 0 https://service.fastapiadmin.com/api/v1/static/image/avatar.png f \N 1 1 2 t 管理员 2025-09-05 00:49:41.672462 2025-09-05 00:49:41.672462 -demo $2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa 演示用户 15382112121 demo@qq.com 1 https://service.fastapiadmin.com/api/v1/static/image/avatar.png f \N 6 1 3 t 演示用户 2025-09-05 00:49:41.672463 2025-09-05 00:49:41.672463 +superadmin $2b$12$/Df5YczDGF41zCh2F8Xbu.yHTJXGm3tONgsXz1KLUdG0mtpKUOLD2 超级管理员 15382112620 948080782@qq.com 1 https://service.fastapiadmin.com/api/v1/static/image/avatar.png t \N 1 \N 1 t 超级管理员 2025-09-06 01:12:52.914211 2025-09-06 01:12:52.914212 +admin $2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa 管理员 15382112222 admin@qq.com 0 https://service.fastapiadmin.com/api/v1/static/image/avatar.png f \N 1 1 2 t 管理员 2025-09-06 01:12:52.914212 2025-09-06 01:12:52.914213 +demo $2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa 演示用户 15382112121 demo@qq.com 1 https://service.fastapiadmin.com/api/v1/static/image/avatar.png f \N 6 1 3 t 演示用户 2025-09-06 01:12:52.914213 2025-09-06 01:12:52.914213 \. From 01fd6c8ea4cea387b614b1a0523802093110128c Mon Sep 17 00:00:00 2001 From: zhangtao <9480807882@qq.com> Date: Mon, 8 Sep 2025 00:45:34 +0800 Subject: [PATCH 02/13] =?UTF-8?q?docs(backend):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=90=8E=E7=AB=AFREADME=E6=96=87=E6=A1=A3=EF=BC=8C=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E9=A1=B9=E7=9B=AE=E6=96=87=E6=A1=A3=E4=B8=8E=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E6=8C=87=E5=8D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 全面更新README,添加项目特性、架构设计与技术栈介绍 - 详细补充项目结构说明及模块设计规范 - 增加快速开始步骤,包括环境配置、数据库初始化和服务启动 - 补充主要API模块路径和认证授权使用示例 - 添加开发指南、数据库迁移与测试方法 - 集成监控、日志级别说明及性能监控内容 - 完善Docker、传统部署及Nginx配置示例 - 添加贡献指南和代码规范说明 - 新增MCP模块概述及智能对话API接口文档 - 清理和移除module_ai中旧的mcp_server相关实现代码 - 在api/v1初始化文件中注册AI模块路由 - 修改resource模块,增强资源路径安全检查和文件类型检测逻辑 - 增强资源搜索和上传服务的健壮性及安全性 --- backend/README.md | 435 ++- backend/app/api/v1/__init__.py | 9 + backend/app/api/v1/module_ai/__init__.py | 4 + backend/app/api/v1/module_ai/mcp/__init__.py | 6 + .../app/api/v1/module_ai/mcp/controller.py | 50 + backend/app/api/v1/module_ai/mcp/schema.py | 9 + backend/app/api/v1/module_ai/mcp/service.py | 16 + .../v1/module_ai/mcp_server/ai_websocket.py | 37 - .../api/v1/module_ai/mcp_server/mcp_client.py | 215 -- .../v1/module_ai/mcp_server/mcp_database.py | 0 .../api/v1/module_ai/mcp_server/mcp_server.py | 39 - .../api/v1/module_ai/mcp_server/tool_table.py | 30 - .../v1/module_ai/mcp_server/tool_weather.py | 72 - .../api/v1/module_resource/resource/schema.py | 10 + .../v1/module_resource/resource/service.py | 236 +- backend/app/config/setting.py | 8 + backend/app/core/ap_scheduler.py | 9 +- backend/app/core/database.py | 35 +- backend/app/plugin/init_app.py | 19 +- backend/app/scripts/data/system_menu.json | 65 +- .../app/scripts/data/system_role_menus.json | 12 + backend/app/utils/ai_util.py | 42 + backend/app/utils/ip_local_util.py | 2 +- backend/env/.env.dev | 5 + backend/env/.env.prod | 6 + backend/main.py | 3 + backend/requirements.txt | 5 +- .../fastapiadmin_2025-09-06_211640.sql | 3130 +++++++++++++++++ fastapp/.prettierrc.yaml | 15 +- fastapp/components.d.ts | 11 + fastapp/docs/theme-system-guide.md | 301 -- fastapp/docs/uniapp整合mini-router.md | 427 --- fastapp/eslint.config.mjs | 18 +- fastapp/package.json | 52 +- .../src/components/cu-date-query/index.vue | 15 +- fastapp/src/components/cu-picker/index.vue | 32 +- .../qiun-data-charts/qiun-data-charts.vue | 140 +- .../src/components/u-charts/config-echarts.js | 26 +- .../src/components/u-charts/config-ucharts.js | 73 +- fastapp/src/components/u-charts/u-charts.js | 2073 ++--------- fastapp/src/composables/useStomp.ts | 15 +- fastapp/src/composables/useTabbar.ts | 39 +- fastapp/src/layouts/default.vue | 47 +- fastapp/src/layouts/tabbar.vue | 37 +- fastapp/src/pages.json | 9 +- fastapp/src/pages/index/index.vue | 48 +- fastapp/src/pages/login/index.vue | 159 +- fastapp/src/pages/mine/about/index.vue | 124 +- fastapp/src/pages/mine/faq/index.vue | 646 ++-- fastapp/src/pages/mine/feedback/index.vue | 85 +- fastapp/src/pages/mine/index.vue | 170 +- fastapp/src/pages/mine/profile/index.vue | 189 +- .../src/pages/mine/settings/account/index.vue | 103 +- .../pages/mine/settings/agreement/index.vue | 57 +- .../src/pages/mine/settings/network/index.vue | 54 +- .../src/pages/mine/settings/privacy/index.vue | 57 +- .../src/pages/mine/settings/theme/index.vue | 370 +- fastapp/src/pages/work/index.vue | 434 +-- fastapp/src/router/index.ts | 18 +- fastapp/src/static/logo.png | Bin 3097206 -> 3409420 bytes fastapp/src/store/modules/user.store.ts | 9 +- fastapp/src/styles/index.scss | 474 +-- fastapp/src/types/auto-imports.d.ts | 10 + fastapp/theme.json | 26 - fastdocs/src/public/group.jpg | Bin 240644 -> 203614 bytes frontend/src/views/ai/mcp/index.vue | 13 + 66 files changed, 5692 insertions(+), 5193 deletions(-) create mode 100644 backend/app/api/v1/module_ai/mcp/__init__.py create mode 100644 backend/app/api/v1/module_ai/mcp/controller.py create mode 100644 backend/app/api/v1/module_ai/mcp/schema.py create mode 100644 backend/app/api/v1/module_ai/mcp/service.py delete mode 100644 backend/app/api/v1/module_ai/mcp_server/ai_websocket.py delete mode 100644 backend/app/api/v1/module_ai/mcp_server/mcp_client.py delete mode 100644 backend/app/api/v1/module_ai/mcp_server/mcp_database.py delete mode 100644 backend/app/api/v1/module_ai/mcp_server/mcp_server.py delete mode 100644 backend/app/api/v1/module_ai/mcp_server/tool_table.py delete mode 100644 backend/app/api/v1/module_ai/mcp_server/tool_weather.py create mode 100644 backend/app/utils/ai_util.py create mode 100644 backend/sql/postgresql/fastapiadmin_2025-09-06_211640.sql delete mode 100644 fastapp/docs/theme-system-guide.md delete mode 100644 fastapp/docs/uniapp整合mini-router.md delete mode 100644 fastapp/theme.json create mode 100644 frontend/src/views/ai/mcp/index.vue diff --git a/backend/README.md b/backend/README.md index 4660cea8..b4a88694 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,105 +1,396 @@ -# backend +# FastAPI Vue3 Admin - Backend -## 项目结构 +一个基于 FastAPI 的现代化后端管理系统,为前端 Vue3 管理系统提供完整的 API 服务支持。 -```sh -fastapi_project/backend -├─ app # 项目核心代码 -│ ├─ almbic # 数据库迁移文件 -│ ├─ api # 接口模块 -│ │ └─ v1 # 接口版本模块 -│ │ ├─ controllers # 控制器模块 -│ │ ├─ crud # 数据库操作模块 -│ │ ├─ models # orm模型模块 -│ │ ├─ params # 参数模块 -│ │ ├─ schemas # pydantic模型模块 -│ │ ├─ services # 业务模块 -│ │ └─ urls # 路由模块 -│ ├─ common # 公共模块 -│ ├─ config # 项目配置文件 -│ ├─ core # 项目核心模块 -│ ├─ module_task # 项目任务模块 -│ ├─ plugin # 项目插件模块 -│ ├─ scripts # 项目初始化模块 -│ └─ utils # 工具模块 -├─ env # 项目环境配置文件 -├─ logs # 项目日志文件 -├─ sql # 项目数据库文件 -├─ static # 项目静态文件 -├─ main.py # 项目启动文件 -├─ alembic.ini # alembic配置文件 -├─ requirements.txt # 项目依赖文件 -├─ mkdocs.yml # mkdocs配置文件 -├─ dev_sql.db # 项目数据库文件 -└─ README.md # 项目说明文档 +## 🚀 项目特性 +- **现代技术栈**: FastAPI + SQLAlchemy 2.0 + Pydantic 2.x +- **多数据库支持**: MySQL、PostgreSQL、SQLite +- **异步架构**: 支持高并发异步数据库操作 +- **权限管理**: 完整的 RBAC 权限控制体系 +- **任务调度**: 基于 APScheduler 的定时任务系统 +- **日志监控**: 完整的操作日志和系统监控 +- **代码生成**: 智能化代码生成工具 +- **AI 集成**: 支持 OpenAI 大模型调用 +- **云存储**: 支持阿里云 OSS 对象存储 + +## 🏗️ 系统架构 + +### 技术栈 + +| 技术 | 版本 | 说明 | +|------|------|------| +| FastAPI | 0.115.2 | 现代 Web 框架 | +| SQLAlchemy | 2.0.36 | ORM 框架 | +| Alembic | 1.15.1 | 数据库迁移工具 | +| Pydantic | 2.x | 数据验证与序列化 | +| APScheduler | 3.11.0 | 定时任务调度 | +| Redis | 5.2.1 | 缓存与会话存储 | +| Uvicorn | 0.30.6 | ASGI 服务器 | +| Python | 3.10+ | 运行环境 | + +### 架构设计 + +```txt +📦 分层架构 (MVC) +├── 🎯 Controller # 控制器层 - 处理HTTP请求 +├── 🏢 Service # 业务层 - 核心业务逻辑 +├── 💾 CRUD # 数据访问层 - 数据库操作 +└── 📊 Model # 模型层 - 数据模型定义 ``` -## 快速开始 +## 📁 项目结构 + +```txt +fastapi_vue3_admin/backend/ +├── 📁 app/ # 项目核心代码 +│ ├── 💾 alembic/ # 数据库迁移管理 +│ ├── 🌐 api/ # API 接口模块 +│ │ └── v1/ # API v1 版本 +│ │ ├── module_system/ # 系统管理模块 +│ │ ├── module_monitor/ # 系统监控模块 +│ │ ├── module_ai/ # AI 功能模块 +│ │ └── module_*/ # 其他业务模块 +│ ├── 📄 common/ # 公共组件(常量、枚举、响应封装) +│ ├── ⚙️ config/ # 项目配置文件 +│ ├── 💖 core/ # 核心模块(数据库、中间件、安全) +│ ├── ⏰ module_task/ # 定时任务模块 +│ ├── 🔌 plugin/ # 插件模块 +│ ├── 📜 scripts/ # 初始化脚本和数据 +│ └── 🛠️ utils/ # 工具类(验证码、文件上传等) +├── 🌍 env/ # 环境配置文件 +├── 📄 logs/ # 日志输出目录 +├── 📊 sql/ # SQL 初始化脚本 +├── 📷 static/ # 静态资源文件 +├── 🚀 main.py # 项目启动入口 +├── 📄 alembic.ini # Alembic 迁移配置 +├── 📎 requirements.txt # Python 依赖包 +└── 📝 README.md # 项目说明文档 +``` + +### 模块设计 + +每个业务模块采用统一的分层结构: + +```txt +module_*/ +├── controller.py # 控制器 - HTTP 请求处理 +├── service.py # 服务层 - 业务逻辑处理 +├── crud.py # 数据层 - 数据库操作 +├── model.py # ORM 模型 - 数据库表定义 +├── schema.py # Pydantic 模型 - 数据验证 +└── param.py # 参数模型 - 请求参数 +``` + +## 🚀 快速开始 + +### 环境要求 + +- **Python**: 3.10+ +- **数据库**: MySQL 8.0+ / PostgreSQL 13+ / SQLite 3.x +- **Redis**: 6.0+ (可选) + +### 安装与运行 + +#### 1. 项目初始化 + +```bash +# 克隆项目 +git clone +cd fastapi_vue3_admin/backend + +# 创建虚拟环境(推荐) +python3 -m venv venv +source venv/bin/activate # Windows: venv\Scripts\activate -```sh -# 进入后端工程目录 -cd backend # 安装依赖 pip3 install -r requirements.txt -# 启动后端服务 -python3 main.py run -或 -python3 main.py run--env=dev -# 生成迁移文件 -python3 main.py revision "初始化迁移" --env=dev(不加默认为dev) -# 应用迁移 -python3 main.py upgrade --env=dev(不加默认为dev) ``` -## Markdown转静态网站(mkdocs-material使用)介绍 +#### 2. 环境配置 -- 名称:mkdocs-material -- 官网: -- 完整文档信息清访问 [mkdocs官网](https://www.mkdocs.org). +复制并编辑环境配置文件: -## 工具安装 - -```sh -pip install mkdocs-material +```bash +cp env/dev.env.example env/dev.env +# 编辑 env/dev.env 文件,配置数据库连接和其他参数 ``` -## 工具使用 +主要配置项: -### 创建项目 +- `DATABASE_URL`: 数据库连接地址 +- `SECRET_KEY`: JWT 加密密钥 +- `REDIS_URL`: Redis 连接地址(可选) -```sh -mkdocs new 项目名称 +#### 3. 数据库初始化 + +```bash +# 生成迁移文件(仅首次或模型变更时) +python3 main.py revision "初始化迁移" --env=dev + +# 应用数据库迁移 +python3 main.py upgrade --env=dev + +# 初始化数据(可选,系统会自动初始化) +python3 main.py init-data --env=dev ``` -### 编辑构建文档 +#### 4. 启动服务 -```yaml -theme: - name: material +```bash +# 开发环境启动 +python3 main.py run --env=dev + +# 生产环境启动 +python3 main.py run --env=prod + +# 或使用 uvicorn 直接启动 +uvicorn main:app --host 0.0.0.0 --port 8000 --reload ``` -### 启动服务 +服务成功启动后,您可以访问: -```sh -mkdocs serve +- **API 文档**: [http://localhost:8000/docs](http://localhost:8000/docs) (Swagger UI) +- **替代文档**: [http://localhost:8000/redoc](http://localhost:8000/redoc) (ReDoc) +- **健康检查**: [http://localhost:8000/health](http://localhost:8000/health) + +## 📚 API 文档 + +### 主要接口模块 + +| 模块 | 路径 | 说明 | +|------|------|------| +| 用户管理 | `/api/v1/system/user` | 用户增删改查、角色分配 | +| 角色管理 | `/api/v1/system/role` | 角色管理、权限分配 | +| 菜单管理 | `/api/v1/system/menu` | 系统菜单、权限节点 | +| 部门管理 | `/api/v1/system/dept` | 组织架构管理 | +| 岗位管理 | `/api/v1/system/position` | 岗位信息管理 | +| 系统监控 | `/api/v1/monitor/*` | 系统性能、日志监控 | +| 任务调度 | `/api/v1/monitor/job` | 定时任务管理 | +| 文件管理 | `/api/v1/common/file` | 文件上传下载 | +| 代码生成 | `/api/v1/generator/*` | 代码生成工具 | + +### 认证授权 + +系统使用 JWT Bearer Token 进行身份验证: + +```bash +# 登录获取 Token +curl -X POST "http://localhost:8000/api/v1/auth/login" \ + -H "Content-Type: application/json" \ + -d '{"username": "admin", "password": "123456"}' + +# 使用 Token 访问受保护的资源 +curl -X GET "http://localhost:8000/api/v1/system/user/list" \ + -H "Authorization: Bearer YOUR_TOKEN_HERE" ``` -### 构建静态站点 +## 🛠️ 开发指南 -```sh -mkdocs build +### 项目配置 + +主要配置文件位于 `app/config/setting.py`,支持通过环境变量进行覆盖。 + +### 数据库迁移 + +```bash +# 查看当前迁移状态 +python3 main.py current --env=dev + +# 查看迁移历史 +python3 main.py history --env=dev + +# 回滚到上一个版本 +python3 main.py downgrade -1 --env=dev ``` -### 获取帮助 +### 添加新模块 -```sh -mkdocs -h +1. 在 `app/api/v1/` 下创建新的模块目录 +2. 按照现有模块结构创建文件: + - `model.py` - SQLAlchemy ORM 模型 + - `schema.py` - Pydantic 数据模型 + - `crud.py` - 数据库操作层 + - `service.py` - 业务逻辑层 + - `controller.py` - API 控制器 + - `param.py` - 请求参数模型 +3. 在主路由中注册新模块 + +### 测试 + +```bash +# 运行单元测试 +pytest tests/ + +# 运行指定测试文件 +pytest tests/test_user.py -v + +# 生成测试覆盖率报告 +pytest --cov=app tests/ ``` -### 生成所有依赖 +## 📊 监控与日志 -```sh -pip freeze > requirements.txt +### 日志级别 + +- **DEBUG**: 详细的调试信息 +- **INFO**: 一般信息(默认级别) +- **WARNING**: 警告信息 +- **ERROR**: 错误信息 +- **CRITICAL**: 严重错误 + +### 性能监控 + +系统内置了完整的性能监控功能: + +- API 响应时间监控 +- 数据库连接池监控 +- 内存与 CPU 使用率监控 +- 自定义业务指标监控 + +## 🚀 部署指南 + +### Docker 部署 + +```bash +# 构建镜像 +docker build -t fastapi-admin . + +# 运行容器 +docker run -d \ + --name fastapi-admin \ + -p 8000:8000 \ + -e DATABASE_URL="postgresql://user:pass@host:5432/db" \ + fastapi-admin ``` +### 传统部署 + +```bash +# 使用 Gunicorn 作为 WSGI 服务器 +gunicorn main:app \ + --workers 4 \ + --worker-class uvicorn.workers.UvicornWorker \ + --bind 0.0.0.0:8000 \ + --access-logfile - \ + --error-logfile - +``` + +### Nginx 配置 + +```nginx +server { + listen 80; + server_name your-domain.com; + + location / { + proxy_pass http://127.0.0.1:8000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} +``` + +## 🤝 贡献指南 + +欢迎提交 Issue 和 Pull Request! + +### 开发流程 + +1. Fork 项目 +2. 创建特性分支 (`git checkout -b feature/amazing-feature`) +3. 提交更改 (`git commit -m 'Add some amazing feature'`) +4. 推送到分支 (`git push origin feature/amazing-feature`) +5. 发起 Pull Request + +### 代码规范 + +- 遵循 PEP 8 Python 编码规范 +- 使用类型注解 (Type Hints) +- 编写单元测试 +- 添加必要的注释和文档 + +## 📝 更新日志 + +### v1.0.0 (2024-09-06) + +- ✨ 初始版本发布 +- ✨ 完整的用户权限管理系统 +- ✨ 支持多数据库类型 +- ✨ 定时任务调度功能 +- ✨ 代码生成工具 +- ✨ AI 集成功能 + +## 📜 相关链接 + +- **FastAPI 官方文档**: [https://fastapi.tiangolo.com/](https://fastapi.tiangolo.com/) +- **SQLAlchemy 文档**: [https://docs.sqlalchemy.org/](https://docs.sqlalchemy.org/) +- **Pydantic 文档**: [https://pydantic-docs.helpmanual.io/](https://pydantic-docs.helpmanual.io/) + +## 💬 支持与反馈 + +如果您在使用过程中遇到问题或有任何建议,请通过以下方式联系我们: + +- 🐛 **Bug 报告**: 请在 GitHub Issues 中提交 +- 💡 **功能建议**: 请在 GitHub Discussions 中讨论 +- 💬 **技术交流**: 欢迎参与项目讨论 + +--- + +❤️ **感谢您的关注和支持!** 如果这个项目对您有帮助,请给我们一个 ⭐️ Star! + + +# MCP 模块 + +## 概述 + +MCP (Model Context Protocol) 模块为系统提供与AI模型交互的能力,基于FastAPI-MCP实现。 + +## 功能特性 + +- 智能对话接口 +- 流式和非流式响应支持 +- WebSocket聊天支持 +- MCP服务器状态监控 + +## API接口 + +### 智能对话 + +``` +POST /api/v1/mcp/chat +``` + +请求参数: +- `message` (string, required): 聊天消息 +- `stream` (boolean, optional): 是否流式返回,默认为false + +### 获取服务器状态 + +``` +GET /api/v1/mcp/status +``` + +### WebSocket聊天 + +``` +GET /api/v1/mcp/ws/chat +``` + +## MCP集成 + +系统已集成FastAPI-MCP,可通过以下URL访问MCP服务器: + +``` +http://localhost:8000/mcp +``` + +## 配置 + +在系统配置中设置以下参数: + +- `QWEN_API_KEY`: Qwen API密钥 +- `QWEN_BASE_URL`: Qwen API基础URL +- `QWEN_MODEL`: Qwen模型名称 \ No newline at end of file diff --git a/backend/app/api/v1/__init__.py b/backend/app/api/v1/__init__.py index 5c297f6c..3ba9f25e 100644 --- a/backend/app/api/v1/__init__.py +++ b/backend/app/api/v1/__init__.py @@ -26,6 +26,8 @@ from .module_example.demo.controller import DemoRouter from .module_application.myapp.controller import MyAppRouter +from .module_ai.mcp.controller import MCPRouter + from .module_resource.resource.controller import ResourceRouter @@ -58,6 +60,8 @@ EXAMPLE_MODULES = [{"router": DemoRouter}] APPLICATION_MODULES = [{"router": MyAppRouter}] +AI_MODULES = [{"router": MCPRouter}] + router = APIRouter() for module in SYSTEM_MODULES: @@ -88,4 +92,9 @@ for module in APPLICATION_MODULES: for module in RESOURCE_MODULES: router.include_router( router=module["router"], prefix="/resource" + ) + +for module in AI_MODULES: + router.include_router( + router=module["router"], prefix="/ai" ) \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/__init__.py b/backend/app/api/v1/module_ai/__init__.py index e69de29b..f35e66c2 100644 --- a/backend/app/api/v1/module_ai/__init__.py +++ b/backend/app/api/v1/module_ai/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +""" +AI模块初始化文件 +""" diff --git a/backend/app/api/v1/module_ai/mcp/__init__.py b/backend/app/api/v1/module_ai/mcp/__init__.py new file mode 100644 index 00000000..772e858a --- /dev/null +++ b/backend/app/api/v1/module_ai/mcp/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +""" +AI模块初始化文件 +""" + +from .controller import MCPRouter \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/mcp/controller.py b/backend/app/api/v1/module_ai/mcp/controller.py new file mode 100644 index 00000000..7116744a --- /dev/null +++ b/backend/app/api/v1/module_ai/mcp/controller.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- + +from fastapi import APIRouter, Depends, WebSocket +from fastapi.responses import JSONResponse, StreamingResponse + +from app.common.response import StreamResponse, SuccessResponse +from app.core.dependencies import AuthPermission +from app.core.router_class import OperationLogRoute +from app.core.logger import logger +from app.api.v1.module_system.auth.schema import AuthSchema +from .service import MCPService +from .schema import ChatQuerySchema + + +MCPRouter = APIRouter(route_class=OperationLogRoute, prefix="/mcp", tags=["MCP智能助手"]) + + +@MCPRouter.post("/chat", summary="智能对话", description="与MCP智能助手进行对话") +async def chat_controller( + query: ChatQuerySchema, + auth: AuthSchema = Depends(AuthPermission(permissions=["ai:mcp:chat"])) +) -> StreamingResponse: + """智能对话接口""" + logger.info(f"用户 {auth.user.name} 发起智能对话: {query.message[:50]}...") + + async def generate_response(): + async for chunk in MCPService.chat_query(query.message): + yield chunk + + return StreamingResponse(generate_response(), media_type="text/plain") + + +@MCPRouter.websocket("/ws/chat", name="WebSocket聊天") +async def websocket_chat_controller( + websocket: WebSocket, +): + """WebSocket聊天接口 + + ws://127.0.0.1:8001/api/v1/ai/mcp/ws/chat + """ + await websocket.accept() + try: + while True: + data = await websocket.receive_text() + # 流式发送响应 + async for chunk in MCPService.chat_query(data): + await websocket.send_text(chunk) + except Exception as e: + logger.error(f"WebSocket聊天出错: {str(e)}") + await websocket.close() diff --git a/backend/app/api/v1/module_ai/mcp/schema.py b/backend/app/api/v1/module_ai/mcp/schema.py new file mode 100644 index 00000000..4e7627b5 --- /dev/null +++ b/backend/app/api/v1/module_ai/mcp/schema.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from pydantic import BaseModel, Field +from typing import Optional + + +class ChatQuerySchema(BaseModel): + """聊天查询模型""" + message: str = Field(..., min_length=1, max_length=4000, description="聊天消息") \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/mcp/service.py b/backend/app/api/v1/module_ai/mcp/service.py new file mode 100644 index 00000000..b5db23ee --- /dev/null +++ b/backend/app/api/v1/module_ai/mcp/service.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- + +from app.utils.ai_util import AIClient + + +class MCPService: + """MCP服务层 - 适配FastAPI-MCP""" + + @classmethod + async def chat_query(cls, message: str): + """处理聊天查询""" + # 创建MCP客户端实例 + mcp_client = AIClient() + # 处理消息 + async for response in mcp_client.process(message): + yield response \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/mcp_server/ai_websocket.py b/backend/app/api/v1/module_ai/mcp_server/ai_websocket.py deleted file mode 100644 index f12446dc..00000000 --- a/backend/app/api/v1/module_ai/mcp_server/ai_websocket.py +++ /dev/null @@ -1,37 +0,0 @@ -from fastapi import FastAPI -from starlette.websockets import WebSocket, WebSocketDisconnect - -from mcp_server.mcp_client import MCPClient - - -async def init_ai_websocket(app: FastAPI): - - @app.websocket("/ws/chat") - async def websocket_endpoint(websocket: WebSocket): - await websocket.accept() - user_id = id(websocket) - user_contexts = {} - user_contexts[user_id] = [{"role": "system", "content": "你是一个有帮助的助手。"}] - - client = MCPClient() - await client.connect_to_server('mcp_server/mcp_server.py') - try: - while True: - user_msg = await websocket.receive_text() - user_contexts[user_id].append({"role": "user", "content": user_msg}) - await websocket.send_json({"role": "user", "content": user_msg}) - - assistant_reply = "" - response = client.put_query(user_msg) - await websocket.send_json({"start": True}) - async for content_piece in response: - assistant_reply += content_piece - await websocket.send_json({"role": "assistant", "content": content_piece}) - - await websocket.send_json({"done": True}) - - except WebSocketDisconnect: - print("WebSocket 断开连接") - # 清理上下文 - user_contexts.pop(user_id, None) - await client.cleanup() \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/mcp_server/mcp_client.py b/backend/app/api/v1/module_ai/mcp_server/mcp_client.py deleted file mode 100644 index 930dcda8..00000000 --- a/backend/app/api/v1/module_ai/mcp_server/mcp_client.py +++ /dev/null @@ -1,215 +0,0 @@ -import argparse -import asyncio -import os -import json -from typing import Optional -from contextlib import AsyncExitStack - -from click import argument -from openai import AsyncOpenAI -from dotenv import load_dotenv -from mcp import ClientSession, StdioServerParameters -from mcp.client.stdio import stdio_client - - - - -class MCPClient: - def __init__(self): - """初始化 MCP 客户端""" - self.exit_stack = AsyncExitStack() - self.openai_api_key = os.getenv("OPENAI_API_KEY") # 读取 OpenAI API Key - self.base_url = os.getenv("OPENAI_API_URL") # 读取 BASE YRL - self.model = os.getenv("OPENAI_API_MODEL") # 读取 model - if not self.openai_api_key: - raise ValueError("❌ 未找到 OpenAI API Key,请在 .env 文件中设置 OPENAI_API_KEY") - self.client = AsyncOpenAI(api_key=self.openai_api_key, base_url=self.base_url) # 创建OpenAI client - self.session: Optional[ClientSession] = None - self.exit_stack = AsyncExitStack() - self.messages = [] - - async def connect_to_server(self, server_script_path: str): - """连接到 MCP 服务器并列出可用工具""" - is_python = server_script_path.endswith('.py') - is_js = server_script_path.endswith('.js') - if not (is_python or is_js): - raise ValueError("服务器脚本必须是 .py 或 .js 文件") - - # 必须设置项目根目录,否则无法获取到其他引用代码文件 - project_root = os.path.abspath(os.getcwd()) - python_cmd_path = os.getenv("PYTHON_PATH") - command = python_cmd_path if is_python else "node" - - parser = argparse.ArgumentParser(description='命令行参数') - parser.add_argument('--env', type=str, default='', help='运行环境') - args, unknown = parser.parse_known_args() - - server_params = StdioServerParameters( - command=command, - args=[server_script_path, f'--env={args.env}'], - env={"PYTHONPATH": project_root} - ) - - # 启动 MCP 服务器并建立通信 - stdio_transport = await self.exit_stack.enter_async_context(stdio_client(server_params)) - self.stdio, self.write = stdio_transport - self.session = await self.exit_stack.enter_async_context(ClientSession(self.stdio, self.write)) - - await self.session.initialize() - - # 列出 MCP 服务器上的工具 - response = await self.session.list_tools() - tools = response.tools - print("\n已连接到服务器,支持以下工具:", [tool.name for tool in tools]) - - - - async def process_query(self, query: str): - """ - 使用大模型处理查询并调用可用的 MCP 工具 (Function Calling) - """ - self.messages.append({"role": "user", "content": query}) - - response = await self.session.list_tools() - - available_tools = [{ - "type": "function", - "function": { - "name": tool.name, - "description": tool.description, - "input_schema": tool.inputSchema - } - } for tool in response.tools] - # print(available_tools) - - response = await self.client.chat.completions.create( - model=self.model, - messages=self.messages, - stream=True, - tools=available_tools - ) - is_tool_call = False - tool_name = None - tool_args = '' - tool_call_id = None - content = '' - yield f'🤖AI:' - async for chunk in response: - print(chunk) - if chunk.choices and chunk.choices[0].delta.tool_calls: - #调用工具 - tool_call = chunk.choices[0].delta.tool_calls[0] - if tool_call.id: - is_tool_call = True - tool_name = tool_call.function.name - tool_call_id = tool_call.id - yield f'开始调用工具【{tool_call.function.name}】,参数为' - if tool_call.function: - tool_args += tool_call.function.arguments - print(f'tool_args==={tool_args}') - yield tool_call.function.arguments - elif tool_call.function: - tool_args += tool_call.function.arguments - print(f'tool_args==={tool_args}') - yield tool_call.function.arguments - elif chunk.choices and chunk.choices[0].delta.content: - # 大模型解答 - content += chunk.choices[0].delta.content - yield chunk.choices[0].delta.content - elif chunk.choices and chunk.choices[0].finish_reason == 'tool_calls': - # 参数处理完毕 - pass - elif chunk.choices and chunk.choices[0].finish_reason == 'stop': - self.messages.append({ - "role": "assistant", - "content": content - }) - pass - # 处理返回的内容 - if is_tool_call: - # 如何是需要使用工具,就解析工具 - # 执行工具 - print(f"\n\n[Calling tool {tool_name} with args {tool_args}]\n\n") - result = await self.session.call_tool(tool_name, json.loads(tool_args)) - print(result) - # 将模型返回的调用哪个工具数据和工具执行完成后的数据都存入messages中 - self.messages.append({ - "role": "assistant", - "content": "", - "index": 0, - "tool_calls": [{ - "id": tool_call_id, - "type": "function", - "function": { - "name": tool_name, - "arguments": tool_args - } - }] - }) - self.messages.append({ - "role": "tool", - "content": result.content[0].text, - "tool_call_id": tool_call_id, - }) - - # 将上面的结果再返回给大模型用于生产最终的结果 - result_response = await self.client.chat.completions.create( - model=self.model, - messages=self.messages, - stream=True, - ) - result_content = '' - async for chunk in result_response: - if chunk.choices and chunk.choices[0].delta.content: - result_content += chunk.choices[0].delta.content - yield chunk.choices[0].delta.content - self.messages.append({ - "role": "assistant", - 'content': result_content, - }) - return - - async def put_query(self, query: str): - print(f"\n🤖 OpenAI: ", end="", flush=True) - response = self.process_query(query) # 发送用户输入到 OpenAI API - async for value in response: - print(value, end="", flush=True) - yield value - - async def chat_loop(self): - """运行交互式聊天循环""" - print("\n🤖 MCP 客户端已启动!输入 'quit' 退出") - - while True: - try: - query = input("\n你: ").strip() - if query.lower() == 'quit': - break - - - print(f"\n🤖 OpenAI: ", end="", flush=True) - response = self.process_query(query) # 发送用户输入到 OpenAI API - async for value in response: - print(value, end="", flush=True) - - except Exception as e: - print(f"\n⚠️ 发生错误: {str(e)}") - - async def cleanup(self): - """清理资源""" - await self.exit_stack.aclose() - - -async def main(server_script_path: str): - - client = MCPClient() - try: - await client.connect_to_server(server_script_path) - await client.chat_loop() - finally: - await client.cleanup() - - -if __name__ == "__main__": - - asyncio.run(main('mcp_server.py')) \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/mcp_server/mcp_database.py b/backend/app/api/v1/module_ai/mcp_server/mcp_database.py deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/app/api/v1/module_ai/mcp_server/mcp_server.py b/backend/app/api/v1/module_ai/mcp_server/mcp_server.py deleted file mode 100644 index 5fb434f9..00000000 --- a/backend/app/api/v1/module_ai/mcp_server/mcp_server.py +++ /dev/null @@ -1,39 +0,0 @@ - -from typing import Literal - -from mcp.server.fastmcp import FastMCP - -from tool_table import TableTool -from tool_weather import WeatherTool - -# 初始化 MCP 服务器 -mcp = FastMCP("FluxMcpServer") - - -@mcp.tool() -async def query_weather(city: str) -> str: - """ - 输入指定城市的英文名称,返回今日天气查询结果。 - :param city: 城市名称(需使用英文) - :return: 格式化后的天气信息 - """ - data = await WeatherTool.fetch_weather(city) - return WeatherTool.format_weather(data) - -@mcp.tool() -async def query_table(table_name: Literal["car_driver", "student_info"]) -> str: - """ - 输入指定表名,获取表内的数据。 - Args: - table_name: 表名选项: - - car_driver: 司机信息 - - student_info: 学生信息表 - return: 数据表内容 - """ - data = await TableTool.fetch_table_data(table_name) - return data - - -if __name__ == "__main__": - # 以标准 I/O 方式运行 MCP 服务器 - mcp.run(transport='stdio') \ No newline at end of file diff --git a/backend/app/api/v1/module_ai/mcp_server/tool_table.py b/backend/app/api/v1/module_ai/mcp_server/tool_table.py deleted file mode 100644 index 8171c240..00000000 --- a/backend/app/api/v1/module_ai/mcp_server/tool_table.py +++ /dev/null @@ -1,30 +0,0 @@ -import json - -from fastapi.encoders import jsonable_encoder -from sqlalchemy import select -from config.database import Base -from config.get_db import get_db -import logging - -from module_admin.entity.do.car_driver_do import CarDriver -from module_admin.entity.do.student_info_do import StudentInfo - -class TableTool: - - logger = logging.getLogger(__name__) - # 因为mcp服务是在另外进程里面,需要导入模型,否则Base.registry.mappers是空的 - support_modules = [CarDriver, StudentInfo] - - @classmethod - async def fetch_table_data(cls, table_name: str) -> str: - async for query_db in get_db(): - for mapper in Base.registry.mappers: - table_cls = mapper.class_ - if hasattr(table_cls, '__tablename__') and table_cls.__tablename__ == table_name: - result = await query_db.execute(select(table_cls)) - data = result.scalars().all() - json_str = json.dumps(jsonable_encoder(data), ensure_ascii=False) - return json_str - raise ValueError(f"No model found for table name: {table_name},to check if you have imported it") - - diff --git a/backend/app/api/v1/module_ai/mcp_server/tool_weather.py b/backend/app/api/v1/module_ai/mcp_server/tool_weather.py deleted file mode 100644 index 7e9acbe5..00000000 --- a/backend/app/api/v1/module_ai/mcp_server/tool_weather.py +++ /dev/null @@ -1,72 +0,0 @@ -import json -from typing import Any - -import httpx - - -class WeatherTool: - # OpenWeather API 配置 - OPENWEATHER_API_BASE = "https://api.openweathermap.org/data/2.5/weather" - API_KEY = "146d600baa0f4f7a7687bdb573fb9138" # 请替换为你自己的 OpenWeather API Key - USER_AGENT = "weather-app/1.0" - - @classmethod - async def fetch_weather(cls, city: str) -> dict[str, Any] | None: - """ - 从 OpenWeather API 获取天气信息。 - :param city: 城市名称(需使用英文,如 Beijing) - :return: 天气数据字典;若出错返回包含 error 信息的字典 - """ - params = { - "q": city, - "appid": cls.API_KEY, - "units": "metric", - "lang": "zh_cn" - } - headers = {"User-Agent": cls.USER_AGENT} - - async with httpx.AsyncClient() as client: - try: - response = await client.get(cls.OPENWEATHER_API_BASE, params=params, headers=headers, timeout=30.0) - response.raise_for_status() - return response.json() # 返回字典类型 - except httpx.HTTPStatusError as e: - return {"error": f"HTTP 错误: {e.response.status_code}"} - except Exception as e: - return {"error": f"请求失败: {str(e)}"} - - @classmethod - def format_weather(cls, data: dict[str, Any] | str) -> str: - """ - 将天气数据格式化为易读文本。 - :param data: 天气数据(可以是字典或 JSON 字符串) - :return: 格式化后的天气信息字符串 - """ - # 如果传入的是字符串,则先转换为字典 - if isinstance(data, str): - try: - data = json.loads(data) - except Exception as e: - return f"无法解析天气数据: {e}" - - # 如果数据中包含错误信息,直接返回错误提示 - if "error" in data: - return f"⚠️ {data['error']}" - - # 提取数据时做容错处理 - city = data.get("name", "未知") - country = data.get("sys", {}).get("country", "未知") - temp = data.get("main", {}).get("temp", "N/A") - humidity = data.get("main", {}).get("humidity", "N/A") - wind_speed = data.get("wind", {}).get("speed", "N/A") - # weather 可能为空列表,因此用 [0] 前先提供默认字典 - weather_list = data.get("weather", [{}]) - description = weather_list[0].get("description", "未知") - - return ( - f"🌍 {city}, {country}\n" - f"🌡 温度: {temp}°C\n" - f"💧 湿度: {humidity}%\n" - f"🌬 风速: {wind_speed} m/s\n" - f"🌤 天气: {description}\n" - ) diff --git a/backend/app/api/v1/module_resource/resource/schema.py b/backend/app/api/v1/module_resource/resource/schema.py index 3d153ad9..4fddc52c 100644 --- a/backend/app/api/v1/module_resource/resource/schema.py +++ b/backend/app/api/v1/module_resource/resource/schema.py @@ -19,6 +19,8 @@ class ResourceType(Enum): class ResourceItemSchema(BaseModel): """资源项目模型""" + model_config = ConfigDict(from_attributes=True, use_enum_values=True) + name: str = Field(..., description="文件名") path: str = Field(..., description="文件路径") relative_path: str = Field(..., description="相对路径") @@ -37,6 +39,8 @@ class ResourceItemSchema(BaseModel): class ResourceDirectorySchema(BaseModel): """资源目录模型""" + model_config = ConfigDict(from_attributes=True, use_enum_values=True) + path: str = Field(..., description="目录路径") name: str = Field(..., description="目录名称") items: List[ResourceItemSchema] = Field(default_factory=list, description="目录项") @@ -47,6 +51,8 @@ class ResourceDirectorySchema(BaseModel): class ResourceStatsSchema(BaseModel): """资源统计模型""" + model_config = ConfigDict(from_attributes=True, use_enum_values=True) + mount_point: str = Field(..., description="挂载点") total_files: int = Field(0, description="文件总数") total_dirs: int = Field(0, description="目录总数") @@ -60,6 +66,8 @@ class ResourceStatsSchema(BaseModel): class ResourceSearchSchema(BaseModel): """资源搜索模型""" + model_config = ConfigDict(from_attributes=True, use_enum_values=True) + keyword: Optional[str] = Field(None, description="关键词") file_type: Optional[str] = Field(None, description="文件类型") resource_type: Optional[ResourceType] = Field(None, description="资源类型") @@ -74,6 +82,8 @@ class ResourceSearchSchema(BaseModel): class ResourceUploadSchema(BaseModel): """资源上传响应模型""" + model_config = ConfigDict(from_attributes=True, use_enum_values=True) + filename: str = Field(..., description="文件名") file_path: str = Field(..., description="文件路径") file_url: str = Field(..., description="访问URL") diff --git a/backend/app/api/v1/module_resource/resource/service.py b/backend/app/api/v1/module_resource/resource/service.py index c47020b6..780052b4 100644 --- a/backend/app/api/v1/module_resource/resource/service.py +++ b/backend/app/api/v1/module_resource/resource/service.py @@ -10,6 +10,8 @@ from pathlib import Path from fastapi import UploadFile from PIL import Image + +# 尝试导入 magic 库,如果失败则标记为不可用 try: import magic MAGIC_AVAILABLE = True @@ -18,6 +20,10 @@ except ImportError: from app.core.exceptions import CustomException from app.core.logger import logger + +# 如果 magic 不可用,记录日志 +if not MAGIC_AVAILABLE: + logger.info("没有找到 python-magic 库,将使用基于扩展名的文件类型检测") from app.utils.excel_util import ExcelUtil from app.config.setting import settings from ...module_system.auth.schema import AuthSchema @@ -38,32 +44,48 @@ from .schema import ( class ResourceService: """ - 资源管理模块服务层 - 直接操作文件系统 + 资源管理模块服务层 - 管理系统静态文件目录 """ - # 默认挂载点配置 - DEFAULT_MOUNT_POINT = getattr(settings, 'RESOURCE_MOUNT_POINT', '/Users/tao/workspace/fastapi_vue3_admin/backend/static/upload') - ALLOWED_MOUNT_POINTS = getattr(settings, 'ALLOWED_MOUNT_POINTS', ['/Users/tao/workspace/fastapi_vue3_admin/backend/static', '/Users/tao/workspace/fastapi_vue3_admin/backend/static/upload']) + # 配置常量 + MAX_UPLOAD_SIZE = 100 * 1024 * 1024 # 100MB + MAX_SEARCH_RESULTS = 1000 # 最大搜索结果数 + MAX_PATH_DEPTH = 20 # 最大路径深度 @classmethod - def _get_safe_path(cls, path: str) -> str: + def _get_resource_root(cls) -> str: + """获取资源管理根目录""" + if not settings.STATIC_ENABLE: + raise CustomException(msg='静态文件服务未启用') + return str(settings.STATIC_ROOT) + + @classmethod + def _get_safe_path(cls, path: str = None) -> str: """获取安全的文件路径""" - if not path: - return cls.DEFAULT_MOUNT_POINT - - # 规范化路径 - safe_path = os.path.normpath(os.path.abspath(path)) + resource_root = cls._get_resource_root() - # 检查路径是否在允许的挂载点内 - allowed = False - for mount_point in cls.ALLOWED_MOUNT_POINTS: - mount_abs = os.path.normpath(os.path.abspath(mount_point)) - if safe_path.startswith(mount_abs): - allowed = True - break - - if not allowed: + if not path: + return resource_root + + # 清理路径,移除危险字符 + path = path.strip().replace('..', '').replace('//', '/') + + # 规范化路径 + if os.path.isabs(path): + safe_path = os.path.normpath(path) + else: + safe_path = os.path.normpath(os.path.join(resource_root, path)) + + # 检查路径是否在允许的范围内 + resource_root_abs = os.path.normpath(os.path.abspath(resource_root)) + safe_path_abs = os.path.normpath(os.path.abspath(safe_path)) + + if not safe_path_abs.startswith(resource_root_abs): raise CustomException(msg=f'访问路径不在允许范围内: {path}') + + # 防止路径遍历攻击 + if '..' in safe_path or safe_path.count('/') > cls.MAX_PATH_DEPTH: # 限制最大目录深度 + raise CustomException(msg=f'不安全的路径格式: {path}') return safe_path @@ -86,16 +108,45 @@ class ResourceService: stat = os.stat(safe_path) path_obj = Path(safe_path) + resource_root = cls._get_resource_root() # 获取文件扩展名和类型 file_extension = path_obj.suffix.lower() if path_obj.suffix else None - file_type = cls._get_mime_type_from_extension(file_extension) if file_extension else None + + # 优先使用 magic 库检测 MIME 类型 + file_type = None + if MAGIC_AVAILABLE and os.path.isfile(safe_path): + try: + file_type = magic.from_file(safe_path, mime=True) + except Exception as e: + logger.debug(f"magic 库检测文件类型失败: {e}") + + # 如果 magic 检测失败或不可用,使用扩展名检测 + if not file_type and file_extension: + file_type = cls._get_mime_type_from_extension(file_extension) + + # 如果仍然没有类型,使用默认值 + if not file_type: + file_type = 'application/octet-stream' if os.path.isfile(safe_path) else None + resource_type = cls._determine_resource_type(file_type, file_extension) + # 计算相对路径 + try: + relative_path = os.path.relpath(safe_path, resource_root) + except ValueError: + relative_path = os.path.basename(safe_path) + + # 计算深度 + try: + depth = len(Path(safe_path).relative_to(resource_root).parts) + except ValueError: + depth = 0 + return { 'name': path_obj.name, 'path': safe_path, - 'relative_path': os.path.relpath(safe_path, cls.DEFAULT_MOUNT_POINT), + 'relative_path': relative_path, 'is_file': os.path.isfile(safe_path), 'is_dir': os.path.isdir(safe_path), 'size': stat.st_size if os.path.isfile(safe_path) else None, @@ -106,7 +157,7 @@ class ResourceService: 'modified_time': datetime.fromtimestamp(stat.st_mtime), 'accessed_time': datetime.fromtimestamp(stat.st_atime), 'parent_path': str(path_obj.parent), - 'depth': len(path_obj.relative_to(cls.DEFAULT_MOUNT_POINT).parts) if cls.DEFAULT_MOUNT_POINT in safe_path else 0 + 'depth': depth } except Exception as e: logger.error(f'获取文件信息失败: {str(e)}') @@ -122,8 +173,11 @@ class ResourceService: ) -> Dict: """获取目录列表""" try: - target_path = path or cls.DEFAULT_MOUNT_POINT - safe_path = cls._get_safe_path(target_path) + # 如果没有指定路径,使用静态文件根目录 + if path is None: + safe_path = cls._get_resource_root() + else: + safe_path = cls._get_safe_path(path) if not os.path.exists(safe_path): raise CustomException(msg='目录不存在') @@ -171,7 +225,7 @@ class ResourceService: total_files=total_files, total_dirs=total_dirs, total_size=total_size - ).model_dump() + ).model_dump(mode='json') except CustomException: raise @@ -214,27 +268,52 @@ class ResourceService: ) -> List[Dict]: """搜索资源""" try: - mount_point = cls.DEFAULT_MOUNT_POINT + # 使用静态文件根目录作为搜索起点 + search_root = cls._get_resource_root() results = [] - for root, dirs, files in os.walk(mount_point): + for root, dirs, files in os.walk(search_root): # 控制搜索深度 - depth = len(Path(root).relative_to(mount_point).parts) + try: + depth = len(Path(root).relative_to(search_root).parts) + except ValueError: + depth = 0 + if depth > search.max_depth: + dirs.clear() # 阻止进一步深入 continue - # 过滤隐藏文件夹 + # 过滤隐藏文件夹(性能优化) if not search.include_hidden: dirs[:] = [d for d in dirs if not d.startswith('.')] files = [f for f in files if not f.startswith('.')] + # 优化:先过滤文件名,再进行详细检查 + if search.keyword: + files = [f for f in files if search.keyword.lower() in f.lower()] + # 搜索文件 for file in files: file_path = os.path.join(root, file) + + # 优化:先进行快速检查 + if search.extensions: + file_ext = os.path.splitext(file)[1].lower() + if file_ext not in search.extensions: + continue + file_info = cls._get_file_info(file_path) if cls._match_search_criteria(file_info, search): results.append(file_info) + + # 限制结果数量防止内存溢出 + if len(results) >= cls.MAX_SEARCH_RESULTS: + logger.warning(f"搜索结果过多,已截断到前{cls.MAX_SEARCH_RESULTS}个") + break + + if len(results) >= cls.MAX_SEARCH_RESULTS: + break # 排序结果 return cls._sort_results(results, search) @@ -314,10 +393,21 @@ class ResourceService: if not file or not file.filename: raise CustomException(msg="请选择要上传的文件") + # 文件名安全检查 + if '..' in file.filename or '/' in file.filename or '\\' in file.filename: + raise CustomException(msg="文件名包含不安全字符") + try: - # 确定上传目录 - upload_dir = target_path or cls.DEFAULT_MOUNT_POINT - safe_dir = cls._get_safe_path(upload_dir) + # 检查文件大小 + content = await file.read() + if len(content) > cls.MAX_UPLOAD_SIZE: + raise CustomException(msg=f"文件太大,最大支持{cls.MAX_UPLOAD_SIZE // (1024*1024)}MB") + + # 确定上传目录,如果没有指定目标路径,使用静态文件根目录 + if target_path is None: + safe_dir = cls._get_resource_root() + else: + safe_dir = cls._get_safe_path(target_path) # 创建目录(如果不存在) os.makedirs(safe_dir, exist_ok=True) @@ -337,24 +427,34 @@ class ResourceService: counter += 1 filename = os.path.basename(file_path) - # 保存文件 - content = await file.read() + # 保存文件(使用已读取的内容) with open(file_path, 'wb') as f: f.write(content) # 获取文件信息 file_info = cls._get_file_info(file_path) + # 生成相对于资源根目录的URL路径 + resource_root = cls._get_resource_root() + try: + relative_path = os.path.relpath(file_path, resource_root) + # 确保路径使用正斜杠(URL格式) + file_url_path = relative_path.replace(os.sep, '/') + file_url = f"/resource/download?path={file_url_path}" + except ValueError: + # 如果无法计算相对路径,使用文件名 + file_url = f"/resource/download?path={filename}" + logger.info(f"文件上传成功: {filename}") return ResourceUploadSchema( filename=filename, file_path=file_path, - file_url=f"/resource/download?path={file_path}", + file_url=file_url, file_size=file_info.get('size', 0), resource_type=file_info.get('resource_type', ResourceType.OTHER), upload_time=datetime.now() - ).model_dump() + ).model_dump(mode='json') except Exception as e: logger.error(f"文件上传失败: {str(e)}") @@ -531,10 +631,11 @@ class ResourceService: async def get_stats_service(cls, auth: AuthSchema) -> Dict: """获取资源统计信息""" try: - mount_point = cls.DEFAULT_MOUNT_POINT + # 使用静态文件根目录 + stats_root = cls._get_resource_root() # 获取磁盘空间信息 - statvfs = os.statvfs(mount_point) + statvfs = os.statvfs(stats_root) total_space = statvfs.f_frsize * statvfs.f_blocks free_space = statvfs.f_frsize * statvfs.f_bavail used_space = total_space - free_space @@ -546,7 +647,7 @@ class ResourceService: type_stats = {} extension_stats = {} - for root, dirs, files in os.walk(mount_point): + for root, dirs, files in os.walk(stats_root): total_dirs += len(dirs) for file in files: @@ -572,7 +673,7 @@ class ResourceService: continue return ResourceStatsSchema( - mount_point=mount_point, + mount_point=stats_root, total_files=total_files, total_dirs=total_dirs, total_size=total_size, @@ -581,7 +682,7 @@ class ResourceService: total_space=total_space, type_stats=type_stats, extension_stats=extension_stats - ).model_dump() + ).model_dump(mode='json') except Exception as e: logger.error(f"获取统计信息失败: {str(e)}") @@ -658,36 +759,39 @@ class ResourceService: if not file_extension: return 'application/octet-stream' + # 扩展更全面的MIME类型映射 mime_types = { - '.jpg': 'image/jpeg', - '.jpeg': 'image/jpeg', - '.png': 'image/png', - '.gif': 'image/gif', - '.bmp': 'image/bmp', - '.webp': 'image/webp', - '.svg': 'image/svg+xml', - '.mp4': 'video/mp4', - '.avi': 'video/x-msvideo', - '.mov': 'video/quicktime', - '.wmv': 'video/x-ms-wmv', - '.flv': 'video/x-flv', - '.mp3': 'audio/mpeg', - '.wav': 'audio/wav', - '.aac': 'audio/aac', - '.ogg': 'audio/ogg', - '.pdf': 'application/pdf', - '.doc': 'application/msword', + # 图片类型 + '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.png': 'image/png', + '.gif': 'image/gif', '.bmp': 'image/bmp', '.webp': 'image/webp', + '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.tiff': 'image/tiff', + + # 视频类型 + '.mp4': 'video/mp4', '.avi': 'video/x-msvideo', '.mov': 'video/quicktime', + '.wmv': 'video/x-ms-wmv', '.flv': 'video/x-flv', '.webm': 'video/webm', + '.mkv': 'video/x-matroska', '.m4v': 'video/x-m4v', + + # 音频类型 + '.mp3': 'audio/mpeg', '.wav': 'audio/wav', '.aac': 'audio/aac', + '.ogg': 'audio/ogg', '.flac': 'audio/flac', '.m4a': 'audio/mp4', + + # 文档类型 + '.pdf': 'application/pdf', '.doc': 'application/msword', '.docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.xls': 'application/vnd.ms-excel', '.xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', '.ppt': 'application/vnd.ms-powerpoint', '.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - '.txt': 'text/plain', - '.csv': 'text/csv', - '.zip': 'application/zip', - '.rar': 'application/x-rar-compressed', - '.7z': 'application/x-7z-compressed', - '.tar': 'application/x-tar', - '.gz': 'application/gzip' + '.txt': 'text/plain', '.csv': 'text/csv', '.rtf': 'application/rtf', + + # 代码文件 + '.html': 'text/html', '.css': 'text/css', '.js': 'application/javascript', + '.json': 'application/json', '.xml': 'application/xml', + '.py': 'text/x-python', '.java': 'text/x-java-source', + + # 压缩文件 + '.zip': 'application/zip', '.rar': 'application/x-rar-compressed', + '.7z': 'application/x-7z-compressed', '.tar': 'application/x-tar', + '.gz': 'application/gzip', '.bz2': 'application/x-bzip2' } return mime_types.get(file_extension.lower(), 'application/octet-stream') \ No newline at end of file diff --git a/backend/app/config/setting.py b/backend/app/config/setting.py index aea6677a..b725072c 100755 --- a/backend/app/config/setting.py +++ b/backend/app/config/setting.py @@ -260,6 +260,14 @@ class Settings(BaseSettings): # if not os.path.exists(self.GEN_PATH): # os.makedirs(self.GEN_PATH) + # ================================================= # + # ******************* AI大模型配置 ****************** # + # ================================================= # + # https://bailian.console.aliyun.com/?spm=5176.29619931.J_AHgvE-XDhTWrtotIBlDQQ.13.74cd521clrmQ7o&tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2712576.html&renderType=iframe + QWEN_BASE_URL: str + QWEN_API_KEY: str + QWEN_MODEL: str + # ================================================= # # ******************* 其他配置 ******************* # # ================================================= # diff --git a/backend/app/core/ap_scheduler.py b/backend/app/core/ap_scheduler.py index b6201bc5..92880606 100644 --- a/backend/app/core/ap_scheduler.py +++ b/backend/app/core/ap_scheduler.py @@ -24,7 +24,7 @@ from apscheduler.triggers.interval import IntervalTrigger from pymongo import MongoClient from app.config.setting import settings -from app.core.database import engine, session_connect, SessionLocal, async_session +from app.core.database import engine, session_connect, SessionLocal, AsyncSessionLocal from app.core.exceptions import CustomException from app.core.logger import logger @@ -41,7 +41,10 @@ job_stores = { )), } # 配置执行器 -executors = {'default': AsyncIOExecutor(), 'processpool': ProcessPoolExecutor(5)} +executors = { + 'default': AsyncIOExecutor(), + 'processpool': ProcessPoolExecutor(max_workers=1) # 减少进程数量以减少资源消耗 +} # 配置默认参数 job_defaults = { 'coalesce': False, # 是否合并执行 @@ -110,7 +113,7 @@ class SchedulerUtil: exception_info=exception_info, create_time=datetime.now(), ) - session = async_session() + session = SessionLocal() JobLogCRUD(AuthSchema(db=session)).create_obj_log_crud(data=job_log) session.close() diff --git a/backend/app/core/database.py b/backend/app/core/database.py index 28d31153..dc66ecf5 100644 --- a/backend/app/core/database.py +++ b/backend/app/core/database.py @@ -3,7 +3,7 @@ from redis import asyncio as aioredis from motor.motor_asyncio import AsyncIOMotorClient from fastapi import FastAPI -from sqlalchemy import create_engine, inspect, text +from sqlalchemy import create_engine, text from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.asyncio import ( create_async_engine, @@ -37,26 +37,21 @@ engine = create_engine( SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) # 异步数据库引擎 -def async_db_engine() -> AsyncEngine: - """创建异步数据库引擎""" - # 创建数据库引擎 - async_engine = create_async_engine( - url=settings.ASYNC_DB_URI, - echo=settings.DATABASE_ECHO, - echo_pool=settings.ECHO_POOL, - pool_pre_ping=settings.POOL_PRE_PING, - future=settings.FUTURE, - pool_recycle=settings.POOL_RECYCLE, - # pool_size=settings.POOL_SIZE, # sqlite 不支持 - # max_overflow=settings.MAX_OVERFLOW, # sqlite 不支持 - # pool_timeout=settings.POOL_TIMEOUT, # sqlite 不支持 - ) +async_engine: AsyncEngine = create_async_engine( + url=settings.ASYNC_DB_URI, + echo=settings.DATABASE_ECHO, + echo_pool=settings.ECHO_POOL, + pool_pre_ping=settings.POOL_PRE_PING, + future=settings.FUTURE, + pool_recycle=settings.POOL_RECYCLE, + # pool_size=settings.POOL_SIZE, # sqlite 不支持 + # max_overflow=settings.MAX_OVERFLOW, # sqlite 不支持 + # pool_timeout=settings.POOL_TIMEOUT, # sqlite 不支持 +) - return async_engine - # 异步数据库会话工厂 -async_session = async_sessionmaker( - bind=async_db_engine(), +AsyncSessionLocal = async_sessionmaker( + bind=async_engine, autocommit=settings.AUTOCOMMIT, autoflush=settings.AUTOFETCH, expire_on_commit=settings.EXPIRE_ON_COMMIT, @@ -68,7 +63,7 @@ def session_connect() -> AsyncSession: try: if not settings.SQL_DB_ENABLE: raise CustomException(msg="请先开启数据库连接", data="请启用 app/config/setting.py: SQL_DB_ENABLE") - return async_session() + return AsyncSessionLocal() except Exception as e: raise CustomException(msg=f"数据库连接失败: {e}") diff --git a/backend/app/plugin/init_app.py b/backend/app/plugin/init_app.py index d310bf72..3592a42d 100644 --- a/backend/app/plugin/init_app.py +++ b/backend/app/plugin/init_app.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -import asyncio from typing import Any, AsyncGenerator +from fastapi_mcp import FastApiMCP from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from fastapi.concurrency import asynccontextmanager @@ -10,7 +10,6 @@ from fastapi.openapi.docs import ( get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html ) -from sqlalchemy import text from app.config.setting import settings from app.core.ap_scheduler import SchedulerUtil @@ -103,6 +102,20 @@ def register_routers(app: FastAPI) -> None: """ app.include_router(router=router) +def register_fastapi_mcp(app: FastAPI) -> None: + """ + 注册FastAPI-MCP路由 + """ + mcp = FastApiMCP( + app, + name="FastAPI Vue3 Admin MCP", + description="MCP server for the FastAPI Vue3 Admin system", + describe_full_response_schema=True, + describe_all_responses=True, + ) + mcp.mount() + # mcp.mount_http() + def register_files(app: FastAPI) -> None: """ 注册文件相关配置 @@ -140,4 +153,4 @@ def reset_api_docs(app: FastAPI) -> None: title=app.title + " - ReDoc", redoc_js_url=settings.REDOC_JS_URL, redoc_favicon_url=settings.FAVICON_URL, - ) + ) \ No newline at end of file diff --git a/backend/app/scripts/data/system_menu.json b/backend/app/scripts/data/system_menu.json index 2a1aee67..783f0b92 100644 --- a/backend/app/scripts/data/system_menu.json +++ b/backend/app/scripts/data/system_menu.json @@ -2118,5 +2118,68 @@ "affix": false, "redirect": null, "description": "初始化数据" - } + }, + { + "id": 102, + "name": "AI大模型", + "type": 1, + "icon": "el-icon-DataLine", + "order": 8, + "permission": null, + "route_name": "AI", + "route_path": "/ai", + "component_path": null, + "parent_id": null, + "status": true, + "keep_alive": false, + "hidden": false, + "always_show": false, + "title": "AI大模型", + "params": null, + "affix": false, + "redirect": "/ai/mcp", + "description": "AI大模型管理" + }, + { + "id": 103, + "name": "MCP智能助手", + "type": 2, + "icon": "el-icon-DataLine", + "order": 1, + "permission": "ai:mcp:chat", + "route_name": "MCP", + "route_path": "/ai/mcp", + "component_path": "ai/mcp/index", + "parent_id": 102, + "status": true, + "keep_alive": true, + "hidden": false, + "always_show": false, + "title": "MCP智能助手", + "params": null, + "affix": false, + "redirect": null, + "description": "MCP智能助手" + }, + { + "id": 104, + "name": "智能对话", + "type": 3, + "icon": null, + "order": 1, + "permission": "ai:mcp:chat", + "route_name": null, + "route_path": null, + "component_path": null, + "parent_id": 103, + "status": true, + "keep_alive": true, + "hidden": false, + "always_show": false, + "title": "智能对话", + "params": null, + "affix": false, + "redirect": null, + "description": "智能对话" + } ] \ No newline at end of file diff --git a/backend/app/scripts/data/system_role_menus.json b/backend/app/scripts/data/system_role_menus.json index 605e75d5..0e6e9f17 100644 --- a/backend/app/scripts/data/system_role_menus.json +++ b/backend/app/scripts/data/system_role_menus.json @@ -403,6 +403,18 @@ "role_id": 1, "menu_id": 101 }, + { + "role_id": 1, + "menu_id": 102 + }, + { + "role_id": 1, + "menu_id": 103 + }, + { + "role_id": 1, + "menu_id": 104 + }, { "role_id": 2, "menu_id": 1 diff --git a/backend/app/utils/ai_util.py b/backend/app/utils/ai_util.py new file mode 100644 index 00000000..64fa17fb --- /dev/null +++ b/backend/app/utils/ai_util.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +from openai import AsyncOpenAI, OpenAI +from openai.types.chat.chat_completion import ChatCompletion + +from app.config.setting import settings +from app.core.logger import logger + + +class AIClient: + + def __init__(self): + self.model = settings.QWEN_MODEL + # 使用默认的http客户端,避免资源管理问题 + self.client = AsyncOpenAI( + api_key=settings.QWEN_API_KEY, + base_url=settings.QWEN_BASE_URL, + ) + + async def process(self, query: str): + """处理查询并返回流式响应""" + system_prompt = """你是一个有用的AI助手,可以帮助用户回答问题和提供帮助。请用中文回答用户的问题。""" + + try: + # 使用 await 调用异步客户端 + response = await self.client.chat.completions.create( + model=self.model, + messages=[ + {"role": "system", "content": system_prompt}, + {"role": "user", "content": query} + ], + stream=True + ) + + # 流式返回响应 + async for chunk in response: + if chunk.choices[0].delta.content is not None: + yield chunk.choices[0].delta.content + + except Exception as e: + logger.error(f"AI处理查询失败: {str(e)}") + yield f"抱歉,处理您的请求时出现了错误: {str(e)}" diff --git a/backend/app/utils/ip_local_util.py b/backend/app/utils/ip_local_util.py index e94b8ae1..6dde6aac 100644 --- a/backend/app/utils/ip_local_util.py +++ b/backend/app/utils/ip_local_util.py @@ -86,7 +86,7 @@ class IpLocalUtil: try: # 使用ip-api.com API获取IP归属地信息 - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(timeout=10.0) as client: # 尝试使用 ip9.com.cn API url = f'https://ip9.com.cn/get?ip={ip}' response = await cls._make_api_request(client, url) diff --git a/backend/env/.env.dev b/backend/env/.env.dev index cbacfe7c..5c30746e 100644 --- a/backend/env/.env.dev +++ b/backend/env/.env.dev @@ -65,3 +65,8 @@ MONGO_DB_NAME = "admin" # 日志配置 LOGGER_LEVEL = 'DEBUG' # 日志级别 + +# https://bailian.console.aliyun.com/?spm=5176.29619931.J_AHgvE-XDhTWrtotIBlDQQ.13.74cd521clrmQ7o&tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2712576.html&renderType=iframe +QWEN_BASE_URL = https://dashscope.aliyuncs.com/compatible-mode/v1 +QWEN_API_KEY = sk-e688534f2d984e7fa2eb46add409422f +QWEN_MODEL = qwen-plus \ No newline at end of file diff --git a/backend/env/.env.prod b/backend/env/.env.prod index bdf56d35..d1adaac5 100644 --- a/backend/env/.env.prod +++ b/backend/env/.env.prod @@ -59,3 +59,9 @@ MONGO_DB_NAME = "fastapiadmin" # 日志配置 LOGGER_LEVEL = 'INFO' # 日志级别 + + +# https://bailian.console.aliyun.com/?spm=5176.29619931.J_AHgvE-XDhTWrtotIBlDQQ.13.74cd521clrmQ7o&tab=api#/api/?type=model&url=https%3A%2F%2Fhelp.aliyun.com%2Fdocument_detail%2F2712576.html&renderType=iframe +QWEN_BASE_URL = https://dashscope.aliyuncs.com/compatible-mode/v1 +QWEN_API_KEY = sk-e688534f2d984e7fa2eb46add409422f +QWEN_MODEL = qwen-plus \ No newline at end of file diff --git a/backend/main.py b/backend/main.py index 7401f337..2962e64e 100755 --- a/backend/main.py +++ b/backend/main.py @@ -21,6 +21,7 @@ def create_app() -> FastAPI: register_middlewares, register_exceptions, register_routers, + register_fastapi_mcp, register_files, reset_api_docs, lifespan @@ -38,6 +39,8 @@ def create_app() -> FastAPI: register_files(app) # 重设API文档 reset_api_docs(app) + # 注册FastAPI-MCP + register_fastapi_mcp(app) return app diff --git a/backend/requirements.txt b/backend/requirements.txt index 2e773e64..8df929dc 100755 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,6 +1,7 @@ alembic==1.15.1 # 数据库迁移 APScheduler==3.11.0 # 定时任务 fastapi==0.115.2 +fastapi-mcp==0.4.0 typer==0.7.0 click==8.1.7 uvicorn==0.30.6 # uvicorn web 框架 @@ -23,8 +24,7 @@ python-multipart==0.0.9 # request.form() 对表单进行「解析」时安 greenlet==3.1.1 # 协程框架 bcrypt==4.0.1 # 密码加密解析 aiofiles==24.1.0 # 文件操作 -redis==5.2.1 # redis 同步操作数据库(用户celery配套使用) -# aioredis==2.0.1 # redis 异步操作数据库 redis已经完全具备了aioredis的功能,无需重复安全,且aioredis已经不再维护也不兼容3.10+的版本 +redis==5.2.1 # redis 同步操作数据库(用户celery配套使用)redis 异步操作数据库 redis已经完全具备了aioredis的功能,无需重复安全,且aioredis已经不再维护也不兼容3.10+的版本 aiosqlite==0.17.0 # sqlite 异步操作数据库 asyncmy==0.2.9 # mysql 异步操作数据库:基于 mysqlclient:asyncmy 是 mysqlclient 的异步版本,mysqlclient 是一个 C 语言编写的 MySQL 客户端,性能较高。性能:asyncmy 通常在性能上优于 aiomysql,特别是在高并发和大数据量的场景下。 motor==3.6.0 # mongodb 驱动 @@ -34,3 +34,4 @@ PyMySQL==1.1.2 # mysql 异步操作数据库基于 pymysql:aiomys cryptography==45.0.2 # mysql8 密码加密 openai==1.55.2 # ai 大模型 oss2==2.18.4 # 阿里云对象存储 +python-magic==0.4.27 # 文件类型识别 diff --git a/backend/sql/postgresql/fastapiadmin_2025-09-06_211640.sql b/backend/sql/postgresql/fastapiadmin_2025-09-06_211640.sql new file mode 100644 index 00000000..e91283a7 --- /dev/null +++ b/backend/sql/postgresql/fastapiadmin_2025-09-06_211640.sql @@ -0,0 +1,3130 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 17.5 (ServBay) +-- Dumped by pg_dump version 17.5 (ServBay) + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: application_myapp; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.application_myapp ( + name character varying(64) NOT NULL, + access_url character varying(500) NOT NULL, + icon_url character varying(300), + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.application_myapp OWNER TO tao; + +-- +-- Name: TABLE application_myapp; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.application_myapp IS '应用系统表'; + + +-- +-- Name: COLUMN application_myapp.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.name IS '应用名称'; + + +-- +-- Name: COLUMN application_myapp.access_url; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.access_url IS '访问地址'; + + +-- +-- Name: COLUMN application_myapp.icon_url; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.icon_url IS '应用图标URL'; + + +-- +-- Name: COLUMN application_myapp.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN application_myapp.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.id IS '主键ID'; + + +-- +-- Name: COLUMN application_myapp.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN application_myapp.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.description IS '备注说明'; + + +-- +-- Name: COLUMN application_myapp.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.created_at IS '创建时间'; + + +-- +-- Name: COLUMN application_myapp.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.application_myapp.updated_at IS '更新时间'; + + +-- +-- Name: application_myapp_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.application_myapp_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.application_myapp_id_seq OWNER TO tao; + +-- +-- Name: application_myapp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.application_myapp_id_seq OWNED BY public.application_myapp.id; + + +-- +-- Name: example_demo; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.example_demo ( + name character varying(64), + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.example_demo OWNER TO tao; + +-- +-- Name: TABLE example_demo; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.example_demo IS '示例表'; + + +-- +-- Name: COLUMN example_demo.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.name IS '名称'; + + +-- +-- Name: COLUMN example_demo.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN example_demo.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.id IS '主键ID'; + + +-- +-- Name: COLUMN example_demo.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN example_demo.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.description IS '备注说明'; + + +-- +-- Name: COLUMN example_demo.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.created_at IS '创建时间'; + + +-- +-- Name: COLUMN example_demo.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.example_demo.updated_at IS '更新时间'; + + +-- +-- Name: example_demo_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.example_demo_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.example_demo_id_seq OWNER TO tao; + +-- +-- Name: example_demo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.example_demo_id_seq OWNED BY public.example_demo.id; + + +-- +-- Name: monitor_job; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.monitor_job ( + name character varying(64), + jobstore character varying(64), + executor character varying(64), + trigger character varying(64) NOT NULL, + trigger_args text, + func text NOT NULL, + args text, + kwargs text, + "coalesce" boolean, + max_instances integer, + start_date character varying(64), + end_date character varying(64), + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.monitor_job OWNER TO tao; + +-- +-- Name: TABLE monitor_job; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.monitor_job IS '定时任务调度表'; + + +-- +-- Name: COLUMN monitor_job.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.name IS '任务名称'; + + +-- +-- Name: COLUMN monitor_job.jobstore; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.jobstore IS '存储器'; + + +-- +-- Name: COLUMN monitor_job.executor; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.executor IS '执行器:将运行此作业的执行程序的名称'; + + +-- +-- Name: COLUMN monitor_job.trigger; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.trigger IS '触发器:控制此作业计划的 trigger 对象'; + + +-- +-- Name: COLUMN monitor_job.trigger_args; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.trigger_args IS '触发器参数'; + + +-- +-- Name: COLUMN monitor_job.func; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.func IS '任务函数'; + + +-- +-- Name: COLUMN monitor_job.args; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.args IS '位置参数'; + + +-- +-- Name: COLUMN monitor_job.kwargs; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.kwargs IS '关键字参数'; + + +-- +-- Name: COLUMN monitor_job."coalesce"; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job."coalesce" IS '是否合并运行:是否在多个运行时间到期时仅运行作业一次'; + + +-- +-- Name: COLUMN monitor_job.max_instances; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.max_instances IS '最大实例数:允许的最大并发执行实例数 工作'; + + +-- +-- Name: COLUMN monitor_job.start_date; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.start_date IS '开始时间'; + + +-- +-- Name: COLUMN monitor_job.end_date; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.end_date IS '结束时间'; + + +-- +-- Name: COLUMN monitor_job.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN monitor_job.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.id IS '主键ID'; + + +-- +-- Name: COLUMN monitor_job.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN monitor_job.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.description IS '备注说明'; + + +-- +-- Name: COLUMN monitor_job.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.created_at IS '创建时间'; + + +-- +-- Name: COLUMN monitor_job.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job.updated_at IS '更新时间'; + + +-- +-- Name: monitor_job_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.monitor_job_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.monitor_job_id_seq OWNER TO tao; + +-- +-- Name: monitor_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.monitor_job_id_seq OWNED BY public.monitor_job.id; + + +-- +-- Name: monitor_job_log; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.monitor_job_log ( + id integer NOT NULL, + job_name character varying(64) NOT NULL, + job_group character varying(64) NOT NULL, + job_executor character varying(64) NOT NULL, + invoke_target character varying(500) NOT NULL, + job_args character varying(255), + job_kwargs character varying(255), + job_trigger character varying(255), + job_message character varying(500), + exception_info character varying(2000), + job_id integer +); + + +ALTER TABLE public.monitor_job_log OWNER TO tao; + +-- +-- Name: TABLE monitor_job_log; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.monitor_job_log IS '定时任务调度日志表'; + + +-- +-- Name: COLUMN monitor_job_log.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.id IS '主键ID'; + + +-- +-- Name: COLUMN monitor_job_log.job_name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_name IS '任务名称'; + + +-- +-- Name: COLUMN monitor_job_log.job_group; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_group IS '任务组名'; + + +-- +-- Name: COLUMN monitor_job_log.job_executor; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_executor IS '任务执行器'; + + +-- +-- Name: COLUMN monitor_job_log.invoke_target; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.invoke_target IS '调用目标字符串'; + + +-- +-- Name: COLUMN monitor_job_log.job_args; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_args IS '位置参数'; + + +-- +-- Name: COLUMN monitor_job_log.job_kwargs; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_kwargs IS '关键字参数'; + + +-- +-- Name: COLUMN monitor_job_log.job_trigger; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_trigger IS '任务触发器'; + + +-- +-- Name: COLUMN monitor_job_log.job_message; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_message IS '日志信息'; + + +-- +-- Name: COLUMN monitor_job_log.exception_info; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.exception_info IS '异常信息'; + + +-- +-- Name: COLUMN monitor_job_log.job_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.monitor_job_log.job_id IS '任务ID'; + + +-- +-- Name: monitor_job_log_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.monitor_job_log_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.monitor_job_log_id_seq OWNER TO tao; + +-- +-- Name: monitor_job_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.monitor_job_log_id_seq OWNED BY public.monitor_job_log.id; + + +-- +-- Name: system_config; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_config ( + config_name character varying(500) NOT NULL, + config_key character varying(500) NOT NULL, + config_value character varying(500), + config_type boolean, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_config OWNER TO tao; + +-- +-- Name: TABLE system_config; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_config IS '系统配置表'; + + +-- +-- Name: COLUMN system_config.config_name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.config_name IS '参数名称'; + + +-- +-- Name: COLUMN system_config.config_key; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.config_key IS '参数键名'; + + +-- +-- Name: COLUMN system_config.config_value; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.config_value IS '参数键值'; + + +-- +-- Name: COLUMN system_config.config_type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.config_type IS '系统内置(True:是 False:否)'; + + +-- +-- Name: COLUMN system_config.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_config.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.id IS '主键ID'; + + +-- +-- Name: COLUMN system_config.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_config.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.description IS '备注说明'; + + +-- +-- Name: COLUMN system_config.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_config.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_config.updated_at IS '更新时间'; + + +-- +-- Name: system_config_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_config_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_config_id_seq OWNER TO tao; + +-- +-- Name: system_config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_config_id_seq OWNED BY public.system_config.id; + + +-- +-- Name: system_dept; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_dept ( + name character varying(40) NOT NULL, + "order" integer NOT NULL, + parent_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_dept OWNER TO tao; + +-- +-- Name: TABLE system_dept; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_dept IS '部门表'; + + +-- +-- Name: COLUMN system_dept.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.name IS '部门名称'; + + +-- +-- Name: COLUMN system_dept."order"; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept."order" IS '显示排序'; + + +-- +-- Name: COLUMN system_dept.parent_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.parent_id IS '父级部门ID'; + + +-- +-- Name: COLUMN system_dept.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.id IS '主键ID'; + + +-- +-- Name: COLUMN system_dept.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_dept.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.description IS '备注说明'; + + +-- +-- Name: COLUMN system_dept.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_dept.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dept.updated_at IS '更新时间'; + + +-- +-- Name: system_dept_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_dept_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_dept_id_seq OWNER TO tao; + +-- +-- Name: system_dept_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_dept_id_seq OWNED BY public.system_dept.id; + + +-- +-- Name: system_dict_data; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_dict_data ( + dict_sort integer NOT NULL, + dict_label character varying(100) NOT NULL, + dict_value character varying(100) NOT NULL, + dict_type character varying(100) NOT NULL, + css_class character varying(100), + list_class character varying(100), + is_default boolean NOT NULL, + dict_type_id integer, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_dict_data OWNER TO tao; + +-- +-- Name: TABLE system_dict_data; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_dict_data IS '字典数据表'; + + +-- +-- Name: COLUMN system_dict_data.dict_sort; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.dict_sort IS '字典排序'; + + +-- +-- Name: COLUMN system_dict_data.dict_label; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.dict_label IS '字典标签'; + + +-- +-- Name: COLUMN system_dict_data.dict_value; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.dict_value IS '字典键值'; + + +-- +-- Name: COLUMN system_dict_data.dict_type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.dict_type IS '字典类型'; + + +-- +-- Name: COLUMN system_dict_data.css_class; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.css_class IS '样式属性(其他样式扩展)'; + + +-- +-- Name: COLUMN system_dict_data.list_class; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.list_class IS '表格回显样式'; + + +-- +-- Name: COLUMN system_dict_data.is_default; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.is_default IS '是否默认(True是 False否)'; + + +-- +-- Name: COLUMN system_dict_data.dict_type_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.dict_type_id IS '字典类型ID'; + + +-- +-- Name: COLUMN system_dict_data.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_dict_data.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.id IS '主键ID'; + + +-- +-- Name: COLUMN system_dict_data.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_dict_data.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.description IS '备注说明'; + + +-- +-- Name: COLUMN system_dict_data.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_dict_data.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_data.updated_at IS '更新时间'; + + +-- +-- Name: system_dict_data_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_dict_data_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_dict_data_id_seq OWNER TO tao; + +-- +-- Name: system_dict_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_dict_data_id_seq OWNED BY public.system_dict_data.id; + + +-- +-- Name: system_dict_type; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_dict_type ( + dict_name character varying(100) NOT NULL, + dict_type character varying(100) NOT NULL, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_dict_type OWNER TO tao; + +-- +-- Name: TABLE system_dict_type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_dict_type IS '字典类型表'; + + +-- +-- Name: COLUMN system_dict_type.dict_name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.dict_name IS '字典名称'; + + +-- +-- Name: COLUMN system_dict_type.dict_type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.dict_type IS '字典类型'; + + +-- +-- Name: COLUMN system_dict_type.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_dict_type.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.id IS '主键ID'; + + +-- +-- Name: COLUMN system_dict_type.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_dict_type.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.description IS '备注说明'; + + +-- +-- Name: COLUMN system_dict_type.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_dict_type.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_dict_type.updated_at IS '更新时间'; + + +-- +-- Name: system_dict_type_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_dict_type_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_dict_type_id_seq OWNER TO tao; + +-- +-- Name: system_dict_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_dict_type_id_seq OWNED BY public.system_dict_type.id; + + +-- +-- Name: system_log; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_log ( + type integer NOT NULL, + request_path character varying(255) NOT NULL, + request_method character varying(10) NOT NULL, + request_payload text, + request_ip character varying(50), + login_location character varying(255), + request_os character varying(64), + request_browser character varying(64), + response_code integer NOT NULL, + response_json text, + process_time character varying(20), + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_log OWNER TO tao; + +-- +-- Name: TABLE system_log; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_log IS '系统日志表'; + + +-- +-- Name: COLUMN system_log.type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.type IS '日志类型(1登录日志 2操作日志)'; + + +-- +-- Name: COLUMN system_log.request_path; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.request_path IS '请求路径'; + + +-- +-- Name: COLUMN system_log.request_method; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.request_method IS '请求方式'; + + +-- +-- Name: COLUMN system_log.request_payload; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.request_payload IS '请求体'; + + +-- +-- Name: COLUMN system_log.request_ip; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.request_ip IS '请求IP地址'; + + +-- +-- Name: COLUMN system_log.login_location; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.login_location IS '登录位置'; + + +-- +-- Name: COLUMN system_log.request_os; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.request_os IS '操作系统'; + + +-- +-- Name: COLUMN system_log.request_browser; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.request_browser IS '浏览器'; + + +-- +-- Name: COLUMN system_log.response_code; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.response_code IS '响应状态码'; + + +-- +-- Name: COLUMN system_log.response_json; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.response_json IS '响应体'; + + +-- +-- Name: COLUMN system_log.process_time; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.process_time IS '处理时间'; + + +-- +-- Name: COLUMN system_log.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_log.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.id IS '主键ID'; + + +-- +-- Name: COLUMN system_log.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_log.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.description IS '备注说明'; + + +-- +-- Name: COLUMN system_log.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_log.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_log.updated_at IS '更新时间'; + + +-- +-- Name: system_log_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_log_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_log_id_seq OWNER TO tao; + +-- +-- Name: system_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_log_id_seq OWNED BY public.system_log.id; + + +-- +-- Name: system_menu; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_menu ( + name character varying(50) NOT NULL, + type integer NOT NULL, + "order" integer NOT NULL, + permission character varying(100), + icon character varying(50), + route_name character varying(100), + route_path character varying(200), + component_path character varying(200), + redirect character varying(200), + hidden boolean NOT NULL, + keep_alive boolean NOT NULL, + always_show boolean NOT NULL, + title character varying(50), + params json, + affix boolean NOT NULL, + parent_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_menu OWNER TO tao; + +-- +-- Name: TABLE system_menu; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_menu IS '菜单表'; + + +-- +-- Name: COLUMN system_menu.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.name IS '菜单名称'; + + +-- +-- Name: COLUMN system_menu.type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.type IS '菜单类型(1:目录 2:菜单 3:按钮/权限 4:链接)'; + + +-- +-- Name: COLUMN system_menu."order"; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu."order" IS '显示排序'; + + +-- +-- Name: COLUMN system_menu.permission; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.permission IS '权限标识(如:system:user:list)'; + + +-- +-- Name: COLUMN system_menu.icon; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.icon IS '菜单图标'; + + +-- +-- Name: COLUMN system_menu.route_name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.route_name IS '路由名称'; + + +-- +-- Name: COLUMN system_menu.route_path; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.route_path IS '路由路径'; + + +-- +-- Name: COLUMN system_menu.component_path; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.component_path IS '组件路径'; + + +-- +-- Name: COLUMN system_menu.redirect; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.redirect IS '重定向地址'; + + +-- +-- Name: COLUMN system_menu.hidden; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.hidden IS '是否隐藏(True:隐藏 False:显示)'; + + +-- +-- Name: COLUMN system_menu.keep_alive; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.keep_alive IS '是否缓存(True:是 False:否)'; + + +-- +-- Name: COLUMN system_menu.always_show; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.always_show IS '是否始终显示(True:是 False:否)'; + + +-- +-- Name: COLUMN system_menu.title; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.title IS '菜单标题'; + + +-- +-- Name: COLUMN system_menu.params; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.params IS '路由参数(JSON对象)'; + + +-- +-- Name: COLUMN system_menu.affix; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.affix IS '是否固定标签页(True:是 False:否)'; + + +-- +-- Name: COLUMN system_menu.parent_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.parent_id IS '父菜单ID'; + + +-- +-- Name: COLUMN system_menu.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.id IS '主键ID'; + + +-- +-- Name: COLUMN system_menu.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_menu.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.description IS '备注说明'; + + +-- +-- Name: COLUMN system_menu.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_menu.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_menu.updated_at IS '更新时间'; + + +-- +-- Name: system_menu_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_menu_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_menu_id_seq OWNER TO tao; + +-- +-- Name: system_menu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_menu_id_seq OWNED BY public.system_menu.id; + + +-- +-- Name: system_notice; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_notice ( + notice_title character varying(50) NOT NULL, + notice_type character varying(50) NOT NULL, + notice_content text, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_notice OWNER TO tao; + +-- +-- Name: TABLE system_notice; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_notice IS '通知公告表'; + + +-- +-- Name: COLUMN system_notice.notice_title; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.notice_title IS '公告标题'; + + +-- +-- Name: COLUMN system_notice.notice_type; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.notice_type IS '公告类型(1通知 2公告)'; + + +-- +-- Name: COLUMN system_notice.notice_content; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.notice_content IS '公告内容'; + + +-- +-- Name: COLUMN system_notice.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_notice.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.id IS '主键ID'; + + +-- +-- Name: COLUMN system_notice.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_notice.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.description IS '备注说明'; + + +-- +-- Name: COLUMN system_notice.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_notice.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_notice.updated_at IS '更新时间'; + + +-- +-- Name: system_notice_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_notice_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_notice_id_seq OWNER TO tao; + +-- +-- Name: system_notice_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_notice_id_seq OWNED BY public.system_notice.id; + + +-- +-- Name: system_position; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_position ( + name character varying(40) NOT NULL, + "order" integer NOT NULL, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_position OWNER TO tao; + +-- +-- Name: TABLE system_position; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_position IS '岗位表'; + + +-- +-- Name: COLUMN system_position.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.name IS '岗位名称'; + + +-- +-- Name: COLUMN system_position."order"; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position."order" IS '显示排序'; + + +-- +-- Name: COLUMN system_position.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_position.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.id IS '主键ID'; + + +-- +-- Name: COLUMN system_position.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_position.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.description IS '备注说明'; + + +-- +-- Name: COLUMN system_position.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_position.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_position.updated_at IS '更新时间'; + + +-- +-- Name: system_position_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_position_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_position_id_seq OWNER TO tao; + +-- +-- Name: system_position_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_position_id_seq OWNED BY public.system_position.id; + + +-- +-- Name: system_role; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_role ( + name character varying(40) NOT NULL, + code character varying(20), + "order" integer NOT NULL, + data_scope integer NOT NULL, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_role OWNER TO tao; + +-- +-- Name: TABLE system_role; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_role IS '角色表'; + + +-- +-- Name: COLUMN system_role.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.name IS '角色名称'; + + +-- +-- Name: COLUMN system_role.code; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.code IS '角色编码'; + + +-- +-- Name: COLUMN system_role."order"; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role."order" IS '显示排序'; + + +-- +-- Name: COLUMN system_role.data_scope; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.data_scope IS '数据权限范围'; + + +-- +-- Name: COLUMN system_role.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_role.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.id IS '主键ID'; + + +-- +-- Name: COLUMN system_role.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_role.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.description IS '备注说明'; + + +-- +-- Name: COLUMN system_role.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_role.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role.updated_at IS '更新时间'; + + +-- +-- Name: system_role_depts; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_role_depts ( + role_id integer NOT NULL, + dept_id integer NOT NULL +); + + +ALTER TABLE public.system_role_depts OWNER TO tao; + +-- +-- Name: TABLE system_role_depts; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_role_depts IS '角色部门关联表'; + + +-- +-- Name: COLUMN system_role_depts.role_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role_depts.role_id IS '角色ID'; + + +-- +-- Name: COLUMN system_role_depts.dept_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role_depts.dept_id IS '部门ID'; + + +-- +-- Name: system_role_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_role_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_role_id_seq OWNER TO tao; + +-- +-- Name: system_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_role_id_seq OWNED BY public.system_role.id; + + +-- +-- Name: system_role_menus; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_role_menus ( + role_id integer NOT NULL, + menu_id integer NOT NULL +); + + +ALTER TABLE public.system_role_menus OWNER TO tao; + +-- +-- Name: TABLE system_role_menus; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_role_menus IS '角色菜单关联表'; + + +-- +-- Name: COLUMN system_role_menus.role_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role_menus.role_id IS '角色ID'; + + +-- +-- Name: COLUMN system_role_menus.menu_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_role_menus.menu_id IS '菜单ID'; + + +-- +-- Name: system_user_positions; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_user_positions ( + user_id integer NOT NULL, + position_id integer NOT NULL +); + + +ALTER TABLE public.system_user_positions OWNER TO tao; + +-- +-- Name: TABLE system_user_positions; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_user_positions IS '用户岗位关联表'; + + +-- +-- Name: COLUMN system_user_positions.user_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_user_positions.user_id IS '用户ID'; + + +-- +-- Name: COLUMN system_user_positions.position_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_user_positions.position_id IS '岗位ID'; + + +-- +-- Name: system_user_roles; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_user_roles ( + user_id integer NOT NULL, + role_id integer NOT NULL +); + + +ALTER TABLE public.system_user_roles OWNER TO tao; + +-- +-- Name: TABLE system_user_roles; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_user_roles IS '用户角色关联表'; + + +-- +-- Name: COLUMN system_user_roles.user_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_user_roles.user_id IS '用户ID'; + + +-- +-- Name: COLUMN system_user_roles.role_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_user_roles.role_id IS '角色ID'; + + +-- +-- Name: system_users; Type: TABLE; Schema: public; Owner: tao +-- + +CREATE TABLE public.system_users ( + username character varying(32) NOT NULL, + password character varying(255) NOT NULL, + name character varying(32) NOT NULL, + mobile character varying(20), + email character varying(64), + gender character varying(1), + avatar character varying(500), + is_superuser boolean NOT NULL, + last_login timestamp with time zone, + dept_id integer, + creator_id integer, + id integer NOT NULL, + status boolean NOT NULL, + description text, + created_at timestamp without time zone NOT NULL, + updated_at timestamp without time zone NOT NULL +); + + +ALTER TABLE public.system_users OWNER TO tao; + +-- +-- Name: TABLE system_users; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON TABLE public.system_users IS '用户表'; + + +-- +-- Name: COLUMN system_users.username; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.username IS '用户名/登录账号'; + + +-- +-- Name: COLUMN system_users.password; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.password IS '密码哈希'; + + +-- +-- Name: COLUMN system_users.name; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.name IS '昵称'; + + +-- +-- Name: COLUMN system_users.mobile; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.mobile IS '手机号'; + + +-- +-- Name: COLUMN system_users.email; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.email IS '邮箱'; + + +-- +-- Name: COLUMN system_users.gender; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.gender IS '性别(0:男 1:女 2:未知)'; + + +-- +-- Name: COLUMN system_users.avatar; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.avatar IS '头像URL地址'; + + +-- +-- Name: COLUMN system_users.is_superuser; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.is_superuser IS '是否超管'; + + +-- +-- Name: COLUMN system_users.last_login; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.last_login IS '最后登录时间'; + + +-- +-- Name: COLUMN system_users.dept_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.dept_id IS '部门ID'; + + +-- +-- Name: COLUMN system_users.creator_id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.creator_id IS '创建人ID'; + + +-- +-- Name: COLUMN system_users.id; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.id IS '主键ID'; + + +-- +-- Name: COLUMN system_users.status; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.status IS '是否启用(True:启用 False:禁用)'; + + +-- +-- Name: COLUMN system_users.description; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.description IS '备注说明'; + + +-- +-- Name: COLUMN system_users.created_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.created_at IS '创建时间'; + + +-- +-- Name: COLUMN system_users.updated_at; Type: COMMENT; Schema: public; Owner: tao +-- + +COMMENT ON COLUMN public.system_users.updated_at IS '更新时间'; + + +-- +-- Name: system_users_id_seq; Type: SEQUENCE; Schema: public; Owner: tao +-- + +CREATE SEQUENCE public.system_users_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER SEQUENCE public.system_users_id_seq OWNER TO tao; + +-- +-- Name: system_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: tao +-- + +ALTER SEQUENCE public.system_users_id_seq OWNED BY public.system_users.id; + + +-- +-- Name: application_myapp id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.application_myapp ALTER COLUMN id SET DEFAULT nextval('public.application_myapp_id_seq'::regclass); + + +-- +-- Name: example_demo id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.example_demo ALTER COLUMN id SET DEFAULT nextval('public.example_demo_id_seq'::regclass); + + +-- +-- Name: monitor_job id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.monitor_job ALTER COLUMN id SET DEFAULT nextval('public.monitor_job_id_seq'::regclass); + + +-- +-- Name: monitor_job_log id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.monitor_job_log ALTER COLUMN id SET DEFAULT nextval('public.monitor_job_log_id_seq'::regclass); + + +-- +-- Name: system_config id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_config ALTER COLUMN id SET DEFAULT nextval('public.system_config_id_seq'::regclass); + + +-- +-- Name: system_dept id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dept ALTER COLUMN id SET DEFAULT nextval('public.system_dept_id_seq'::regclass); + + +-- +-- Name: system_dict_data id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_data ALTER COLUMN id SET DEFAULT nextval('public.system_dict_data_id_seq'::regclass); + + +-- +-- Name: system_dict_type id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_type ALTER COLUMN id SET DEFAULT nextval('public.system_dict_type_id_seq'::regclass); + + +-- +-- Name: system_log id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_log ALTER COLUMN id SET DEFAULT nextval('public.system_log_id_seq'::regclass); + + +-- +-- Name: system_menu id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_menu ALTER COLUMN id SET DEFAULT nextval('public.system_menu_id_seq'::regclass); + + +-- +-- Name: system_notice id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_notice ALTER COLUMN id SET DEFAULT nextval('public.system_notice_id_seq'::regclass); + + +-- +-- Name: system_position id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_position ALTER COLUMN id SET DEFAULT nextval('public.system_position_id_seq'::regclass); + + +-- +-- Name: system_role id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role ALTER COLUMN id SET DEFAULT nextval('public.system_role_id_seq'::regclass); + + +-- +-- Name: system_users id; Type: DEFAULT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_users ALTER COLUMN id SET DEFAULT nextval('public.system_users_id_seq'::regclass); + + +-- +-- Data for Name: application_myapp; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.application_myapp (name, access_url, icon_url, creator_id, id, status, description, created_at, updated_at) FROM stdin; +\. + + +-- +-- Data for Name: example_demo; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.example_demo (name, creator_id, id, status, description, created_at, updated_at) FROM stdin; +\. + + +-- +-- Data for Name: monitor_job; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.monitor_job (name, jobstore, executor, trigger, trigger_args, func, args, kwargs, "coalesce", max_instances, start_date, end_date, creator_id, id, status, description, created_at, updated_at) FROM stdin; +系统默认(无参) default default cron 0 0 12 * * ? scheduler_test.job \N \N f 1 \N \N 1 1 f \N 2025-09-06 21:16:21.463022 2025-09-06 21:16:21.463023 +系统默认(有参) default default cron 0 0 12 * * ? scheduler_test.job test \N f 1 \N \N 1 2 f \N 2025-09-06 21:16:21.463023 2025-09-06 21:16:21.463024 +系统默认(多参) default default cron 0 0 12 * * ? scheduler_test.job new {"test": 111} f 1 \N \N 1 3 f \N 2025-09-06 21:16:21.463024 2025-09-06 21:16:21.463024 +\. + + +-- +-- Data for Name: monitor_job_log; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.monitor_job_log (id, job_name, job_group, job_executor, invoke_target, job_args, job_kwargs, job_trigger, job_message, exception_info, job_id) FROM stdin; +\. + + +-- +-- Data for Name: system_config; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_config (config_name, config_key, config_value, config_type, creator_id, id, status, description, created_at, updated_at) FROM stdin; +网站名称 sys_web_title FastAPI Vue3 Admin t 1 1 t 网站名称 2025-09-06 21:16:21.453453 2025-09-06 21:16:21.453454 +网站描述 sys_web_description FastAPI Vue3 Admin 是完全开源的权限管理系统 t 1 2 t 网站描述 2025-09-06 21:16:21.453455 2025-09-06 21:16:21.453455 +网页图标 sys_web_favicon https://service.fastapiadmin.com/api/v1/static/image/favicon.png t 1 3 t 网页图标 2025-09-06 21:16:21.453455 2025-09-06 21:16:21.453456 +网站Logo sys_web_logo https://service.fastapiadmin.com/api/v1/static/image/logo.png t 1 4 t 网站Logo 2025-09-06 21:16:21.453456 2025-09-06 21:16:21.453457 +登录背景 sys_login_background https://service.fastapiadmin.com/api/v1/static/image/background.svg t 1 5 t 登录背景 2025-09-06 21:16:21.453457 2025-09-06 21:16:21.453458 +版权信息 sys_web_copyright Copyright © 2025-2026 service.fastapiadmin.com 版权所有 t 1 6 t 版权信息 2025-09-06 21:16:21.453458 2025-09-06 21:16:21.453459 +备案信息 sys_keep_record 陕ICP备2025069493号-1 t 1 7 t 备案信息 2025-09-06 21:16:21.453459 2025-09-06 21:16:21.453459 +帮助文档 sys_help_doc https://service.fastapiadmin.com t 1 8 t 帮助文档 2025-09-06 21:16:21.45346 2025-09-06 21:16:21.45346 +隐私政策 sys_web_privacy https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE t 1 9 t 隐私政策 2025-09-06 21:16:21.453461 2025-09-06 21:16:21.453461 +用户协议 sys_web_clause https://github.com/1014TaoTao/fastapi_vue3_admin/blob/master/LICENSE t 1 10 t 用户协议 2025-09-06 21:16:21.453461 2025-09-06 21:16:21.453462 +源码代码 sys_git_code https://github.com/1014TaoTao/fastapi_vue3_admin.git t 1 11 t 源码代码 2025-09-06 21:16:21.453462 2025-09-06 21:16:21.453463 +项目版本 sys_web_version 2.0.0 t 1 12 t 项目版本 2025-09-06 21:16:21.453463 2025-09-06 21:16:21.453463 +\. + + +-- +-- Data for Name: system_dept; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_dept (name, "order", parent_id, id, status, description, created_at, updated_at) FROM stdin; +集团总公司 1 \N 1 t 集团总公司 2025-09-06 21:16:21.433496 2025-09-06 21:16:21.433499 +西安分公司 1 1 2 t 西安分公司 2025-09-06 21:16:21.4335 2025-09-06 21:16:21.4335 +深圳分公司 2 1 3 t 深圳分公司 2025-09-06 21:16:21.433501 2025-09-06 21:16:21.433501 +开发组 1 2 4 t 开发组 2025-09-06 21:16:21.433502 2025-09-06 21:16:21.433502 +测试组 2 2 5 t 测试组 2025-09-06 21:16:21.433502 2025-09-06 21:16:21.433503 +演示组 3 2 6 t 演示组 2025-09-06 21:16:21.433503 2025-09-06 21:16:21.433503 +销售部 1 3 7 t 销售部 2025-09-06 21:16:21.433504 2025-09-06 21:16:21.433504 +市场部 2 3 8 t 市场部 2025-09-06 21:16:21.433504 2025-09-06 21:16:21.433505 +财务部 3 3 9 t 财务部 2025-09-06 21:16:21.433505 2025-09-06 21:16:21.433505 +研发部 4 3 10 t 研发部 2025-09-06 21:16:21.433506 2025-09-06 21:16:21.433506 +运维部 5 3 11 t 研发部 2025-09-06 21:16:21.433506 2025-09-06 21:16:21.433507 +\. + + +-- +-- Data for Name: system_dict_data; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, dict_type_id, creator_id, id, status, description, created_at, updated_at) FROM stdin; +1 男 0 sys_user_sex blue \N t \N 1 1 t 性别男 2025-09-06 21:16:21.460802 2025-09-06 21:16:21.460803 +2 女 1 sys_user_sex pink \N f \N 1 2 t 性别女 2025-09-06 21:16:21.460804 2025-09-06 21:16:21.460804 +3 未知 2 sys_user_sex red \N f \N 1 3 t 性别未知 2025-09-06 21:16:21.460805 2025-09-06 21:16:21.460805 +1 启用 1 sys_common_status primary f \N 1 4 t 启用状态 2025-09-06 21:16:21.460806 2025-09-06 21:16:21.460806 +2 停用 0 sys_common_status danger f \N 1 5 t 停用状态 2025-09-06 21:16:21.460806 2025-09-06 21:16:21.460807 +1 是 1 sys_yes_no primary t \N 1 6 t 是 2025-09-06 21:16:21.460807 2025-09-06 21:16:21.460807 +2 否 0 sys_yes_no danger f \N 1 7 t 否 2025-09-06 21:16:21.460808 2025-09-06 21:16:21.460808 +99 其他 0 sys_oper_type info f \N 1 8 t 其他操作 2025-09-06 21:16:21.460808 2025-09-06 21:16:21.460809 +1 新增 1 sys_oper_type info f \N 1 9 t 新增操作 2025-09-06 21:16:21.460809 2025-09-06 21:16:21.460809 +2 修改 2 sys_oper_type info f \N 1 10 t 修改操作 2025-09-06 21:16:21.46081 2025-09-06 21:16:21.46081 +3 删除 3 sys_oper_type danger f \N 1 11 t 删除操作 2025-09-06 21:16:21.46081 2025-09-06 21:16:21.460811 +4 分配权限 4 sys_oper_type primary f \N 1 12 t 授权操作 2025-09-06 21:16:21.460811 2025-09-06 21:16:21.460811 +5 导出 5 sys_oper_type warning f \N 1 13 t 导出操作 2025-09-06 21:16:21.460812 2025-09-06 21:16:21.460812 +6 导入 6 sys_oper_type warning f \N 1 14 t 导入操作 2025-09-06 21:16:21.460812 2025-09-06 21:16:21.460813 +7 强退 7 sys_oper_type danger f \N 1 15 t 强退操作 2025-09-06 21:16:21.460813 2025-09-06 21:16:21.460813 +8 生成代码 8 sys_oper_type warning f \N 1 16 t 生成操作 2025-09-06 21:16:21.460814 2025-09-06 21:16:21.460814 +9 清空数据 9 sys_oper_type danger f \N 1 17 t 清空操作 2025-09-06 21:16:21.460814 2025-09-06 21:16:21.460815 +1 通知 1 sys_notice_type blue warning t \N 1 18 t 通知 2025-09-06 21:16:21.460815 2025-09-06 21:16:21.460815 +2 公告 2 sys_notice_type orange success f \N 1 19 t 公告 2025-09-06 21:16:21.460816 2025-09-06 21:16:21.460816 +1 默认(Memory) default sys_job_store \N t \N 1 20 t 默认分组 2025-09-06 21:16:21.460816 2025-09-06 21:16:21.460817 +2 数据库(Sqlalchemy) sqlalchemy sys_job_store \N f \N 1 21 t 数据库分组 2025-09-06 21:16:21.460817 2025-09-06 21:16:21.460817 +3 数据库(Redis) redis sys_job_store \N f \N 1 22 t reids分组 2025-09-06 21:16:21.460818 2025-09-06 21:16:21.460818 +1 线程池 default sys_job_executor \N f \N 1 23 t 线程池 2025-09-06 21:16:21.460818 2025-09-06 21:16:21.460819 +2 进程池 processpool sys_job_executor \N f \N 1 24 t 进程池 2025-09-06 21:16:21.460819 2025-09-06 21:16:21.460819 +1 演示函数 scheduler_test.job sys_job_function \N t \N 1 25 t 演示函数 2025-09-06 21:16:21.46082 2025-09-06 21:16:21.46082 +1 指定日期(date) date sys_job_trigger \N t \N 1 26 t 指定日期任务触发器 2025-09-06 21:16:21.46082 2025-09-06 21:16:21.460821 +2 间隔触发器(interval) interval sys_job_trigger \N f \N 1 27 t 间隔触发器任务触发器 2025-09-06 21:16:21.460821 2025-09-06 21:16:21.460821 +3 cron表达式 cron sys_job_trigger \N f \N 1 28 t 间隔触发器任务触发器 2025-09-06 21:16:21.460822 2025-09-06 21:16:21.460822 +1 默认(default) default sys_list_class \N t \N 1 29 t 默认表格回显样式 2025-09-06 21:16:21.460822 2025-09-06 21:16:21.460823 +2 主要(primary) primary sys_list_class \N f \N 1 30 t 主要表格回显样式 2025-09-06 21:16:21.460823 2025-09-06 21:16:21.460823 +3 成功(success) success sys_list_class \N f \N 1 31 t 成功表格回显样式 2025-09-06 21:16:21.460824 2025-09-06 21:16:21.460824 +4 信息(info) info sys_list_class \N f \N 1 32 t 信息表格回显样式 2025-09-06 21:16:21.460824 2025-09-06 21:16:21.460825 +5 警告(warning) warning sys_list_class \N f \N 1 33 t 警告表格回显样式 2025-09-06 21:16:21.460825 2025-09-06 21:16:21.460825 +6 危险(danger) danger sys_list_class \N f \N 1 34 t 危险表格回显样式 2025-09-06 21:16:21.460826 2025-09-06 21:16:21.460826 +\. + + +-- +-- Data for Name: system_dict_type; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_dict_type (dict_name, dict_type, creator_id, id, status, description, created_at, updated_at) FROM stdin; +用户性别 sys_user_sex 1 1 t 用户性别列表 2025-09-06 21:16:21.456061 2025-09-06 21:16:21.456062 +系统是否 sys_yes_no 1 2 t 系统是否列表 2025-09-06 21:16:21.456063 2025-09-06 21:16:21.456063 +系统状态 sys_common_status 1 3 t 系统状态 2025-09-06 21:16:21.456063 2025-09-06 21:16:21.456064 +通知类型 sys_notice_type 1 4 t 通知类型列表 2025-09-06 21:16:21.456064 2025-09-06 21:16:21.456065 +操作类型 sys_oper_type 1 5 t 操作类型列表 2025-09-06 21:16:21.456065 2025-09-06 21:16:21.456065 +任务存储器 sys_job_store 1 6 t 任务分组列表 2025-09-06 21:16:21.456066 2025-09-06 21:16:21.456066 +任务执行器 sys_job_executor 1 7 t 任务执行器列表 2025-09-06 21:16:21.456066 2025-09-06 21:16:21.456067 +任务函数 sys_job_function 1 8 t 任务函数列表 2025-09-06 21:16:21.456067 2025-09-06 21:16:21.456067 +任务触发器 sys_job_trigger 1 9 t 任务触发器列表 2025-09-06 21:16:21.456068 2025-09-06 21:16:21.456068 +表格回显样式 sys_list_class 1 10 t 表格回显样式列表 2025-09-06 21:16:21.456068 2025-09-06 21:16:21.456068 +\. + + +-- +-- Data for Name: system_log; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_log (type, request_path, request_method, request_payload, request_ip, login_location, request_os, request_browser, response_code, response_json, process_time, creator_id, id, status, description, created_at, updated_at) FROM stdin; +\. + + +-- +-- Data for Name: system_menu; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_menu (name, type, "order", permission, icon, route_name, route_path, component_path, redirect, hidden, keep_alive, always_show, title, params, affix, parent_id, id, status, description, created_at, updated_at) FROM stdin; +仪表盘 1 1 client Dashboard /dashboard \N /dashboard/workplace f t t 仪表盘 null f \N 1 t 初始化数据 2025-09-06 21:16:21.442184 2025-09-06 21:16:21.442187 +工作台 2 1 dashboard:workplace:query homepage Workplace /dashboard/workplace dashboard/workplace \N f t f 工作台 null t 1 2 t 初始化数据 2025-09-06 21:16:21.442188 2025-09-06 21:16:21.442188 +分析页 2 2 dashboard:analysis:query el-icon-PieChart Analysis /dashboard/analysis dashboard/analysis \N f t f 分析页 null f 1 3 t 初始化数据 2025-09-06 21:16:21.442189 2025-09-06 21:16:21.442189 +系统管理 1 2 \N system System /system \N /system/menu f t f 系统管理 null f \N 4 t 初始化数据 2025-09-06 21:16:21.442189 2025-09-06 21:16:21.44219 +菜单管理 2 1 system:menu:query menu Menu /system/menu system/menu/index \N f t f 菜单管理 null f 4 5 t 初始化数据 2025-09-06 21:16:21.44219 2025-09-06 21:16:21.44219 +部门管理 2 2 system:dept:query tree Dept /system/dept system/dept/index \N f t f 部门管理 null f 4 6 t 初始化数据 2025-09-06 21:16:21.442191 2025-09-06 21:16:21.442191 +岗位管理 2 3 system:position:query el-icon-Coordinate Position /system/position system/position/index \N f t f 岗位管理 null f 4 7 t 初始化数据 2025-09-06 21:16:21.442192 2025-09-06 21:16:21.442192 +角色管理 2 4 system:role:query role Role /system/role system/role/index \N f t f 角色管理 null f 4 8 t 初始化数据 2025-09-06 21:16:21.442192 2025-09-06 21:16:21.442193 +用户管理 2 5 system:user:query el-icon-User User /system/user system/user/index \N f t f 用户管理 null f 4 9 t 初始化数据 2025-09-06 21:16:21.442193 2025-09-06 21:16:21.442193 +日志管理 2 6 system:log:query el-icon-Aim Log /system/log system/log/index \N f t f 日志管理 null f 4 10 t 初始化数据 2025-09-06 21:16:21.442194 2025-09-06 21:16:21.442194 +公告管理 2 7 system:notice:query bell Notice /system/notice system/notice/index \N f t f 公告管理 null f 4 11 t 初始化数据 2025-09-06 21:16:21.442195 2025-09-06 21:16:21.442195 +配置管理 2 8 system:config:query setting Config /system/config system/config/index \N f t f 配置管理 null f 4 12 t 初始化数据 2025-09-06 21:16:21.442195 2025-09-06 21:16:21.442196 +字典管理 2 9 system:dict_type:query dict Dict /system/dict system/dict/index \N f t f 字典管理 null f 4 13 t 初始化数据 2025-09-06 21:16:21.442196 2025-09-06 21:16:21.442196 +创建菜单 3 1 system:menu:create \N \N \N \N \N f t f 创建菜单 null f 5 14 t 初始化数据 2025-09-06 21:16:21.442197 2025-09-06 21:16:21.442197 +修改菜单 3 2 system:menu:update \N \N \N \N \N f t f 修改菜单 null f 5 15 t 初始化数据 2025-09-06 21:16:21.442197 2025-09-06 21:16:21.442198 +删除菜单 3 3 system:menu:delete \N \N \N \N \N f t f 删除菜单 null f 5 16 t 初始化数据 2025-09-06 21:16:21.442198 2025-09-06 21:16:21.442198 +批量修改菜单状态 3 4 system:menu:patch \N \N \N \N \N f t f 批量修改菜单状态 null f 5 17 t 初始化数据 2025-09-06 21:16:21.442199 2025-09-06 21:16:21.442199 +创建部门 3 1 system:dept:create \N \N \N \N \N f t f 创建部门 null f 6 18 t 初始化数据 2025-09-06 21:16:21.4422 2025-09-06 21:16:21.4422 +修改部门 3 2 system:dept:update \N \N \N \N \N f t f 修改部门 null f 6 19 t 初始化数据 2025-09-06 21:16:21.4422 2025-09-06 21:16:21.442201 +删除部门 3 3 system:dept:delete \N \N \N \N \N f t f 删除部门 null f 6 20 t 初始化数据 2025-09-06 21:16:21.442201 2025-09-06 21:16:21.442201 +批量修改部门状态 3 4 system:dept:patch \N \N \N \N \N f t f 批量修改部门状态 null f 6 21 t 初始化数据 2025-09-06 21:16:21.442202 2025-09-06 21:16:21.442202 +创建岗位 3 1 system:position:create \N \N \N \N \N f t f 创建岗位 null f 7 22 t 初始化数据 2025-09-06 21:16:21.442202 2025-09-06 21:16:21.442203 +修改岗位 3 2 system:position:update \N \N \N \N \N f t f 修改岗位 null f 7 23 t 初始化数据 2025-09-06 21:16:21.442203 2025-09-06 21:16:21.442203 +删除岗位 3 3 system:position:delete \N \N \N \N \N f t f 修改岗位 null f 7 24 t 初始化数据 2025-09-06 21:16:21.442204 2025-09-06 21:16:21.442204 +批量修改岗位状态 3 4 system:position:patch \N \N \N \N \N f t f 批量修改岗位状态 null f 7 25 t 初始化数据 2025-09-06 21:16:21.442205 2025-09-06 21:16:21.442205 +岗位导出 3 5 system:position:export \N \N \N \N \N f t f 岗位导出 null f 7 26 t 初始化数据 2025-09-06 21:16:21.442205 2025-09-06 21:16:21.442206 +创建角色 3 1 system:role:create \N \N \N \N \N f t f 创建角色 null f 8 27 t 初始化数据 2025-09-06 21:16:21.442206 2025-09-06 21:16:21.442206 +修改角色 3 2 system:role:update \N \N \N \N \N f t f 修改角色 null f 8 28 t 初始化数据 2025-09-06 21:16:21.442207 2025-09-06 21:16:21.442207 +删除角色 3 3 system:role:delete \N \N \N \N \N f t f 删除角色 null f 8 29 t 初始化数据 2025-09-06 21:16:21.442207 2025-09-06 21:16:21.442208 +批量修改角色状态 3 4 system:role:patch \N \N \N \N \N f t f 批量修改角色状态 null f 8 30 t 初始化数据 2025-09-06 21:16:21.442208 2025-09-06 21:16:21.442208 +设置角色权限 3 8 system:role:permission \N \N \N \N \N f t f 设置角色权限 null f 7 31 t 初始化数据 2025-09-06 21:16:21.442209 2025-09-06 21:16:21.442209 +角色导出 3 6 system:role:export \N \N \N \N \N f t f 角色导出 null f 8 32 t 初始化数据 2025-09-06 21:16:21.442209 2025-09-06 21:16:21.44221 +创建用户 3 1 system:user:create \N \N \N \N \N f t f 创建用户 null f 9 33 t 初始化数据 2025-09-06 21:16:21.44221 2025-09-06 21:16:21.44221 +修改用户 3 2 system:user:update \N \N \N \N \N f t f 修改用户 null f 9 34 t 初始化数据 2025-09-06 21:16:21.442211 2025-09-06 21:16:21.442211 +删除用户 3 3 system:user:delete \N \N \N \N \N f t f 删除用户 null f 9 35 t 初始化数据 2025-09-06 21:16:21.442212 2025-09-06 21:16:21.442212 +批量修改用户状态 3 4 system:user:patch \N \N \N \N \N f t f 批量修改用户状态 null f 9 36 t 初始化数据 2025-09-06 21:16:21.442212 2025-09-06 21:16:21.442213 +导出用户 3 5 system:user:export \N \N \N \N \N f t f 导出用户 null f 9 37 t 初始化数据 2025-09-06 21:16:21.442213 2025-09-06 21:16:21.442213 +导入用户 3 6 system:user:import \N \N \N \N \N f t f 导入用户 null f 9 38 t 初始化数据 2025-09-06 21:16:21.442214 2025-09-06 21:16:21.442214 +日志删除 3 1 system:operation_log:delete \N \N \N \N \N f t f 日志删除 null f 10 39 t 初始化数据 2025-09-06 21:16:21.442214 2025-09-06 21:16:21.442215 +日志导出 3 2 system:operation_log:export \N \N \N \N \N f t f 日志导出 null f 10 40 t 初始化数据 2025-09-06 21:16:21.442215 2025-09-06 21:16:21.442216 +公告创建 3 1 system:notice:create \N \N \N \N \N f t f 公告创建 null f 11 41 t 初始化数据 2025-09-06 21:16:21.442216 2025-09-06 21:16:21.442217 +公告修改 3 2 system:notice:update \N \N \N \N \N f t f 修改用户 null f 11 42 t 初始化数据 2025-09-06 21:16:21.442217 2025-09-06 21:16:21.442217 +公告删除 3 3 system:notice:delete \N \N \N \N \N f t f 公告删除 null f 11 43 t 初始化数据 2025-09-06 21:16:21.442218 2025-09-06 21:16:21.442218 +公告导出 3 4 system:notice:export \N \N \N \N \N f t f 公告导出 null f 11 44 t 初始化数据 2025-09-06 21:16:21.442218 2025-09-06 21:16:21.442219 +公告批量修改状态 3 5 system:notice:patch \N \N \N \N \N f t f 公告批量修改状态 null f 11 45 t 初始化数据 2025-09-06 21:16:21.442219 2025-09-06 21:16:21.442219 +创建配置 3 1 system:config:create \N \N \N \N \N f t f 创建配置 null f 12 46 t 初始化数据 2025-09-06 21:16:21.44222 2025-09-06 21:16:21.44222 +修改配置 3 2 system:config:update \N \N \N \N \N f t f 修改配置 null f 12 47 t 初始化数据 2025-09-06 21:16:21.442221 2025-09-06 21:16:21.442221 +删除配置 3 3 system:config:delete \N \N \N \N \N f t f 删除配置 null f 12 48 t 初始化数据 2025-09-06 21:16:21.442221 2025-09-06 21:16:21.442222 +导出配置 3 4 system:config:export \N \N \N \N \N f t f 导出配置 null f 12 49 t 初始化数据 2025-09-06 21:16:21.442222 2025-09-06 21:16:21.442222 +配置上传 3 5 system:config:upload \N \N \N \N \N f t f 配置上传 null f 12 50 t 初始化数据 2025-09-06 21:16:21.442223 2025-09-06 21:16:21.442223 +创建字典类型 3 1 system:dict_type:create \N \N \N \N \N f t f 创建字典类型 null f 13 51 t 初始化数据 2025-09-06 21:16:21.442223 2025-09-06 21:16:21.442224 +修改字典类型 3 2 system:dict_type:update \N \N \N \N \N f t f 修改字典类型 null f 13 52 t 初始化数据 2025-09-06 21:16:21.442224 2025-09-06 21:16:21.442224 +删除字典类型 3 3 system:dict_type:delete \N \N \N \N \N f t f 删除字典类型 null f 13 53 t 初始化数据 2025-09-06 21:16:21.442225 2025-09-06 21:16:21.442225 +导出字典类型 3 4 system:dict_type:export \N \N \N \N \N f t f 导出字典类型 null f 13 54 t 初始化数据 2025-09-06 21:16:21.442226 2025-09-06 21:16:21.442226 +批量修改字典状态 3 5 system:dict_type:patch \N \N \N \N \N f t f 导出字典类型 null f 13 55 t 初始化数据 2025-09-06 21:16:21.442226 2025-09-06 21:16:21.442227 +字典数据查询 3 6 system:dict_data:query \N \N \N \N \N f t f 字典数据查询 null f 13 56 t 初始化数据 2025-09-06 21:16:21.442227 2025-09-06 21:16:21.442227 +创建字典数据 3 7 system:dict_data:create \N \N \N \N \N f t f 创建字典数据 null f 13 57 t 初始化数据 2025-09-06 21:16:21.442228 2025-09-06 21:16:21.442228 +修改字典数据 3 8 system:dict_data:update \N \N \N \N \N f t f 修改字典数据 null f 13 58 t 初始化数据 2025-09-06 21:16:21.442228 2025-09-06 21:16:21.442229 +删除字典数据 3 9 system:dict_data:delete \N \N \N \N \N f t f 删除字典数据 null f 13 59 t 初始化数据 2025-09-06 21:16:21.442229 2025-09-06 21:16:21.44223 +导出字典数据 3 10 system:dict_data:export \N \N \N \N \N f t f 导出字典数据 null f 13 60 t 初始化数据 2025-09-06 21:16:21.44223 2025-09-06 21:16:21.44223 +批量修改字典数据状态 3 11 system:dict_data:patch \N \N \N \N \N f t f 批量修改字典数据状态 null f 13 61 t 初始化数据 2025-09-06 21:16:21.442231 2025-09-06 21:16:21.442231 +监控管理 1 3 \N monitor Monitor /monitor \N /monitor/online f f f 监控管理 null f \N 62 t 初始化数据 2025-09-06 21:16:21.442231 2025-09-06 21:16:21.442232 +任务管理 2 1 monitor:job:query el-icon-DataLine Job /monitor/job monitor/job/index \N f t f 任务管理 null f 62 63 t 初始化数据 2025-09-06 21:16:21.442232 2025-09-06 21:16:21.442232 +创建任务 3 1 monitor:job:create \N \N \N \N \N f t f 创建任务 null f 63 64 t 初始化数据 2025-09-06 21:16:21.442233 2025-09-06 21:16:21.442233 +修改和操作任务 3 2 monitor:job:update \N \N \N \N \N f t f 修改和操作任务 null f 63 65 t 初始化数据 2025-09-06 21:16:21.442233 2025-09-06 21:16:21.442234 +删除和清除任务 3 3 monitor:job:delete \N \N \N \N \N f t f 删除和清除任务 null f 63 66 t 初始化数据 2025-09-06 21:16:21.442234 2025-09-06 21:16:21.442235 +导出定时任务 3 4 monitor:job:export \N \N \N \N \N f t f 导出定时任务 null f 63 67 t 初始化数据 2025-09-06 21:16:21.442235 2025-09-06 21:16:21.442235 +在线用户 2 2 monitor:online:query el-icon-Headset MonitorOnline /monitor/online monitor/online/index \N f f f 在线用户 null f 62 68 t 初始化数据 2025-09-06 21:16:21.442236 2025-09-06 21:16:21.442236 +在线用户强制下线 3 1 monitor:online:delete \N \N \N \N \N f f f 在线用户强制下线 null f 68 69 t 初始化数据 2025-09-06 21:16:21.442236 2025-09-06 21:16:21.442237 +服务器监控 2 3 monitor:server:query el-icon-Odometer MonitorServer /monitor/server monitor/server/index \N f f f 服务器监控 null f 62 70 t 初始化数据 2025-09-06 21:16:21.442237 2025-09-06 21:16:21.442237 +缓存监控 2 4 monitor:cache:query el-icon-Stopwatch MonitorCache /monitor/cache monitor/cache/index \N f f f 缓存监控 null f 62 71 t 初始化数据 2025-09-06 21:16:21.442238 2025-09-06 21:16:21.442238 +清除缓存 3 1 monitor:cache:delete \N \N \N \N \N f f f 清除缓存 null f 71 72 t 初始化数据 2025-09-06 21:16:21.442239 2025-09-06 21:16:21.442239 +公共模块 1 4 \N document Common /common \N /common/docs f f f 公共模块 null f \N 73 t 初始化数据 2025-09-06 21:16:21.442239 2025-09-06 21:16:21.44224 +接口管理 4 1 common:docs:query api Docs /common/docs common/docs/index \N f f f 接口管理 null f 73 74 t 初始化数据 2025-09-06 21:16:21.44224 2025-09-06 21:16:21.44224 +文档管理 4 2 common:redoc:query el-icon-Document Redoc /common/redoc common/redoc/index \N f f f 文档管理 null f 73 75 t 初始化数据 2025-09-06 21:16:21.442241 2025-09-06 21:16:21.442241 +演示模块 1 5 \N el-icon-Document Demo /demo \N /demo/example f f f 演示模块 null f \N 76 t 初始化数据 2025-09-06 21:16:21.442241 2025-09-06 21:16:21.442242 +示例管理 2 1 demo:example:query el-icon-DataLine Example /demo/example demo/example/index \N f t f 示例管理 null f 76 77 t 初始化数据 2025-09-06 21:16:21.442242 2025-09-06 21:16:21.442243 +创建示例 3 1 demo:example:create \N \N \N \N \N f t f 创建示例 null f 77 78 t 初始化数据 2025-09-06 21:16:21.442243 2025-09-06 21:16:21.442243 +更新示例 3 2 demo:example:update \N \N \N \N \N f t f 更新示例 null f 77 79 t 初始化数据 2025-09-06 21:16:21.442244 2025-09-06 21:16:21.442244 +删除示例 3 3 demo:example:delete \N \N \N \N \N f t f 删除示例 null f 77 80 t 初始化数据 2025-09-06 21:16:21.442244 2025-09-06 21:16:21.442245 +批量修改示例状态 3 4 demo:example:patch \N \N \N \N \N f t f 批量修改示例状态 null f 77 81 t 初始化数据 2025-09-06 21:16:21.442245 2025-09-06 21:16:21.442245 +导出示例 3 5 demo:example:export \N \N \N \N \N f t f 导出示例 null f 77 82 t 初始化数据 2025-09-06 21:16:21.442246 2025-09-06 21:16:21.442246 +导入示例 3 6 demo:example:import \N \N \N \N \N f t f 导入示例 null f 77 83 t 初始化数据 2025-09-06 21:16:21.442246 2025-09-06 21:16:21.442247 +下载导入示例模版 3 7 demo:example:download \N \N \N \N \N f t f 下载导入示例模版 null f 77 84 t 初始化数据 2025-09-06 21:16:21.442247 2025-09-06 21:16:21.442248 +应用管理 1 6 \N captcha Application /application \N /application/myapp f f f 应用管理 null f \N 85 t 初始化数据 2025-09-06 21:16:21.442248 2025-09-06 21:16:21.442248 +我的应用 2 1 application:myapp:query el-icon-DataLine ApplicationSystem /application/myapp application/myapp/index \N f t f 应用系统管理 null f 85 86 t 初始化数据 2025-09-06 21:16:21.442249 2025-09-06 21:16:21.442249 +创建应用 3 1 application:myapp:create \N \N \N \N \N f t f 创建应用 null f 86 87 t 初始化数据 2025-09-06 21:16:21.442249 2025-09-06 21:16:21.44225 +修改应用 3 2 application:myapp:update \N \N \N \N \N f t f 修改应用 null f 86 88 t 初始化数据 2025-09-06 21:16:21.44225 2025-09-06 21:16:21.44225 +删除应用 3 3 application:myapp:delete \N \N \N \N \N f t f 删除应用 null f 86 89 t 初始化数据 2025-09-06 21:16:21.442251 2025-09-06 21:16:21.442251 +批量修改应用状态 3 4 application:myapp:patch \N \N \N \N \N f t f 批量修改应用状态 null f 86 90 t 初始化数据 2025-09-06 21:16:21.442251 2025-09-06 21:16:21.442252 +资源管理 1 7 \N document Resource /resource \N /resource/file f f f 资源管理 null f \N 91 t 初始化数据 2025-09-06 21:16:21.442252 2025-09-06 21:16:21.442253 +文件管理 2 1 resource:file:query el-icon-Files ResourceFile /resource/file resource/file/index \N f t f 文件管理 null f 91 92 t 初始化数据 2025-09-06 21:16:21.442253 2025-09-06 21:16:21.442253 +文件上传 3 1 resource:file:upload \N \N \N \N \N f t f 文件上传 null f 92 93 t 初始化数据 2025-09-06 21:16:21.442254 2025-09-06 21:16:21.442254 +文件下载 3 2 resource:file:download \N \N \N \N \N f t f 文件下载 null f 92 94 t 初始化数据 2025-09-06 21:16:21.442254 2025-09-06 21:16:21.442255 +文件删除 3 3 resource:file:delete \N \N \N \N \N f t f 文件删除 null f 92 95 t 初始化数据 2025-09-06 21:16:21.442255 2025-09-06 21:16:21.442255 +文件移动 3 4 resource:file:move \N \N \N \N \N f t f 文件移动 null f 92 96 t 初始化数据 2025-09-06 21:16:21.442257 2025-09-06 21:16:21.442257 +文件复制 3 5 resource:file:copy \N \N \N \N \N f t f 文件复制 null f 92 97 t 初始化数据 2025-09-06 21:16:21.442257 2025-09-06 21:16:21.442258 +文件重命名 3 6 resource:file:rename \N \N \N \N \N f t f 文件重命名 null f 92 98 t 初始化数据 2025-09-06 21:16:21.442258 2025-09-06 21:16:21.442259 +创建目录 3 7 resource:file:create_dir \N \N \N \N \N f t f 创建目录 null f 92 99 t 初始化数据 2025-09-06 21:16:21.442259 2025-09-06 21:16:21.442259 +文件搜索 3 8 resource:file:search \N \N \N \N \N f t f 文件搜索 null f 92 100 t 初始化数据 2025-09-06 21:16:21.44226 2025-09-06 21:16:21.44226 +导出文件列表 3 9 resource:file:export \N \N \N \N \N f t f 导出文件列表 null f 92 101 t 初始化数据 2025-09-06 21:16:21.442261 2025-09-06 21:16:21.442261 +AI大模型 1 8 \N el-icon-DataLine AI /ai \N /ai/mcp f f f AI大模型 null f \N 102 t AI大模型管理 2025-09-06 21:16:21.442261 2025-09-06 21:16:21.442273 +MCP智能助手 2 1 ai:mcp:chat el-icon-DataLine MCP /ai/mcp ai/mcp/index \N f t f MCP智能助手 null f 102 103 t MCP智能助手 2025-09-06 21:16:21.442275 2025-09-06 21:16:21.442275 +智能对话 3 1 ai:mcp:chat \N \N \N \N \N f t f 智能对话 null f 103 104 t 智能对话 2025-09-06 21:16:21.442276 2025-09-06 21:16:21.442276 +查看状态 3 2 ai:mcp:status \N \N \N \N \N f t f 查看状态 null f 103 105 t 查看MCP服务器状态 2025-09-06 21:16:21.442277 2025-09-06 21:16:21.442277 +\. + + +-- +-- Data for Name: system_notice; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_notice (notice_title, notice_type, notice_content, creator_id, id, status, description, created_at, updated_at) FROM stdin; +系统更新 1 2099年9月9日,晚上12:00,系统更新 1 1 t 系统更新 2025-09-06 21:16:21.457751 2025-09-06 21:16:21.457752 +系统维护 2 2099年9月9日,晚上12:00,系统维护 1 2 t 系统维护 2025-09-06 21:16:21.457753 2025-09-06 21:16:21.457753 +系统更新完成 1 2099年9月9日,晚上12:00,系统更新完成 1 3 f 系统更新完成 2025-09-06 21:16:21.457754 2025-09-06 21:16:21.457754 +系统维护完成 2 2099年9月9日,晚上12:00,系统维护完成 1 4 f 系统维护完成 2025-09-06 21:16:21.457754 2025-09-06 21:16:21.457755 +\. + + +-- +-- Data for Name: system_position; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_position (name, "order", creator_id, id, status, description, created_at, updated_at) FROM stdin; +董事长岗 1 1 1 t 董事长岗位 2025-09-06 21:16:21.450888 2025-09-06 21:16:21.450889 +运营岗 2 1 2 t 运营岗位 2025-09-06 21:16:21.45089 2025-09-06 21:16:21.45089 +销售岗 3 1 3 t 销售岗 2025-09-06 21:16:21.450891 2025-09-06 21:16:21.450891 +人事行政岗 4 1 4 t 人事行政岗 2025-09-06 21:16:21.450891 2025-09-06 21:16:21.450892 +开发岗 5 1 5 t 开发岗 2025-09-06 21:16:21.450892 2025-09-06 21:16:21.450892 +测试岗 6 1 6 t 测试岗 2025-09-06 21:16:21.450893 2025-09-06 21:16:21.450893 +演示岗 7 1 7 t 演示岗 2025-09-06 21:16:21.450893 2025-09-06 21:16:21.450894 +\. + + +-- +-- Data for Name: system_role; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_role (name, code, "order", data_scope, creator_id, id, status, description, created_at, updated_at) FROM stdin; +管理员角色 \N 1 4 1 1 t 管理员 2025-09-06 21:16:21.449223 2025-09-06 21:16:21.449224 +普通角色 \N 2 1 1 2 t 普通角色 2025-09-06 21:16:21.449225 2025-09-06 21:16:21.449225 +\. + + +-- +-- Data for Name: system_role_depts; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_role_depts (role_id, dept_id) FROM stdin; +1 1 +2 1 +2 6 +\. + + +-- +-- Data for Name: system_role_menus; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_role_menus (role_id, menu_id) FROM stdin; +1 1 +1 2 +1 3 +1 4 +1 5 +1 6 +1 7 +1 8 +1 9 +1 10 +1 11 +1 12 +1 13 +1 14 +1 15 +1 16 +1 17 +1 18 +1 19 +1 20 +1 21 +1 22 +1 23 +1 24 +1 25 +1 26 +1 27 +1 28 +1 29 +1 30 +1 31 +1 32 +1 33 +1 34 +1 35 +1 36 +1 37 +1 38 +1 39 +1 40 +1 41 +1 42 +1 43 +1 44 +1 45 +1 46 +1 47 +1 48 +1 49 +1 50 +1 51 +1 52 +1 53 +1 54 +1 55 +1 56 +1 57 +1 58 +1 59 +1 60 +1 61 +1 62 +1 63 +1 64 +1 65 +1 66 +1 67 +1 68 +1 69 +1 70 +1 71 +1 72 +1 73 +1 74 +1 75 +1 76 +1 77 +1 78 +1 79 +1 80 +1 81 +1 82 +1 83 +1 84 +1 85 +1 86 +1 87 +1 88 +1 89 +1 90 +1 91 +1 92 +1 93 +1 94 +1 95 +1 96 +1 97 +1 98 +1 99 +1 100 +1 101 +1 102 +1 103 +1 104 +1 105 +2 1 +2 2 +\. + + +-- +-- Data for Name: system_user_positions; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_user_positions (user_id, position_id) FROM stdin; +1 5 +2 7 +3 1 +\. + + +-- +-- Data for Name: system_user_roles; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_user_roles (user_id, role_id) FROM stdin; +1 1 +2 1 +3 1 +\. + + +-- +-- Data for Name: system_users; Type: TABLE DATA; Schema: public; Owner: tao +-- + +COPY public.system_users (username, password, name, mobile, email, gender, avatar, is_superuser, last_login, dept_id, creator_id, id, status, description, created_at, updated_at) FROM stdin; +superadmin $2b$12$/Df5YczDGF41zCh2F8Xbu.yHTJXGm3tONgsXz1KLUdG0mtpKUOLD2 超级管理员 15382112620 948080782@qq.com 1 https://service.fastapiadmin.com/api/v1/static/image/avatar.png t \N 1 \N 1 t 超级管理员 2025-09-06 21:16:21.447219 2025-09-06 21:16:21.447221 +admin $2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa 管理员 15382112222 admin@qq.com 0 https://service.fastapiadmin.com/api/v1/static/image/avatar.png f \N 1 1 2 t 管理员 2025-09-06 21:16:21.447221 2025-09-06 21:16:21.447222 +demo $2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa 演示用户 15382112121 demo@qq.com 1 https://service.fastapiadmin.com/api/v1/static/image/avatar.png f \N 6 1 3 t 演示用户 2025-09-06 21:16:21.447222 2025-09-06 21:16:21.447223 +\. + + +-- +-- Name: application_myapp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.application_myapp_id_seq', 1, false); + + +-- +-- Name: example_demo_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.example_demo_id_seq', 1, false); + + +-- +-- Name: monitor_job_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.monitor_job_id_seq', 3, true); + + +-- +-- Name: monitor_job_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.monitor_job_log_id_seq', 1, false); + + +-- +-- Name: system_config_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_config_id_seq', 12, true); + + +-- +-- Name: system_dept_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_dept_id_seq', 1, false); + + +-- +-- Name: system_dict_data_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_dict_data_id_seq', 1, false); + + +-- +-- Name: system_dict_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_dict_type_id_seq', 1, false); + + +-- +-- Name: system_log_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_log_id_seq', 1, false); + + +-- +-- Name: system_menu_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_menu_id_seq', 1, false); + + +-- +-- Name: system_notice_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_notice_id_seq', 1, false); + + +-- +-- Name: system_position_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_position_id_seq', 7, true); + + +-- +-- Name: system_role_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_role_id_seq', 1, false); + + +-- +-- Name: system_users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: tao +-- + +SELECT pg_catalog.setval('public.system_users_id_seq', 1, false); + + +-- +-- Name: application_myapp application_myapp_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.application_myapp + ADD CONSTRAINT application_myapp_name_key UNIQUE (name); + + +-- +-- Name: application_myapp application_myapp_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.application_myapp + ADD CONSTRAINT application_myapp_pkey PRIMARY KEY (id); + + +-- +-- Name: example_demo example_demo_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.example_demo + ADD CONSTRAINT example_demo_pkey PRIMARY KEY (id); + + +-- +-- Name: monitor_job_log monitor_job_log_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.monitor_job_log + ADD CONSTRAINT monitor_job_log_pkey PRIMARY KEY (id); + + +-- +-- Name: monitor_job monitor_job_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.monitor_job + ADD CONSTRAINT monitor_job_pkey PRIMARY KEY (id); + + +-- +-- Name: system_config system_config_config_key_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_config + ADD CONSTRAINT system_config_config_key_key UNIQUE (config_key); + + +-- +-- Name: system_config system_config_config_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_config + ADD CONSTRAINT system_config_config_name_key UNIQUE (config_name); + + +-- +-- Name: system_config system_config_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_config + ADD CONSTRAINT system_config_pkey PRIMARY KEY (id); + + +-- +-- Name: system_dept system_dept_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dept + ADD CONSTRAINT system_dept_name_key UNIQUE (name); + + +-- +-- Name: system_dept system_dept_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dept + ADD CONSTRAINT system_dept_pkey PRIMARY KEY (id); + + +-- +-- Name: system_dict_data system_dict_data_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_data + ADD CONSTRAINT system_dict_data_pkey PRIMARY KEY (id); + + +-- +-- Name: system_dict_type system_dict_type_dict_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_type + ADD CONSTRAINT system_dict_type_dict_name_key UNIQUE (dict_name); + + +-- +-- Name: system_dict_type system_dict_type_dict_type_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_type + ADD CONSTRAINT system_dict_type_dict_type_key UNIQUE (dict_type); + + +-- +-- Name: system_dict_type system_dict_type_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_type + ADD CONSTRAINT system_dict_type_pkey PRIMARY KEY (id); + + +-- +-- Name: system_log system_log_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_log + ADD CONSTRAINT system_log_pkey PRIMARY KEY (id); + + +-- +-- Name: system_menu system_menu_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_menu + ADD CONSTRAINT system_menu_name_key UNIQUE (name); + + +-- +-- Name: system_menu system_menu_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_menu + ADD CONSTRAINT system_menu_pkey PRIMARY KEY (id); + + +-- +-- Name: system_notice system_notice_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_notice + ADD CONSTRAINT system_notice_pkey PRIMARY KEY (id); + + +-- +-- Name: system_position system_position_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_position + ADD CONSTRAINT system_position_name_key UNIQUE (name); + + +-- +-- Name: system_position system_position_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_position + ADD CONSTRAINT system_position_pkey PRIMARY KEY (id); + + +-- +-- Name: system_role system_role_code_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role + ADD CONSTRAINT system_role_code_key UNIQUE (code); + + +-- +-- Name: system_role_depts system_role_depts_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role_depts + ADD CONSTRAINT system_role_depts_pkey PRIMARY KEY (role_id, dept_id); + + +-- +-- Name: system_role_menus system_role_menus_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role_menus + ADD CONSTRAINT system_role_menus_pkey PRIMARY KEY (role_id, menu_id); + + +-- +-- Name: system_role system_role_name_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role + ADD CONSTRAINT system_role_name_key UNIQUE (name); + + +-- +-- Name: system_role system_role_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role + ADD CONSTRAINT system_role_pkey PRIMARY KEY (id); + + +-- +-- Name: system_user_positions system_user_positions_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_user_positions + ADD CONSTRAINT system_user_positions_pkey PRIMARY KEY (user_id, position_id); + + +-- +-- Name: system_user_roles system_user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_user_roles + ADD CONSTRAINT system_user_roles_pkey PRIMARY KEY (user_id, role_id); + + +-- +-- Name: system_users system_users_email_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_users + ADD CONSTRAINT system_users_email_key UNIQUE (email); + + +-- +-- Name: system_users system_users_mobile_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_users + ADD CONSTRAINT system_users_mobile_key UNIQUE (mobile); + + +-- +-- Name: system_users system_users_pkey; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_users + ADD CONSTRAINT system_users_pkey PRIMARY KEY (id); + + +-- +-- Name: system_users system_users_username_key; Type: CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_users + ADD CONSTRAINT system_users_username_key UNIQUE (username); + + +-- +-- Name: ix_application_myapp_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_application_myapp_creator_id ON public.application_myapp USING btree (creator_id); + + +-- +-- Name: ix_example_demo_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_example_demo_creator_id ON public.example_demo USING btree (creator_id); + + +-- +-- Name: ix_monitor_job_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_monitor_job_creator_id ON public.monitor_job USING btree (creator_id); + + +-- +-- Name: ix_system_config_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_config_creator_id ON public.system_config USING btree (creator_id); + + +-- +-- Name: ix_system_dept_parent_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_dept_parent_id ON public.system_dept USING btree (parent_id); + + +-- +-- Name: ix_system_dict_data_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_dict_data_creator_id ON public.system_dict_data USING btree (creator_id); + + +-- +-- Name: ix_system_dict_type_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_dict_type_creator_id ON public.system_dict_type USING btree (creator_id); + + +-- +-- Name: ix_system_log_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_log_creator_id ON public.system_log USING btree (creator_id); + + +-- +-- Name: ix_system_menu_parent_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_menu_parent_id ON public.system_menu USING btree (parent_id); + + +-- +-- Name: ix_system_notice_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_notice_creator_id ON public.system_notice USING btree (creator_id); + + +-- +-- Name: ix_system_position_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_position_creator_id ON public.system_position USING btree (creator_id); + + +-- +-- Name: ix_system_role_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_role_creator_id ON public.system_role USING btree (creator_id); + + +-- +-- Name: ix_system_users_creator_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_users_creator_id ON public.system_users USING btree (creator_id); + + +-- +-- Name: ix_system_users_dept_id; Type: INDEX; Schema: public; Owner: tao +-- + +CREATE INDEX ix_system_users_dept_id ON public.system_users USING btree (dept_id); + + +-- +-- Name: monitor_job_log monitor_job_log_job_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.monitor_job_log + ADD CONSTRAINT monitor_job_log_job_id_fkey FOREIGN KEY (job_id) REFERENCES public.monitor_job(id); + + +-- +-- Name: system_dept system_dept_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dept + ADD CONSTRAINT system_dept_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.system_dept(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_dict_data system_dict_data_dict_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_dict_data + ADD CONSTRAINT system_dict_data_dict_type_id_fkey FOREIGN KEY (dict_type_id) REFERENCES public.system_dict_type(id); + + +-- +-- Name: system_menu system_menu_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_menu + ADD CONSTRAINT system_menu_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.system_menu(id) ON DELETE SET NULL; + + +-- +-- Name: system_role_depts system_role_depts_dept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role_depts + ADD CONSTRAINT system_role_depts_dept_id_fkey FOREIGN KEY (dept_id) REFERENCES public.system_dept(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_role_depts system_role_depts_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role_depts + ADD CONSTRAINT system_role_depts_role_id_fkey FOREIGN KEY (role_id) REFERENCES public.system_role(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_role_menus system_role_menus_menu_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role_menus + ADD CONSTRAINT system_role_menus_menu_id_fkey FOREIGN KEY (menu_id) REFERENCES public.system_menu(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_role_menus system_role_menus_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_role_menus + ADD CONSTRAINT system_role_menus_role_id_fkey FOREIGN KEY (role_id) REFERENCES public.system_role(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_user_positions system_user_positions_position_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_user_positions + ADD CONSTRAINT system_user_positions_position_id_fkey FOREIGN KEY (position_id) REFERENCES public.system_position(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_user_positions system_user_positions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_user_positions + ADD CONSTRAINT system_user_positions_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.system_users(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_user_roles system_user_roles_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_user_roles + ADD CONSTRAINT system_user_roles_role_id_fkey FOREIGN KEY (role_id) REFERENCES public.system_role(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_user_roles system_user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_user_roles + ADD CONSTRAINT system_user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.system_users(id) ON UPDATE CASCADE ON DELETE CASCADE; + + +-- +-- Name: system_users system_users_dept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: tao +-- + +ALTER TABLE ONLY public.system_users + ADD CONSTRAINT system_users_dept_id_fkey FOREIGN KEY (dept_id) REFERENCES public.system_dept(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/fastapp/.prettierrc.yaml b/fastapp/.prettierrc.yaml index d9cf0c72..7301a90e 100644 --- a/fastapp/.prettierrc.yaml +++ b/fastapp/.prettierrc.yaml @@ -4,6 +4,8 @@ arrowParens: "always" bracketSameLine: false # 对象字面量中的括号之间添加空格 bracketSpacing: true +# 在对象字面量中,如果属性名需要引号,则使用单引号 +singleAttributePerLine: false # 自动格式化嵌入的代码(如 Markdown 和 HTML 内的代码) embeddedLanguageFormatting: "auto" # 忽略 HTML 空白敏感度,将空白视为非重要内容 @@ -12,8 +14,8 @@ htmlWhitespaceSensitivity: "ignore" insertPragma: false # 在 JSX 中使用双引号 jsxSingleQuote: false -# 每行代码的最大长度限制为 100 字符 -printWidth: 100 +# 每行代码的最大长度限制为 200 字符 +printWidth: 200 # 在 Markdown 中保留原有的换行格式 proseWrap: "preserve" # 仅在必要时添加对象属性的引号 @@ -34,8 +36,15 @@ useTabs: false vueIndentScriptAndStyle: false # 根据系统自动检测换行符 endOfLine: "auto" -# 对 HTML 文件应用特定格式化规则 +# 对特定文件类型应用更宽松的格式化规则 overrides: - files: "*.html" options: parser: "html" + - files: "*.vue" + options: + printWidth: 300 + singleAttributePerLine: false + - files: "*.{js,ts}" + options: + printWidth: 250 diff --git a/fastapp/components.d.ts b/fastapp/components.d.ts index ccaf2917..48b919cf 100644 --- a/fastapp/components.d.ts +++ b/fastapp/components.d.ts @@ -17,19 +17,27 @@ declare module 'vue' { QiunDataCharts: typeof import('./src/components/qiun-data-charts/qiun-data-charts.vue')['default'] QiunError: typeof import('./src/components/qiun-error/qiun-error.vue')['default'] QiunLoading: typeof import('./src/components/qiun-loading/qiun-loading.vue')['default'] + WdAvatar: typeof import('wot-design-uni/components/wd-avatar/wd-avatar.vue')['default'] + WdBackTop: typeof import('wot-design-uni/components/wd-back-top/wd-back-top.vue')['default'] WdBadge: typeof import('wot-design-uni/components/wd-badge/wd-badge.vue')['default'] WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default'] WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default'] WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default'] WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default'] WdCheckbox: typeof import('wot-design-uni/components/wd-checkbox/wd-checkbox.vue')['default'] + WdCol: typeof import('wot-design-uni/components/wd-col/wd-col.vue')['default'] + WdCollapse: typeof import('wot-design-uni/components/wd-collapse/wd-collapse.vue')['default'] + WdCollapseItem: typeof import('wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue')['default'] WdConfigProvider: typeof import('wot-design-uni/components/wd-config-provider/wd-config-provider.vue')['default'] WdDivider: typeof import('wot-design-uni/components/wd-divider/wd-divider.vue')['default'] + WdFab: typeof import('wot-design-uni/components/wd-fab/wd-fab.vue')['default'] + WdFloatingPanel: typeof import('wot-design-uni/components/wd-floating-panel/wd-floating-panel.vue')['default'] WdForm: typeof import('wot-design-uni/components/wd-form/wd-form.vue')['default'] WdGrid: typeof import('wot-design-uni/components/wd-grid/wd-grid.vue')['default'] WdGridItem: typeof import('wot-design-uni/components/wd-grid-item/wd-grid-item.vue')['default'] WdIcon: typeof import('wot-design-uni/components/wd-icon/wd-icon.vue')['default'] WdImg: typeof import('wot-design-uni/components/wd-img/wd-img.vue')['default'] + WdImgCropper: typeof import('wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue')['default'] WdInput: typeof import('wot-design-uni/components/wd-input/wd-input.vue')['default'] WdLoading: typeof import('wot-design-uni/components/wd-loading/wd-loading.vue')['default'] WdMessageBox: typeof import('wot-design-uni/components/wd-message-box/wd-message-box.vue')['default'] @@ -38,6 +46,9 @@ declare module 'vue' { WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default'] WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default'] WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default'] + WdRow: typeof import('wot-design-uni/components/wd-row/wd-row.vue')['default'] + WdSearch: typeof import('wot-design-uni/components/wd-search/wd-search.vue')['default'] + WdSkeleton: typeof import('wot-design-uni/components/wd-skeleton/wd-skeleton.vue')['default'] WdSwiper: typeof import('wot-design-uni/components/wd-swiper/wd-swiper.vue')['default'] WdSwitch: typeof import('wot-design-uni/components/wd-switch/wd-switch.vue')['default'] WdTabbar: typeof import('wot-design-uni/components/wd-tabbar/wd-tabbar.vue')['default'] diff --git a/fastapp/docs/theme-system-guide.md b/fastapp/docs/theme-system-guide.md deleted file mode 100644 index 4ab07cdf..00000000 --- a/fastapp/docs/theme-system-guide.md +++ /dev/null @@ -1,301 +0,0 @@ -# 主题系统使用指南 - -## 概述 - -本项目基于 Wot Design Uni 的 ConfigProvider 组件实现了完整的主题系统,支持: - -- 🌙 暗黑/浅色模式切换 -- 🎨 12种预设主题色 -- 🎯 自定义主题色 -- 💾 主题设置持久化存储 -- 📱 多平台兼容(H5、小程序) - -## 核心文件 - -### 1. useTheme Composable (`src/composables/useTheme.ts`) - -主题管理的核心逻辑,提供: - -```typescript -const { - theme, // 当前主题模式 'light' | 'dark' - themeVars, // ConfigProviderThemeVars 主题变量 - toggleTheme, // 切换主题模式 - setThemeColor, // 设置主题色 - resetTheme, // 重置主题 - initTheme, // 初始化主题 - colorColumns, // 预设主题色列表 -} = useTheme(); -``` - -### 2. 布局文件 - -#### Tabbar 布局 (`src/layouts/tabbar.vue`) - -```vue - -``` - -#### Default 布局 (`src/layouts/default.vue`) - -```vue - -``` - -### 3. 主题设置页面 (`src/pages/mine/settings/theme/index.vue`) - -提供用户界面来: - -- 切换暗黑/浅色模式 -- 选择预设主题色 -- 输入自定义主题色 -- 预览主题效果 -- 重置主题设置 - -## 主题变量 - -### 支持的 ConfigProviderThemeVars - -根据 Wot Design Uni 文档,主要使用: - -```typescript -interface ConfigProviderThemeVars { - colorTheme?: string; // 主题色 - buttonPrimaryBgColor?: string; // 主按钮背景色 - buttonPrimaryColor?: string; // 主按钮文字色 - // ... 更多变量 -} -``` - -### 预设主题色 - -```typescript -const colorColumns = [ - { value: "#165DFF", label: "蓝色" }, - { value: "#0FC6C2", label: "青绿色" }, - { value: "#722ED1", label: "紫色" }, - { value: "#F5222D", label: "红色" }, - { value: "#FA8C16", label: "橙色" }, - { value: "#FADB14", label: "黄色" }, - { value: "#52C41A", label: "绿色" }, - { value: "#EB2F96", label: "粉色" }, - { value: "#13C2C2", label: "青色" }, - { value: "#1890FF", label: "天蓝色" }, - { value: "#CD5C5C", label: "经典红" }, - { value: "#228B22", label: "自然绿" }, -]; -``` - -## 暗黑模式实现 - -### 1. ConfigProvider 主题切换 - -```vue - - - -``` - -### 2. 全局样式适配 - -在 `src/uni.scss` 中定义: - -```scss -.wot-theme-dark { - background-color: #1a1a1a !important; - color: #f5f5f5 !important; - - /* H5 环境 body 样式 */ - body { - background-color: #1a1a1a !important; - color: #f5f5f5 !important; - } - - /* 其他组件暗黑模式适配 */ -} -``` - -### 3. 动态 Body 样式 - -在 `useTheme` 中自动处理: - -```typescript -const applyDarkModeBodyStyle = (isDark: boolean) => { - // #ifdef H5 - if (typeof document !== "undefined") { - const body = document.body; - if (isDark) { - body.style.backgroundColor = "#1a1a1a"; - body.style.color = "#f5f5f5"; - body.classList.add("wot-theme-dark"); - } else { - body.style.backgroundColor = "#f8f8f8"; - body.style.color = "#333"; - body.classList.remove("wot-theme-dark"); - } - } - // #endif -}; -``` - -## 持久化存储 - -主题设置自动保存到本地存储,无需手动调用: - -```typescript -// 存储键名 -const THEME_STORAGE_KEY = "app_theme_mode"; -const THEME_COLOR_STORAGE_KEY = "app_theme_color"; - -// 主题设置自动持久化,在 useTheme 中已处理 -// 包含主题模式、主题色、是否跟随系统、用户设置状态 -``` - -主题设置会在以下情况自动保存: - -- 切换主题模式时 -- 设置主题色时 -- 重置主题时 -- 跟随系统设置改变时 - -## 使用示例 - -### 在页面中使用主题 - -```vue - - - -``` - -### 在组件中响应主题变化 - -```vue - - - - - -``` - -## 最佳实践 - -### 1. 组件开发 - -- 使用 Wot Design Uni 组件时,主题色会自动应用 -- 自定义组件需要手动适配暗黑模式 -- 使用 `:class="{ 'wot-theme-dark': theme === 'dark' }"` 来应用暗黑模式样式 - -### 2. 样式编写 - -```scss -.my-component { - background-color: #fff; - color: #333; - - // 暗黑模式适配 - .wot-theme-dark & { - background-color: #2a2a2a; - color: #f5f5f5; - } -} -``` - -### 3. 主题色使用 - -```vue - -``` - -## 注意事项 - -1. **ConfigProvider 包裹**:确保页面被 ConfigProvider 包裹才能应用主题 -2. **样式优先级**:暗黑模式样式需要足够的优先级,必要时使用 `!important` -3. **平台兼容**:小程序和 H5 的样式处理略有不同,使用条件编译处理 -4. **性能考虑**:主题切换时避免频繁的 DOM 操作 - -## 扩展功能 - -### 添加新的主题色 - -在 `colorColumns` 中添加新的颜色: - -```typescript -export const colorColumns = [ - // ... 现有颜色 - { value: "#FF6B6B", label: "珊瑚红" }, - { value: "#4ECDC4", label: "薄荷绿" }, -]; -``` - -### 添加更多主题变量 - -```typescript -const themeVars = ref({ - colorTheme: getStoredThemeColor(), - buttonPrimaryBgColor: getStoredThemeColor(), - // 添加更多变量 -}); -``` - -### 自定义暗黑模式样式 - -在 `uni.scss` 中添加更多组件的暗黑模式适配: - -```scss -.wot-theme-dark { - // 新组件的暗黑模式样式 - .my-custom-component { - background-color: #2a2a2a; - color: #f5f5f5; - } -} -``` diff --git a/fastapp/docs/uniapp整合mini-router.md b/fastapp/docs/uniapp整合mini-router.md deleted file mode 100644 index 51492094..00000000 --- a/fastapp/docs/uniapp整合mini-router.md +++ /dev/null @@ -1,427 +0,0 @@ -# uni-mini-router 在UniApp中的整合教程 - -## 一、uni-mini-router简介 - -uni-mini-router是一个轻量级的路由管理库,专为uni-app设计,解决了uni-app原生路由系统中没有路由拦截等关键功能的问题。它提供了类似Vue Router的API体验,使得在uni-app项目中实现更加灵活和强大的路由管理成为可能。 - -### 主要特点 - -1. **Vue Router风格API**:提供与Vue Router相似的API,降低学习成本 -2. **路由拦截功能**:支持全局导航守卫,可以在路由跳转前后执行逻辑 -3. **优雅的参数传递**:支持params和query方式传参 -4. **命名路由**:支持通过路由名称进行导航 -5. **类型支持**:完整的TypeScript类型定义 -6. **轻量级**:体积小,性能高效 - -## 二、安装与基本配置 - -### 1. 安装uni-mini-router - -使用npm或yarn安装uni-mini-router: - -```bash -pnpm add - uni-mini-router -``` - -### 2. 初始化路由 - -在项目中创建router目录并初始化路由配置: - -```typescript -// src/router/index.ts -import { createRouter } from "uni-mini-router"; -import { pages, subPackages } from "virtual:uni-pages"; - -// 生成路由配置 -function generateRoutes() { - const routes = pages.map((page) => { - const newPath = `/${page.path}`; - return { ...page, path: newPath }; - }); - - // 处理分包路由 - if (subPackages && subPackages.length > 0) { - subPackages.forEach((subPackage) => { - const subRoutes = subPackage.pages.map((page: any) => { - const newPath = `/${subPackage.root}/${page.path}`; - return { ...page, path: newPath }; - }); - routes.push(...subRoutes); - }); - } - - return routes; -} - -// 创建路由实例 -const router = createRouter({ - routes: generateRoutes(), -}); - -export default router; -``` - -### 3. 在main.ts中挂载路由 - -```typescript -// src/main.ts -import { createSSRApp } from "vue"; -import App from "./App.vue"; -import router from "./router"; - -export function createApp() { - const app = createSSRApp(App); - - // 使用路由 - app.use(router); - - return { - app, - }; -} -``` - -### 4. 配置自动导入(可选,推荐) - -使用unplugin-auto-import插件可以自动导入路由相关hooks,无需每次手动导入: - -```typescript -// vite.config.ts -import AutoImport from "unplugin-auto-import/vite"; - -export default defineConfig({ - plugins: [ - AutoImport({ - imports: [ - "vue", - { - from: "uni-mini-router", - imports: ["createRouter", "useRouter", "useRoute"], - }, - ], - dts: "src/auto-imports.d.ts", - }), - ], -}); -``` - -## 三、路由基本用法 - -### 1. 编程式导航 - -uni-mini-router提供了多种导航方法: - -```typescript -const router = useRouter(); - -// 字符串路径导航 -router.push("/pages/index/index"); - -// 对象导航(通过路径) -router.push({ path: "/pages/index/index" }); - -// 对象导航(通过名称) -router.push({ name: "index" }); - -// 携带参数 -router.push({ - path: "/pages/detail/index", - query: { id: 10 }, -}); - -// 通过名称 + 参数 -router.push({ - name: "detail", - params: { id: 10 }, -}); - -// Tab页面导航 -router.pushTab("/pages/home/index"); - -// 关闭当前页面并跳转 -router.replace("/pages/index/index"); - -// 关闭所有页面并跳转 -router.replaceAll("/pages/index/index"); - -// 返回上一级 -router.back(); - -// 返回多级 -router.back(2); -``` - -### 2. 获取和使用路由信息 - -```typescript -const route = useRoute(); - -// 访问当前路由信息 -console.log(route.path); // 当前路由路径 -console.log(route.name); // 当前路由名称 -console.log(route.query); // 查询参数 -console.log(route.params); // 路由参数 -``` - -### 3. 接收页面参数 - -在页面组件中接收传递的参数: - -```typescript - -``` - -> ⚠️ **重要说明**:在uni-mini-router中,params和query参数都会转换为查询字符串放在URL中,两者在实际效果上没有区别。这种设计是为了与Vue Router保持API一致性。 - -## 四、导航守卫 - -uni-mini-router提供了全局导航守卫功能,可以在路由跳转前后执行自定义逻辑。 - -### 1. 全局前置守卫 - -```typescript -// src/router/index.ts -router.beforeEach((to, from, next) => { - console.log("路由跳转:", from.path, "->", to.path); - - // 检查是否需要登录 - if (to.meta && to.meta.requireAuth) { - // 检查登录状态 - const isLoggedIn = uni.getStorageSync("token"); - - if (!isLoggedIn) { - // 未登录,跳转到登录页 - uni.showToast({ title: "请先登录", icon: "none" }); - next("/pages/login/index"); - return; - } - } - - // 继续导航 - next(); -}); -``` - -### 2. 全局后置守卫 - -```typescript -// src/router/index.ts -router.afterEach((to, from) => { - console.log("路由跳转完成:", to.path); - - // 可以在这里做一些统计或记录 -}); -``` - -### 3. 路由元数据配置 - -可以在页面文件中使用``自定义块来定义路由元数据: - -```vue - - - - - -{ - "name": "protected-page", - "meta": { - "requireAuth": true, - "title": "需要登录的页面" - } -} - -``` - -## 五、实战示例:登录权限控制 - -### 1. 定义带有权限控制的路由 - -```typescript -// src/router/index.ts -import { createRouter } from "uni-mini-router"; - -const router = createRouter({ - routes: generateRoutes(), -}); - -// 全局前置守卫 -router.beforeEach((to, from, next) => { - // 检查页面是否需要登录 - if (to.meta && to.meta.requireAuth) { - const token = uni.getStorageSync("token"); - - if (!token) { - // 显示登录提示 - uni.showModal({ - title: "提示", - content: "该功能需要登录后使用", - confirmText: "去登录", - cancelText: "返回", - success: (res) => { - if (res.confirm) { - // 记住原来要去的页面 - uni.setStorageSync("redirect", to.fullPath); - next("/pages/login/index"); - } else { - // 取消则返回首页 - next("/pages/index/index"); - } - }, - }); - return; - } - } - - // 继续导航 - next(); -}); - -export default router; -``` - -### 2. 登录成功后跳转回原页面 - -```vue - - -``` - -## 六、最佳实践与性能优化 - -### 1. 合理使用跳转方式 - -- **router.push**:需要保留当前页面、可返回时使用 -- **router.replace**:不需要返回当前页面时使用 -- **router.replaceAll**:需要清除所有页面栈时使用(如登录后) -- **router.pushTab**:跳转到tabBar页面时使用 - -### 2. 参数传递最佳实践 - -- 对于简单数据,直接使用参数传递 -- 对于复杂数据或对象,可使用以下方法: - -```typescript -// 传递复杂对象 -const complexData = { name: "product", details: { id: 1, features: ["a", "b"] } }; - -// 方法1: JSON序列化 + URL编码 -router.push({ - path: "/pages/detail/index", - query: { data: encodeURIComponent(JSON.stringify(complexData)) }, -}); - -// 接收页面 -onLoad((option) => { - if (option.data) { - try { - const data = JSON.parse(decodeURIComponent(option.data)); - console.log(data); - } catch (e) { - console.error("参数解析错误", e); - } - } -}); - -// 方法2: 对于非常大的数据,考虑使用全局状态管理或本地存储 -``` - -### 3. 路由懒加载 - -uni-mini-router自动支持小程序的分包加载特性,可以在pages.json中配置分包: - -```json -{ - "pages": [ - // 主包页面 - ], - "subPackages": [ - { - "root": "pages/module", - "pages": [ - { - "path": "detail/index", - "style": { - "navigationBarTitleText": "详情页" - } - } - ] - } - ] -} -``` - -## 七、路由调试与测试 - -### 1. 路由日志记录 - -```typescript -// src/router/index.ts -router.beforeEach((to, from, next) => { - console.log(`[Router] ${from.path || "初始页面"} -> ${to.path}`, { - params: to.params, - query: to.query, - }); - next(); -}); -``` - -### 2. 常见问题解决 - -1. **路由参数获取不到**: - - 检查传参方式是否正确 - - 使用`console.log`打印完整的option对象 - - 尝试同时检查route.query和route.params - -2. **页面未注册**: - - 确保页面已在pages.json中正确注册 - - 检查路径大小写是否正确 - -3. **导航守卫不生效**: - - 确保在路由配置后调用守卫 - - 检查是否正确调用next()函数 - -## 总结 - -uni-mini-router为uni-app提供了Vue Router风格的路由解决方案,特别是增加了路由拦截功能,解决了uni-app原生路由的限制。通过简单配置,就能在uni-app中实现更加灵活的路由管理,包括权限控制、参数传递和路由拦截等高级功能。 - -使用uni-mini-router可以让你的uni-app项目路由管理更加规范化和工程化,提升开发效率和代码质量。 - -参考资料: - -- [uni-mini-router GitHub仓库](https://github.com/Moonofweisheng/uni-mini-router) -- [uni-mini-router官方文档](https://moonofweisheng.github.io/uni-mini-router/) -- [uni-app官方路由文档](https://uniapp.dcloud.net.cn/tutorial/page.html) diff --git a/fastapp/eslint.config.mjs b/fastapp/eslint.config.mjs index 1bd36600..9dc1368d 100644 --- a/fastapp/eslint.config.mjs +++ b/fastapp/eslint.config.mjs @@ -19,17 +19,7 @@ const autoImportConfig = JSON.parse(fs.readFileSync(".eslintrc-auto-import.json" export default [ // 忽略指定文件 { - ignores: [ - "node_modules/**", - "dist/**", - "auto-imports.d.ts", - "unpackage/**", - "public/**", - "static/**", - "**/u-charts/**", - "**/qiun-**/**", - "**/auto-imports.d.ts", - ], + ignores: ["node_modules/**", "dist/**", "auto-imports.d.ts", "unpackage/**", "public/**", "static/**", "**/u-charts/**", "**/qiun-**/**", "**/auto-imports.d.ts"], }, // 检查文件的配置 { @@ -58,7 +48,7 @@ export default [ rules: { ...configPrettier.rules, // 关闭与 Prettier 冲突的规则 ...pluginPrettier.configs.recommended.rules, // 启用 Prettier 规则 - "prettier/prettier": "error", // 强制 Prettier 格式化 + "prettier/prettier": "off", // 完全关闭 Prettier 格式化检查 "no-unused-vars": [ "error", { @@ -121,9 +111,7 @@ export default [ }, rules: { // 禁用所有规则 - ...Object.fromEntries( - Object.keys(pluginVue.configs["vue3-recommended"].rules || {}).map((key) => [key, "off"]) - ), + ...Object.fromEntries(Object.keys(pluginVue.configs["vue3-recommended"].rules || {}).map((key) => [key, "off"])), "no-unused-vars": "off", "no-prototype-builtins": "off", "@typescript-eslint/no-explicit-any": "off", diff --git a/fastapp/package.json b/fastapp/package.json index 3c80b88b..d5cf83fe 100644 --- a/fastapp/package.json +++ b/fastapp/package.json @@ -100,44 +100,43 @@ "commit": "git-cz" }, "dependencies": { - "@dcloudio/uni-app": "3.0.0-4070520250711001", - "@dcloudio/uni-app-harmony": "3.0.0-4070520250711001", - "@dcloudio/uni-app-plus": "3.0.0-4070520250711001", - "@dcloudio/uni-components": "3.0.0-4070520250711001", - "@dcloudio/uni-h5": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-alipay": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-baidu": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-harmony": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-jd": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-kuaishou": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-lark": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-qq": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-toutiao": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-weixin": "3.0.0-4070520250711001", - "@dcloudio/uni-mp-xhs": "3.0.0-4070520250711001", - "@dcloudio/uni-quickapp-webview": "3.0.0-4070520250711001", + "@dcloudio/uni-app": "3.0.0-4070620250821001", + "@dcloudio/uni-app-harmony": "3.0.0-4070620250821001", + "@dcloudio/uni-app-plus": "3.0.0-4070620250821001", + "@dcloudio/uni-components": "3.0.0-4070620250821001", + "@dcloudio/uni-h5": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-alipay": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-baidu": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-harmony": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-jd": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-kuaishou": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-lark": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-qq": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-toutiao": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-weixin": "3.0.0-4070620250821001", + "@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001", + "@dcloudio/uni-quickapp-webview": "3.0.0-4070620250821001", "@stomp/stompjs": "^7.1.1", "@uni-helper/uni-use": "^0.19.14", "@vueuse/core": "9.13.0", "pinia": "^2.2.2", - "vue": "^3.5.13", - "vue-i18n": "^9.1.9", - "wot-design-uni": "^1.9.1" + "vue": "^3.5.18", + "vue-i18n": "^9.14.5" }, "devDependencies": { "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", - "@dcloudio/types": "^3.4.8", - "@dcloudio/uni-automator": "3.0.0-4070520250711001", - "@dcloudio/uni-cli-shared": "3.0.0-4070520250711001", - "@dcloudio/uni-stacktracey": "3.0.0-4070520250711001", - "@dcloudio/vite-plugin-uni": "3.0.0-4070520250711001", + "@dcloudio/types": "^3.4.19", + "@dcloudio/uni-automator": "3.0.0-4070620250821001", + "@dcloudio/uni-cli-shared": "3.0.0-4070620250821001", + "@dcloudio/uni-stacktracey": "3.0.0-4070620250821001", + "@dcloudio/vite-plugin-uni": "3.0.0-4070620250821001", "@eslint/js": "^9.10.0", "@uni-helper/uni-types": "1.0.0-alpha.6", "@uni-helper/vite-plugin-uni-components": "^0.2.0", "@uni-helper/vite-plugin-uni-layouts": "^0.1.10", "@uni-helper/vite-plugin-uni-pages": "^0.2.28", - "@vue/runtime-core": "^3.4.21", + "@vue/runtime-core": "^3.5.18", "commitizen": "^4.3.0", "cz-git": "^1.9.4", "eslint": "^9.10.0", @@ -168,6 +167,7 @@ "unplugin-auto-import": "^0.18.3", "vite": "5.2.8", "vue-eslint-parser": "^9.4.3", - "vue-tsc": "^1.0.24" + "vue-tsc": "^1.0.24", + "wot-design-uni": "^1.9.1" } } diff --git a/fastapp/src/components/cu-date-query/index.vue b/fastapp/src/components/cu-date-query/index.vue index 8f945619..309c6ba0 100644 --- a/fastapp/src/components/cu-date-query/index.vue +++ b/fastapp/src/components/cu-date-query/index.vue @@ -1,11 +1,5 @@ - - + \ No newline at end of file diff --git a/fastapp/src/layouts/tabbar.vue b/fastapp/src/layouts/tabbar.vue index ecb721c8..d5f7911b 100644 --- a/fastapp/src/layouts/tabbar.vue +++ b/fastapp/src/layouts/tabbar.vue @@ -1,22 +1,10 @@