mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-29 15:42:55 +00:00
refactor: 清理冗余代码与初始化数据,优化配置与调度器
本次提交包含多项优化和清理工作: 1. 新增订单类型枚举BUY,调整定时任务状态显示逻辑 2. 优化Redis连接配置,重构认证逻辑减少重复代码 3. 移除大量初始化演示数据、过期的租户与角色配置 4. 简化调度器状态存储,不再写入配置表而是内存缓存 5. 修复插件开关状态存储逻辑,调整字典数据标签与值 6. 优化WebSocket聊天处理,完善错误处理流程 7. 清理冗余导入与废弃的操作日志过滤逻辑
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "用户管理模块",
|
||||
"int_val": 15,
|
||||
"bigint_val": 15000,
|
||||
"float_val": 99.99,
|
||||
"bool_val": true,
|
||||
"date_val": "2025-06-01",
|
||||
"time_val": "09:00:00",
|
||||
"datetime_val": "2025-06-01 09:00:00",
|
||||
"text_val": "用户管理模块提供用户注册、登录、权限分配、个人中心等完整功能。",
|
||||
"json_val": {"version": "1.0", "author": "admin", "tags": ["user", "auth"]},
|
||||
"status": 0,
|
||||
"description": "用户管理核心模块"
|
||||
},
|
||||
{
|
||||
"name": "订单支付模块",
|
||||
"int_val": 28,
|
||||
"bigint_val": 300000,
|
||||
"float_val": 199.50,
|
||||
"bool_val": true,
|
||||
"date_val": "2025-06-15",
|
||||
"time_val": "14:30:00",
|
||||
"datetime_val": "2025-06-15 14:30:00",
|
||||
"text_val": "订单支付模块支持微信支付、支付宝、银行卡等多种支付方式,包含支付回调、退款处理等。",
|
||||
"json_val": {"version": "2.1", "author": "payment-team", "tags": ["order", "payment", "refund"]},
|
||||
"status": 0,
|
||||
"description": "订单与支付核心模块"
|
||||
},
|
||||
{
|
||||
"name": "消息通知模块",
|
||||
"int_val": 8,
|
||||
"bigint_val": 5000,
|
||||
"float_val": 0.00,
|
||||
"bool_val": false,
|
||||
"date_val": "2025-07-01",
|
||||
"time_val": "08:00:00",
|
||||
"datetime_val": "2025-07-01 08:00:00",
|
||||
"text_val": "消息通知模块支持站内信、邮件、短信等多渠道通知推送。",
|
||||
"json_val": {"version": "0.9", "author": "dev-team", "tags": ["notification", "email", "sms"]},
|
||||
"status": 1,
|
||||
"description": "消息通知服务模块(开发中)"
|
||||
},
|
||||
{
|
||||
"name": "数据分析报表",
|
||||
"int_val": 42,
|
||||
"bigint_val": 1000000,
|
||||
"float_val": 499.00,
|
||||
"bool_val": true,
|
||||
"date_val": "2025-08-01",
|
||||
"time_val": "10:00:00",
|
||||
"datetime_val": "2025-08-01 10:00:00",
|
||||
"text_val": "数据分析报表模块提供可视化图表、数据导出、实时监控大屏等高级分析功能。",
|
||||
"json_val": {"version": "3.0", "author": "data-team", "tags": ["analytics", "dashboard", "report", "chart"]},
|
||||
"status": 0,
|
||||
"description": "高级数据分析与报表模块"
|
||||
},
|
||||
{
|
||||
"name": "文件存储服务",
|
||||
"int_val": 20,
|
||||
"bigint_val": 50000,
|
||||
"float_val": 29.90,
|
||||
"bool_val": true,
|
||||
"date_val": "2025-09-01",
|
||||
"time_val": "16:00:00",
|
||||
"datetime_val": "2025-09-01 16:00:00",
|
||||
"text_val": "文件存储服务支持本地存储、阿里云OSS、腾讯云COS等多种存储后端,提供文件上传、下载、预览等接口。",
|
||||
"json_val": {"version": "1.5", "author": "infra-team", "tags": ["storage", "oss", "upload"]},
|
||||
"status": 0,
|
||||
"description": "文件存储与 CDN 加速服务"
|
||||
},
|
||||
{
|
||||
"name": "测试占位模块",
|
||||
"int_val": null,
|
||||
"bigint_val": null,
|
||||
"float_val": null,
|
||||
"bool_val": true,
|
||||
"date_val": null,
|
||||
"time_val": null,
|
||||
"datetime_val": null,
|
||||
"text_val": null,
|
||||
"json_val": null,
|
||||
"status": 1,
|
||||
"description": "仅用于测试空值处理"
|
||||
}
|
||||
]
|
||||
@@ -1,70 +0,0 @@
|
||||
[
|
||||
{
|
||||
"invoice_no": "INV20260101001",
|
||||
"order_id": 1,
|
||||
"invoice_type": "vat_special",
|
||||
"title": "星辰科技有限公司",
|
||||
"tax_no": "91440300MA5ABCDE12",
|
||||
"bank_info": "中国工商银行深圳科技园支行 4000023409100123456",
|
||||
"address_info": "深圳市南山区科技园路1号 0755-88888888",
|
||||
"amount": 29900,
|
||||
"tax_amount": 4485,
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"pdf_url": "/static/invoice/3/INV20260101001.pdf",
|
||||
"oss_license_pdf_url": "/static/invoice/3/INV20260101001_license.pdf",
|
||||
"api_response": null,
|
||||
"description": "星辰科技-标准版年付发票(已开具)"
|
||||
},
|
||||
{
|
||||
"invoice_no": "INV20260315001",
|
||||
"order_id": 2,
|
||||
"invoice_type": "vat_normal",
|
||||
"title": "星辰科技有限公司",
|
||||
"tax_no": null,
|
||||
"bank_info": null,
|
||||
"address_info": null,
|
||||
"amount": 9900,
|
||||
"tax_amount": 1485,
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"pdf_url": "/static/invoice/3/INV20260315001.pdf",
|
||||
"oss_license_pdf_url": "/static/invoice/3/INV20260315001_license.pdf",
|
||||
"api_response": null,
|
||||
"description": "星辰科技-AI助手发票(已开具)"
|
||||
},
|
||||
{
|
||||
"invoice_no": "INV20260601001",
|
||||
"order_id": 6,
|
||||
"invoice_type": "vat_normal",
|
||||
"title": "创新工坊",
|
||||
"tax_no": null,
|
||||
"bank_info": null,
|
||||
"address_info": null,
|
||||
"amount": 29900,
|
||||
"tax_amount": 4485,
|
||||
"status": 0,
|
||||
"tenant_id": 4,
|
||||
"pdf_url": null,
|
||||
"oss_license_pdf_url": null,
|
||||
"api_response": null,
|
||||
"description": "创新工坊-标准版月付发票(待开具)"
|
||||
},
|
||||
{
|
||||
"invoice_no": "INV20260610001",
|
||||
"order_id": 7,
|
||||
"invoice_type": "vat_normal",
|
||||
"title": "创新工坊",
|
||||
"tax_no": null,
|
||||
"bank_info": null,
|
||||
"address_info": null,
|
||||
"amount": 4900,
|
||||
"tax_amount": 735,
|
||||
"status": 0,
|
||||
"tenant_id": 4,
|
||||
"pdf_url": null,
|
||||
"oss_license_pdf_url": null,
|
||||
"api_response": null,
|
||||
"description": "创新工坊-数据大屏发票(待开具)"
|
||||
}
|
||||
]
|
||||
@@ -1,128 +0,0 @@
|
||||
[
|
||||
{
|
||||
"order_no": "202601010000001",
|
||||
"package_id": 2,
|
||||
"plugin_id": null,
|
||||
"order_type": "new",
|
||||
"amount": 29900,
|
||||
"period_count": 12,
|
||||
"pay_method": "alipay",
|
||||
"pay_time": "2026-01-01 10:30:00",
|
||||
"expire_time": "2026-01-01 10:45:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-标准版年付新购"
|
||||
},
|
||||
{
|
||||
"order_no": "202603150000001",
|
||||
"package_id": null,
|
||||
"plugin_id": 2,
|
||||
"order_type": "plugin",
|
||||
"amount": 9900,
|
||||
"period_count": 1,
|
||||
"pay_method": "wxpay",
|
||||
"pay_time": "2026-03-15 14:20:00",
|
||||
"expire_time": "2026-03-15 14:35:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-AI助手插件购买"
|
||||
},
|
||||
{
|
||||
"order_no": "202604010000001",
|
||||
"package_id": 4,
|
||||
"plugin_id": null,
|
||||
"order_type": "upgrade",
|
||||
"amount": 269900,
|
||||
"period_count": 12,
|
||||
"pay_method": "alipay",
|
||||
"pay_time": "2026-04-01 09:00:00",
|
||||
"expire_time": "2026-04-01 09:15:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-标准版升级为企业版"
|
||||
},
|
||||
{
|
||||
"order_no": "202602010000001",
|
||||
"package_id": 3,
|
||||
"plugin_id": null,
|
||||
"order_type": "new",
|
||||
"amount": 99900,
|
||||
"period_count": 6,
|
||||
"pay_method": "wxpay",
|
||||
"pay_time": "2026-02-01 11:00:00",
|
||||
"expire_time": "2026-02-01 11:15:00",
|
||||
"status": 3,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-专业版半年(已退款)"
|
||||
},
|
||||
{
|
||||
"order_no": "202605150000001",
|
||||
"package_id": null,
|
||||
"plugin_id": 4,
|
||||
"order_type": "plugin",
|
||||
"amount": 19900,
|
||||
"period_count": 1,
|
||||
"pay_method": null,
|
||||
"pay_time": null,
|
||||
"expire_time": "2026-05-15 16:45:00",
|
||||
"status": 2,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-工作流引擎(已取消)"
|
||||
},
|
||||
{
|
||||
"order_no": "202606010000001",
|
||||
"package_id": 2,
|
||||
"plugin_id": null,
|
||||
"order_type": "new",
|
||||
"amount": 29900,
|
||||
"period_count": 1,
|
||||
"pay_method": "alipay",
|
||||
"pay_time": "2026-06-01 08:30:00",
|
||||
"expire_time": "2026-06-01 08:45:00",
|
||||
"status": 1,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-标准版月付新购"
|
||||
},
|
||||
{
|
||||
"order_no": "202606100000001",
|
||||
"package_id": null,
|
||||
"plugin_id": 5,
|
||||
"order_type": "plugin",
|
||||
"amount": 4900,
|
||||
"period_count": 1,
|
||||
"pay_method": "wxpay",
|
||||
"pay_time": "2026-06-10 15:00:00",
|
||||
"expire_time": "2026-06-10 15:15:00",
|
||||
"status": 1,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-数据大屏插件购买"
|
||||
},
|
||||
{
|
||||
"order_no": "202606120000001",
|
||||
"package_id": 2,
|
||||
"plugin_id": null,
|
||||
"order_type": "renew",
|
||||
"amount": 269100,
|
||||
"period_count": 12,
|
||||
"pay_method": "alipay",
|
||||
"pay_time": "2026-06-12 10:00:00",
|
||||
"expire_time": "2026-06-12 10:15:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-企业版年付续费"
|
||||
},
|
||||
{
|
||||
"order_no": "202606120000002",
|
||||
"package_id": null,
|
||||
"plugin_id": null,
|
||||
"order_type": "new",
|
||||
"amount": 0,
|
||||
"period_count": 0,
|
||||
"pay_method": null,
|
||||
"pay_time": null,
|
||||
"expire_time": "2026-06-13 00:00:00",
|
||||
"status": 0,
|
||||
"tenant_id": 1,
|
||||
"description": "平台租户-测试待支付订单"
|
||||
}
|
||||
]
|
||||
@@ -42,81 +42,5 @@
|
||||
{
|
||||
"package_id": 2,
|
||||
"menu_id": 10
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 1
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 2
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 3
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 5
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 6
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 7
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 8
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 9
|
||||
},
|
||||
{
|
||||
"package_id": 3,
|
||||
"menu_id": 10
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 1
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 2
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 3
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 4
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 5
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 6
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 7
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 8
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 9
|
||||
},
|
||||
{
|
||||
"package_id": 4,
|
||||
"menu_id": 10
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -1,72 +0,0 @@
|
||||
[
|
||||
{
|
||||
"order_id": 1,
|
||||
"transaction_id": "ALIP20260101000001",
|
||||
"pay_method": "alipay",
|
||||
"amount": 29900,
|
||||
"pay_time": "2026-01-01 10:30:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-标准版年付"
|
||||
},
|
||||
{
|
||||
"order_id": 2,
|
||||
"transaction_id": "WXPAY202603150001",
|
||||
"pay_method": "wxpay",
|
||||
"amount": 9900,
|
||||
"pay_time": "2026-03-15 14:20:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-AI助手"
|
||||
},
|
||||
{
|
||||
"order_id": 3,
|
||||
"transaction_id": "ALIP20260401000001",
|
||||
"pay_method": "alipay",
|
||||
"amount": 269900,
|
||||
"pay_time": "2026-04-01 09:00:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-升级企业版"
|
||||
},
|
||||
{
|
||||
"order_id": 4,
|
||||
"transaction_id": "WXPAY202602010001",
|
||||
"pay_method": "wxpay",
|
||||
"amount": 99900,
|
||||
"pay_time": "2026-02-01 11:00:00",
|
||||
"status": 2,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-专业版半年(已退款)"
|
||||
},
|
||||
{
|
||||
"order_id": 6,
|
||||
"transaction_id": "ALIP20260601000001",
|
||||
"pay_method": "alipay",
|
||||
"amount": 29900,
|
||||
"pay_time": "2026-06-01 08:30:00",
|
||||
"status": 1,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-标准版月付"
|
||||
},
|
||||
{
|
||||
"order_id": 7,
|
||||
"transaction_id": "WXPAY202606100001",
|
||||
"pay_method": "wxpay",
|
||||
"amount": 4900,
|
||||
"pay_time": "2026-06-10 15:00:00",
|
||||
"status": 1,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-数据大屏"
|
||||
},
|
||||
{
|
||||
"order_id": 8,
|
||||
"transaction_id": "ALIP20260612000001",
|
||||
"pay_method": "alipay",
|
||||
"amount": 269100,
|
||||
"pay_time": "2026-06-12 10:00:00",
|
||||
"status": 1,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技-企业版续费"
|
||||
}
|
||||
]
|
||||
@@ -5,7 +5,7 @@
|
||||
"description": "自动生成CRUD代码,支持多种模板",
|
||||
"version": "1.0.0",
|
||||
"author": "FastApiAdmin",
|
||||
"icon": "https://service.fastapiadmin.com/api/v1/static/image/plugin/code.png",
|
||||
"icon": "ri:code-box-line",
|
||||
"category": "tool",
|
||||
"price": 0,
|
||||
"menu_path": "/tool/generator",
|
||||
@@ -18,7 +18,7 @@
|
||||
"description": "集成AI对话助手,支持智能问答",
|
||||
"version": "1.0.0",
|
||||
"author": "FastApiAdmin",
|
||||
"icon": "https://service.fastapiadmin.com/api/v1/static/image/plugin/ai.png",
|
||||
"icon": "ri:robot-2-line",
|
||||
"category": "ai",
|
||||
"price": 9900,
|
||||
"menu_path": "/ai/assistant",
|
||||
@@ -31,7 +31,7 @@
|
||||
"description": "实时监控系统运行状态,CPU、内存、磁盘等",
|
||||
"version": "1.0.0",
|
||||
"author": "FastApiAdmin",
|
||||
"icon": "https://service.fastapiadmin.com/api/v1/static/image/plugin/monitor.png",
|
||||
"icon": "ri:dashboard-3-line",
|
||||
"category": "monitor",
|
||||
"price": 0,
|
||||
"menu_path": "/monitor/system",
|
||||
@@ -44,7 +44,7 @@
|
||||
"description": "可视化工作流设计器,支持审批流程",
|
||||
"version": "1.0.0",
|
||||
"author": "FastApiAdmin",
|
||||
"icon": "https://service.fastapiadmin.com/api/v1/static/image/plugin/workflow.png",
|
||||
"icon": "ri:flow-chart",
|
||||
"category": "business",
|
||||
"price": 19900,
|
||||
"menu_path": "/workflow/design",
|
||||
@@ -57,7 +57,7 @@
|
||||
"description": "可视化数据大屏,支持多种图表",
|
||||
"version": "1.0.0",
|
||||
"author": "FastApiAdmin",
|
||||
"icon": "https://service.fastapiadmin.com/api/v1/static/image/plugin/dashboard.png",
|
||||
"icon": "ri:bar-chart-box-line",
|
||||
"category": "business",
|
||||
"price": 4900,
|
||||
"menu_path": "/dashboard/data",
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
[
|
||||
{
|
||||
"order_id": 4,
|
||||
"refund_no": "RF20260220000001",
|
||||
"amount": 99900,
|
||||
"reason": "套餐选择错误,申请退款并更换为标准版",
|
||||
"refund_transaction_id": "WXREFUND20260220001",
|
||||
"reviewer_id": 2,
|
||||
"review_time": "2026-02-20 16:30:00",
|
||||
"reject_reason": null,
|
||||
"status": 2,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊-专业版退款(已通过)"
|
||||
}
|
||||
]
|
||||
@@ -46,25 +46,5 @@
|
||||
"privacy": "https://fastapiadmin.com/privacy",
|
||||
"clause": "https://fastapiadmin.com/clause",
|
||||
"git_code": null
|
||||
},
|
||||
{
|
||||
"name": "星辰科技有限公司",
|
||||
"code": "STAR",
|
||||
"contact_name": "张明",
|
||||
"contact_phone": "13800001001",
|
||||
"contact_email": "zhang@star-tech.dev",
|
||||
"package_id": 2,
|
||||
"description": "中型科技企业,使用标准版套餐",
|
||||
"copyright": "2026 星辰科技"
|
||||
},
|
||||
{
|
||||
"name": "创新工坊",
|
||||
"code": "INNO",
|
||||
"contact_name": "李芳",
|
||||
"contact_phone": "13800002001",
|
||||
"contact_email": "li@inno.work",
|
||||
"package_id": 1,
|
||||
"description": "初创团队,使用基础版免费试用",
|
||||
"copyright": "2026 创新工坊"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -37,14 +37,8 @@
|
||||
},
|
||||
{
|
||||
"tenant_id": 2,
|
||||
"plugin_id": 3,
|
||||
"enabled": true,
|
||||
"installed_time": "2024-01-01 00:00:00"
|
||||
},
|
||||
{
|
||||
"tenant_id": 2,
|
||||
"plugin_id": 5,
|
||||
"plugin_id": 2,
|
||||
"enabled": true,
|
||||
"installed_time": "2024-01-01 00:00:00"
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -19,43 +19,13 @@
|
||||
},
|
||||
{
|
||||
"user_id": 4,
|
||||
"tenant_id": 1,
|
||||
"role": "member",
|
||||
"tenant_id": 2,
|
||||
"role": "owner",
|
||||
"is_default": 1
|
||||
},
|
||||
{
|
||||
"user_id": 5,
|
||||
"tenant_id": 1,
|
||||
"role": "member",
|
||||
"is_default": 1
|
||||
},
|
||||
{
|
||||
"user_id": 1,
|
||||
"tenant_id": 3,
|
||||
"role": "owner",
|
||||
"is_default": 0
|
||||
},
|
||||
{
|
||||
"user_id": 6,
|
||||
"tenant_id": 3,
|
||||
"role": "owner",
|
||||
"is_default": 1
|
||||
},
|
||||
{
|
||||
"user_id": 7,
|
||||
"tenant_id": 3,
|
||||
"role": "member",
|
||||
"is_default": 1
|
||||
},
|
||||
{
|
||||
"user_id": 8,
|
||||
"tenant_id": 4,
|
||||
"role": "owner",
|
||||
"is_default": 1
|
||||
},
|
||||
{
|
||||
"user_id": 9,
|
||||
"tenant_id": 4,
|
||||
"tenant_id": 2,
|
||||
"role": "member",
|
||||
"is_default": 1
|
||||
}
|
||||
|
||||
@@ -80,62 +80,12 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "星辰研发中心",
|
||||
"code": "STAR_RND",
|
||||
"name": "测试租户技术部",
|
||||
"code": "TEST_TECH",
|
||||
"order": 1,
|
||||
"tenant_id": 3,
|
||||
"tenant_id": 2,
|
||||
"parent_id": null,
|
||||
"status": 0,
|
||||
"description": "星辰科技研发部门",
|
||||
"children": [
|
||||
{
|
||||
"name": "前端组",
|
||||
"code": "STAR_FE",
|
||||
"order": 1,
|
||||
"tenant_id": 3,
|
||||
"status": 0
|
||||
},
|
||||
{
|
||||
"name": "后端组",
|
||||
"code": "STAR_BE",
|
||||
"order": 2,
|
||||
"tenant_id": 3,
|
||||
"status": 0
|
||||
},
|
||||
{
|
||||
"name": "测试组",
|
||||
"code": "STAR_QA",
|
||||
"order": 3,
|
||||
"tenant_id": 3,
|
||||
"status": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "星辰市场部",
|
||||
"code": "STAR_MKT",
|
||||
"order": 2,
|
||||
"tenant_id": 3,
|
||||
"parent_id": null,
|
||||
"status": 0,
|
||||
"description": "星辰科技市场部门"
|
||||
},
|
||||
{
|
||||
"name": "创新产品部",
|
||||
"code": "INNO_PROD",
|
||||
"order": 1,
|
||||
"tenant_id": 4,
|
||||
"parent_id": null,
|
||||
"status": 0,
|
||||
"description": "创新工坊产品团队"
|
||||
},
|
||||
{
|
||||
"name": "创新技术部",
|
||||
"code": "INNO_TECH",
|
||||
"order": 2,
|
||||
"tenant_id": 4,
|
||||
"parent_id": null,
|
||||
"status": 0,
|
||||
"description": "创新工坊技术团队"
|
||||
"description": "测试租户技术部门"
|
||||
}
|
||||
]
|
||||
@@ -248,7 +248,7 @@
|
||||
},
|
||||
{
|
||||
"dict_sort": 1,
|
||||
"dict_label": "默认(Memory)",
|
||||
"dict_label": "默认(Redis)",
|
||||
"dict_value": "default",
|
||||
"dict_type": "sys_job_store",
|
||||
"dict_type_id": 6,
|
||||
@@ -256,7 +256,7 @@
|
||||
"list_class": null,
|
||||
"is_default": true,
|
||||
"status": 0,
|
||||
"description": "默认分组",
|
||||
"description": "默认分组,支持多Worker部署",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
@@ -269,20 +269,20 @@
|
||||
"list_class": null,
|
||||
"is_default": false,
|
||||
"status": 0,
|
||||
"description": "数据库分组",
|
||||
"description": "数据库分组,持久化存储",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"dict_sort": 3,
|
||||
"dict_label": "数据库(Redis)",
|
||||
"dict_value": "redis",
|
||||
"dict_label": "内存(Memory)",
|
||||
"dict_value": "memory",
|
||||
"dict_type": "sys_job_store",
|
||||
"dict_type_id": 6,
|
||||
"css_class": "",
|
||||
"list_class": null,
|
||||
"is_default": false,
|
||||
"status": 0,
|
||||
"description": "reids分组",
|
||||
"description": "内存分组,仅单进程测试使用",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
[
|
||||
{
|
||||
"username": "super",
|
||||
"status": 1,
|
||||
"login_location": "陕西省西安市",
|
||||
"login_ip": "127.0.0.1",
|
||||
"request_os": "macOS 14.5",
|
||||
"request_browser": "Chrome 125",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "admin",
|
||||
"status": 1,
|
||||
"login_location": "陕西省西安市",
|
||||
"login_ip": "127.0.0.1",
|
||||
"request_os": "macOS 14.5",
|
||||
"request_browser": "Chrome 125",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "user",
|
||||
"status": 1,
|
||||
"login_location": "北京市",
|
||||
"login_ip": "192.168.1.100",
|
||||
"request_os": "Windows 11",
|
||||
"request_browser": "Edge 125",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "super",
|
||||
"status": 2,
|
||||
"login_location": "广东省深圳市",
|
||||
"login_ip": "203.0.113.50",
|
||||
"request_os": "Unknown",
|
||||
"request_browser": "Unknown",
|
||||
"msg": "密码错误,剩余尝试次数: 4",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "product",
|
||||
"status": 1,
|
||||
"login_location": "上海市",
|
||||
"login_ip": "10.0.0.88",
|
||||
"request_os": "macOS 14.6",
|
||||
"request_browser": "Safari 17.5",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "zhang_admin",
|
||||
"status": 1,
|
||||
"login_location": "浙江省杭州市",
|
||||
"login_ip": "172.16.0.10",
|
||||
"request_os": "Windows 10",
|
||||
"request_browser": "Chrome 124",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 3
|
||||
},
|
||||
{
|
||||
"username": "wang_dev",
|
||||
"status": 1,
|
||||
"login_location": "浙江省杭州市",
|
||||
"login_ip": "172.16.0.20",
|
||||
"request_os": "Ubuntu 22.04",
|
||||
"request_browser": "Firefox 126",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 3
|
||||
},
|
||||
{
|
||||
"username": "li_admin",
|
||||
"status": 1,
|
||||
"login_location": "四川省成都市",
|
||||
"login_ip": "10.10.10.5",
|
||||
"request_os": "macOS 15.0",
|
||||
"request_browser": "Chrome 126",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 4
|
||||
},
|
||||
{
|
||||
"username": "zhao_eng",
|
||||
"status": 1,
|
||||
"login_location": "四川省成都市",
|
||||
"login_ip": "10.10.10.6",
|
||||
"request_os": "macOS 15.0",
|
||||
"request_browser": "Chrome 126",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 4
|
||||
},
|
||||
{
|
||||
"username": "hr",
|
||||
"status": 2,
|
||||
"login_location": "陕西省西安市",
|
||||
"login_ip": "127.0.0.1",
|
||||
"request_os": "Windows 11",
|
||||
"request_browser": "Chrome 125",
|
||||
"msg": "账号已被锁定,请15分钟后重试",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "super",
|
||||
"status": 1,
|
||||
"login_location": "日本东京",
|
||||
"login_ip": "203.104.209.5",
|
||||
"request_os": "iOS 18.0",
|
||||
"request_browser": "Safari Mobile",
|
||||
"msg": "登录成功",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"username": "test_user",
|
||||
"status": 2,
|
||||
"login_location": "美国洛杉矶",
|
||||
"login_ip": "198.51.100.1",
|
||||
"request_os": "Unknown",
|
||||
"request_browser": "Unknown",
|
||||
"msg": "用户不存在",
|
||||
"tenant_id": 1
|
||||
}
|
||||
]
|
||||
@@ -1,50 +0,0 @@
|
||||
[
|
||||
{
|
||||
"notice_title": "系统上线公告",
|
||||
"notice_content": "<p>欢迎使用 FastApiAdmin 系统!</p><p>这是一个功能强大的权限管理系统,支持多租户、角色权限控制等功能。</p>",
|
||||
"notice_type": "2",
|
||||
"status": 0,
|
||||
"description": "系统上线公告",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"notice_title": "系统维护通知",
|
||||
"notice_content": "<p>系统将于本周六凌晨2:00-4:00进行例行维护,请提前保存工作。</p>",
|
||||
"notice_type": "1",
|
||||
"status": 0,
|
||||
"description": "系统维护通知",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"notice_title": "新功能发布",
|
||||
"notice_content": "<p>本次更新新增了工作流引擎、代码生成器等功能,欢迎体验!</p>",
|
||||
"notice_type": "2",
|
||||
"status": 0,
|
||||
"description": "新功能发布",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"notice_title": "安全更新提醒",
|
||||
"notice_content": "<p>请所有用户尽快更新密码,建议使用至少8位包含大小写字母、数字和特殊字符的强密码。</p><p>更新方法:登录后进入「个人中心」->「修改密码」。</p>",
|
||||
"notice_type": "1",
|
||||
"status": 0,
|
||||
"description": "安全更新提醒",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"notice_title": "节假日值班安排",
|
||||
"notice_content": "<p>春节假期(2月10日-2月17日)期间系统值班安排如下:</p><p>联系电话:138-0000-0000</p><p>紧急问题请直接联系值班人员。</p>",
|
||||
"notice_type": "1",
|
||||
"status": 0,
|
||||
"description": "节假日值班通知",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"notice_title": "v2.0 版本升级公告",
|
||||
"notice_content": "<p>v2.0 大版本即将发布,主要更新:</p><ul><li>全新工作流引擎</li><li>AI助手集成</li><li>代码生成器增强</li><li>性能优化 30%</li></ul><p>升级时间另行通知。</p>",
|
||||
"notice_type": "2",
|
||||
"status": 0,
|
||||
"description": "v2.0 版本升级公告",
|
||||
"tenant_id": 1
|
||||
}
|
||||
]
|
||||
@@ -1,52 +0,0 @@
|
||||
[
|
||||
{
|
||||
"user_id": 1,
|
||||
"notice_id": 1,
|
||||
"read_time": "2025-06-01 09:15:00"
|
||||
},
|
||||
{
|
||||
"user_id": 1,
|
||||
"notice_id": 2,
|
||||
"read_time": "2025-06-10 08:30:00"
|
||||
},
|
||||
{
|
||||
"user_id": 1,
|
||||
"notice_id": 3,
|
||||
"read_time": "2025-07-01 10:00:00"
|
||||
},
|
||||
{
|
||||
"user_id": 2,
|
||||
"notice_id": 1,
|
||||
"read_time": "2025-06-01 09:20:00"
|
||||
},
|
||||
{
|
||||
"user_id": 2,
|
||||
"notice_id": 2,
|
||||
"read_time": "2025-06-10 09:00:00"
|
||||
},
|
||||
{
|
||||
"user_id": 3,
|
||||
"notice_id": 1,
|
||||
"read_time": "2025-06-01 10:30:00"
|
||||
},
|
||||
{
|
||||
"user_id": 4,
|
||||
"notice_id": 1,
|
||||
"read_time": "2025-06-02 14:00:00"
|
||||
},
|
||||
{
|
||||
"user_id": 5,
|
||||
"notice_id": 1,
|
||||
"read_time": "2025-06-03 11:00:00"
|
||||
},
|
||||
{
|
||||
"user_id": 6,
|
||||
"notice_id": 6,
|
||||
"read_time": "2025-06-20 10:00:00"
|
||||
},
|
||||
{
|
||||
"user_id": 8,
|
||||
"notice_id": 2,
|
||||
"read_time": "2025-06-10 16:00:00"
|
||||
}
|
||||
]
|
||||
@@ -1,152 +0,0 @@
|
||||
[
|
||||
{
|
||||
"request_path": "/api/v1/system/auth/login",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"username\": \"super\", \"password\": \"***\"}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"登录成功\"}",
|
||||
"process_time": "45ms",
|
||||
"tenant_id": 1,
|
||||
"description": "用户登录"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/user/current/info",
|
||||
"request_method": "GET",
|
||||
"request_payload": null,
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"data\": {\"username\": \"super\"}}",
|
||||
"process_time": "12ms",
|
||||
"tenant_id": 1,
|
||||
"description": "获取当前用户信息"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/platform/menu/create",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"name\": \"测试菜单\", \"type\": 2, \"parent_id\": 1}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"创建成功\"}",
|
||||
"process_time": "23ms",
|
||||
"tenant_id": 1,
|
||||
"description": "创建菜单"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/user/update/3",
|
||||
"request_method": "PUT",
|
||||
"request_payload": "{\"name\": \"普通用户\", \"status\": 0}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"更新成功\"}",
|
||||
"process_time": "18ms",
|
||||
"tenant_id": 1,
|
||||
"description": "更新用户信息"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/dept/create",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"name\": \"测试部门\", \"parent_id\": 1}",
|
||||
"response_code": 400,
|
||||
"response_json": "{\"code\": 400, \"msg\": \"部门编码已存在\"}",
|
||||
"process_time": "8ms",
|
||||
"tenant_id": 1,
|
||||
"description": "创建部门(失败)"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/role/delete",
|
||||
"request_method": "DELETE",
|
||||
"request_payload": "{\"ids\": [5]}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"删除成功\"}",
|
||||
"process_time": "15ms",
|
||||
"tenant_id": 1,
|
||||
"description": "删除角色"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/platform/menu/list",
|
||||
"request_method": "GET",
|
||||
"request_payload": null,
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"data\": {\"items\": [...]}}",
|
||||
"process_time": "35ms",
|
||||
"tenant_id": 3,
|
||||
"description": "查询菜单列表"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/dict/data/list",
|
||||
"request_method": "GET",
|
||||
"request_payload": null,
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"data\": {\"items\": [...]}}",
|
||||
"process_time": "22ms",
|
||||
"tenant_id": 3,
|
||||
"description": "查询字典数据"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/workflow/definition/create",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"name\": \"审批流程\", \"code\": \"approval_v1\"}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"创建成功\"}",
|
||||
"process_time": "28ms",
|
||||
"tenant_id": 4,
|
||||
"description": "创建工作流"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/notice/create",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"notice_title\": \"测试通知\", \"notice_type\": \"1\"}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"创建成功\"}",
|
||||
"process_time": "11ms",
|
||||
"tenant_id": 1,
|
||||
"description": "创建通知"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/user/export",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"status\": 0}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"file\": \"用户列表_20250601.xlsx\"}",
|
||||
"process_time": "156ms",
|
||||
"tenant_id": 1,
|
||||
"description": "导出用户数据"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/system/user/import",
|
||||
"request_method": "POST",
|
||||
"request_payload": "\"file\": \"users.xlsx\" (multipart/form-data)",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"成功导入 25 条数据\"}",
|
||||
"process_time": "320ms",
|
||||
"tenant_id": 1,
|
||||
"description": "批量导入用户"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/cronjob/node/execute/1",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"trigger\": \"now\"}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"调试节点成功\"}",
|
||||
"process_time": "1024ms",
|
||||
"tenant_id": 1,
|
||||
"description": "执行定时任务节点"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/workflow/definition/execute",
|
||||
"request_method": "POST",
|
||||
"request_payload": "{\"workflow_id\": 1, \"variables\": {}}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"data\": {\"status\": \"completed\"}}",
|
||||
"process_time": "3200ms",
|
||||
"tenant_id": 4,
|
||||
"description": "执行工作流"
|
||||
},
|
||||
{
|
||||
"request_path": "/api/v1/cronjob/job/log/delete",
|
||||
"request_method": "DELETE",
|
||||
"request_payload": "{\"ids\": [1, 2, 3]}",
|
||||
"response_code": 200,
|
||||
"response_json": "{\"code\": 200, \"msg\": \"删除成功\"}",
|
||||
"process_time": "19ms",
|
||||
"tenant_id": 1,
|
||||
"description": "批量删除执行日志"
|
||||
}
|
||||
]
|
||||
@@ -2,16 +2,16 @@
|
||||
{
|
||||
"config_name": "演示模式启用",
|
||||
"config_key": "demo_enable",
|
||||
"config_value": "false",
|
||||
"config_value": "off",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "是否启用演示模式",
|
||||
"description": "是否启用演示模式(启用后非白名单IP只允许GET请求)",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "演示访问IP白名单",
|
||||
"config_key": "ip_white_list",
|
||||
"config_value": "[\"127.0.0.1\", \"223.104.209.37\"]",
|
||||
"config_value": "[\"127.0.0.1\"]",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "演示模式下允许访问的IP列表",
|
||||
@@ -32,79 +32,7 @@
|
||||
"config_value": "[]",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "禁止访问的IP列表",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "登录失败次数限制",
|
||||
"config_key": "login_failed_limit",
|
||||
"config_value": "5",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "登录失败最大次数",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "登录锁定时间(分钟)",
|
||||
"config_key": "login_lock_time",
|
||||
"config_value": "15",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "登录失败后锁定时间",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "Token过期时间(分钟)",
|
||||
"config_key": "token_expire_minutes",
|
||||
"config_value": "120",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "Access Token过期时间",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "Refresh Token过期时间(天)",
|
||||
"config_key": "refresh_token_expire_days",
|
||||
"config_value": "7",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "Refresh Token过期时间",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "密码有效期(天)",
|
||||
"config_key": "password_expire_days",
|
||||
"config_value": "90",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "密码有效期",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "密码最小长度",
|
||||
"config_key": "password_min_length",
|
||||
"config_value": "6",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "密码最小长度",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "是否启用验证码",
|
||||
"config_key": "captcha_enable",
|
||||
"config_value": "true",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "登录时是否启用验证码",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "是否记录操作日志",
|
||||
"config_key": "operation_log_enable",
|
||||
"config_value": "true",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "是否记录用户操作日志",
|
||||
"description": "禁止访问的IP列表(任意请求均拒绝)",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
@@ -113,34 +41,7 @@
|
||||
"config_value": "90",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "操作日志保留天数",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "登录日志保留天数",
|
||||
"config_key": "login_log_retention_days",
|
||||
"config_value": "30",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "登录日志保留天数",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "文件上传大小限制(MB)",
|
||||
"config_key": "file_upload_max_size",
|
||||
"config_value": "50",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "单个文件上传最大大小",
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"config_name": "是否启用IP归属地查询",
|
||||
"config_key": "ip_location_enable",
|
||||
"config_value": "false",
|
||||
"config_type": true,
|
||||
"status": 0,
|
||||
"description": "登录时是否查询IP归属地",
|
||||
"description": "操作日志保留天数,调度器定期清理过期日志",
|
||||
"tenant_id": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -27,39 +27,21 @@
|
||||
"tenant_id": 1
|
||||
},
|
||||
{
|
||||
"name": "星辰管理员",
|
||||
"code": "STAR_ADMIN",
|
||||
"name": "测试租户管理员",
|
||||
"code": "TEST_ADMIN",
|
||||
"order": 1,
|
||||
"data_scope": 4,
|
||||
"tenant_id": 3,
|
||||
"tenant_id": 2,
|
||||
"status": 0,
|
||||
"description": "星辰科技有限公司管理员"
|
||||
"description": "测试租户管理员"
|
||||
},
|
||||
{
|
||||
"name": "星辰员工",
|
||||
"code": "STAR_STAFF",
|
||||
"name": "测试租户员工",
|
||||
"code": "TEST_STAFF",
|
||||
"order": 2,
|
||||
"data_scope": 2,
|
||||
"tenant_id": 3,
|
||||
"tenant_id": 2,
|
||||
"status": 0,
|
||||
"description": "星辰科技有限公司普通员工"
|
||||
},
|
||||
{
|
||||
"name": "创新管理员",
|
||||
"code": "INNO_ADMIN",
|
||||
"order": 1,
|
||||
"data_scope": 4,
|
||||
"tenant_id": 4,
|
||||
"status": 0,
|
||||
"description": "创新工坊管理员"
|
||||
},
|
||||
{
|
||||
"name": "创新员工",
|
||||
"code": "INNO_STAFF",
|
||||
"order": 2,
|
||||
"data_scope": 2,
|
||||
"tenant_id": 4,
|
||||
"status": 0,
|
||||
"description": "创新工坊普通员工"
|
||||
"description": "测试租户普通员工"
|
||||
}
|
||||
]
|
||||
@@ -1,98 +0,0 @@
|
||||
[
|
||||
{
|
||||
"title": "系统登录页面优化建议",
|
||||
"ticket_content": "<p>建议在登录页面增加记住密码功能和第三方登录入口,提升用户体验。</p>",
|
||||
"summary": "建议在登录页面增加记住密码功能和第三方登录入口",
|
||||
"ticket_type": "suggestion",
|
||||
"images": null,
|
||||
"reply": "感谢您的建议,我们将在下个版本中加入记住密码功能。",
|
||||
"assigned_id": 2,
|
||||
"status": 2,
|
||||
"tenant_id": 1,
|
||||
"description": "用户体验优化"
|
||||
},
|
||||
{
|
||||
"title": "表格导出功能异常",
|
||||
"ticket_content": "<p>当数据量超过1000条时,导出Excel功能会超时失败。</p>",
|
||||
"summary": "数据量超过1000条导出Excel超时",
|
||||
"ticket_type": "bug",
|
||||
"images": null,
|
||||
"reply": null,
|
||||
"assigned_id": 3,
|
||||
"status": 1,
|
||||
"tenant_id": 1,
|
||||
"description": "导出功能问题"
|
||||
},
|
||||
{
|
||||
"title": "希望增加批量删除功能",
|
||||
"ticket_content": "<p>用户管理页面希望支持批量选择删除,提高管理效率。</p>",
|
||||
"summary": "用户管理页面希望支持批量选择删除",
|
||||
"ticket_type": "optimize",
|
||||
"images": null,
|
||||
"reply": null,
|
||||
"assigned_id": null,
|
||||
"status": 0,
|
||||
"tenant_id": 1,
|
||||
"description": "功能优化建议"
|
||||
},
|
||||
{
|
||||
"title": "手机端适配问题反馈",
|
||||
"ticket_content": "<p>在iPhone Safari浏览器上,菜单栏折叠后无法展开,需要刷新页面才能恢复。</p>",
|
||||
"summary": "iPhone Safari菜单折叠后无法展开",
|
||||
"ticket_type": "bug",
|
||||
"images": "[\"https://example.com/screenshot1.png\"]",
|
||||
"reply": null,
|
||||
"assigned_id": 4,
|
||||
"status": 1,
|
||||
"tenant_id": 1,
|
||||
"description": "移动端兼容性问题"
|
||||
},
|
||||
{
|
||||
"title": "增加数据权限粒度",
|
||||
"ticket_content": "<p>当前数据权限只能控制到部门级别,希望能支持自定义数据范围,如只查看本人创建的数据、指定项目范围等。</p>",
|
||||
"summary": "数据权限需要支持自定义范围",
|
||||
"ticket_type": "optimize",
|
||||
"images": null,
|
||||
"reply": "已纳入Q3规划,感谢反馈。",
|
||||
"assigned_id": 2,
|
||||
"status": 2,
|
||||
"tenant_id": 1,
|
||||
"description": "数据权限增强"
|
||||
},
|
||||
{
|
||||
"title": "工作流审批节点无法修改",
|
||||
"ticket_content": "<p>已发布的工作流无法修改审批节点配置,需要先取消发布才能修改,操作繁琐。</p>",
|
||||
"summary": "已发布工作流无法直接修改节点",
|
||||
"ticket_type": "bug",
|
||||
"images": null,
|
||||
"reply": null,
|
||||
"assigned_id": null,
|
||||
"status": 0,
|
||||
"tenant_id": 3,
|
||||
"description": "星辰科技反馈工作流问题"
|
||||
},
|
||||
{
|
||||
"title": "希望增加钉钉集成",
|
||||
"ticket_content": "<p>团队使用钉钉进行日常协作,希望能将通知和待办事项同步到钉钉工作台。</p>",
|
||||
"summary": "希望支持钉钉消息集成",
|
||||
"ticket_type": "suggestion",
|
||||
"images": null,
|
||||
"reply": "我们会评估第三方集成的优先级。",
|
||||
"assigned_id": null,
|
||||
"status": 3,
|
||||
"tenant_id": 4,
|
||||
"description": "创新工坊第三方集成需求"
|
||||
},
|
||||
{
|
||||
"title": "其他-文档链接失效",
|
||||
"ticket_content": "<p>帮助文档中的API接口说明链接跳转404,影响开发对接。</p>",
|
||||
"summary": "帮助文档API链接404",
|
||||
"ticket_type": "other",
|
||||
"images": null,
|
||||
"reply": null,
|
||||
"assigned_id": 3,
|
||||
"status": 0,
|
||||
"tenant_id": 1,
|
||||
"description": "文档链接问题"
|
||||
}
|
||||
]
|
||||
@@ -63,89 +63,25 @@
|
||||
"updated_id": null
|
||||
},
|
||||
{
|
||||
"tenant_id": 1,
|
||||
"username": "product",
|
||||
"password": "$pbkdf2-sha256$600000$XX20aO1v73xS0JnoewXNtw==$PEaVHV1N5L7PfYQw2lCAQOc4hAEyCiwsGR48/jgVBjU=",
|
||||
"name": "产品经理",
|
||||
"mobile": "13800138003",
|
||||
"email": "product@example.com",
|
||||
"gender": "1",
|
||||
"avatar": "https://service.fastapiadmin.com/api/v1/static/image/avatar.png",
|
||||
"is_superuser": false,
|
||||
"last_login": null,
|
||||
"gitee_login": null,
|
||||
"github_login": null,
|
||||
"wx_login": null,
|
||||
"qq_login": null,
|
||||
"dept_id": 5,
|
||||
"status": 0,
|
||||
"description": "产品经理",
|
||||
"created_id": 1,
|
||||
"updated_id": null
|
||||
},
|
||||
{
|
||||
"tenant_id": 1,
|
||||
"username": "hr",
|
||||
"password": "$pbkdf2-sha256$600000$XX20aO1v73xS0JnoewXNtw==$PEaVHV1N5L7PfYQw2lCAQOc4hAEyCiwsGR48/jgVBjU=",
|
||||
"name": "HR专员",
|
||||
"mobile": "13800138004",
|
||||
"email": "hr@example.com",
|
||||
"gender": "1",
|
||||
"avatar": "https://service.fastapiadmin.com/api/v1/static/image/avatar.png",
|
||||
"is_superuser": false,
|
||||
"last_login": null,
|
||||
"gitee_login": null,
|
||||
"github_login": null,
|
||||
"wx_login": null,
|
||||
"qq_login": null,
|
||||
"dept_id": 6,
|
||||
"status": 0,
|
||||
"description": "人力资源专员",
|
||||
"created_id": 1,
|
||||
"updated_id": null
|
||||
},
|
||||
{
|
||||
"tenant_id": 3,
|
||||
"username": "zhang_admin",
|
||||
"tenant_id": 2,
|
||||
"username": "test_admin",
|
||||
"password": "$pbkdf2-sha256$600000$E8jfd18sWu7N9DWsx/nYKg==$9DNKCv+dm1QDvYXwpQlZH6e7trYp1WCPdsvSyzXwuo0=",
|
||||
"name": "张明",
|
||||
"mobile": "13800001001",
|
||||
"email": "zhang@star-tech.dev",
|
||||
"name": "测试管理员",
|
||||
"mobile": "13800138001",
|
||||
"email": "test@fastapiadmin.com",
|
||||
"status": 0,
|
||||
"is_superuser": false,
|
||||
"description": "星辰科技管理员"
|
||||
"description": "测试租户管理员"
|
||||
},
|
||||
{
|
||||
"tenant_id": 3,
|
||||
"username": "wang_dev",
|
||||
"tenant_id": 2,
|
||||
"username": "test_user",
|
||||
"password": "$pbkdf2-sha256$600000$E8jfd18sWu7N9DWsx/nYKg==$9DNKCv+dm1QDvYXwpQlZH6e7trYp1WCPdsvSyzXwuo0=",
|
||||
"name": "王华",
|
||||
"mobile": "13800001002",
|
||||
"email": "wang@star-tech.dev",
|
||||
"name": "测试用户",
|
||||
"mobile": "13800138002",
|
||||
"email": "test2@fastapiadmin.com",
|
||||
"status": 0,
|
||||
"is_superuser": false,
|
||||
"description": "星辰科技研发工程师"
|
||||
},
|
||||
{
|
||||
"tenant_id": 4,
|
||||
"username": "li_admin",
|
||||
"password": "$pbkdf2-sha256$600000$E8jfd18sWu7N9DWsx/nYKg==$9DNKCv+dm1QDvYXwpQlZH6e7trYp1WCPdsvSyzXwuo0=",
|
||||
"name": "李芳",
|
||||
"mobile": "13800002001",
|
||||
"email": "li@inno.work",
|
||||
"status": 0,
|
||||
"is_superuser": false,
|
||||
"description": "创新工坊创始人"
|
||||
},
|
||||
{
|
||||
"tenant_id": 4,
|
||||
"username": "zhao_eng",
|
||||
"password": "$pbkdf2-sha256$600000$E8jfd18sWu7N9DWsx/nYKg==$9DNKCv+dm1QDvYXwpQlZH6e7trYp1WCPdsvSyzXwuo0=",
|
||||
"name": "赵强",
|
||||
"mobile": "13800002002",
|
||||
"email": "zhao@inno.work",
|
||||
"status": 0,
|
||||
"is_superuser": false,
|
||||
"description": "创新工坊技术合伙人"
|
||||
"description": "测试租户普通用户"
|
||||
}
|
||||
]
|
||||
]
|
||||
@@ -13,26 +13,10 @@
|
||||
},
|
||||
{
|
||||
"user_id": 4,
|
||||
"role_id": 3
|
||||
},
|
||||
{
|
||||
"user_id": 5,
|
||||
"role_id": 3
|
||||
},
|
||||
{
|
||||
"user_id": 6,
|
||||
"role_id": 4
|
||||
},
|
||||
{
|
||||
"user_id": 7,
|
||||
"user_id": 5,
|
||||
"role_id": 5
|
||||
},
|
||||
{
|
||||
"user_id": 8,
|
||||
"role_id": 6
|
||||
},
|
||||
{
|
||||
"user_id": 9,
|
||||
"role_id": 7
|
||||
}
|
||||
]
|
||||
@@ -1,70 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "演示任务",
|
||||
"code": "demo_job",
|
||||
"jobstore": "default",
|
||||
"executor": "default",
|
||||
"trigger": null,
|
||||
"trigger_args": null,
|
||||
"func": "import logging\n\ndef handler(*args, **kwargs):\n \"\"\"演示任务:打印参数并返回执行摘要\"\"\"\n logger = logging.getLogger(__name__)\n logger.info(f\"演示任务执行中,参数: args={args}, kwargs={kwargs}\")\n return {\n \"status\": \"success\",\n \"message\": \"演示任务执行成功\",\n \"args_received\": len(args),\n \"kwargs_keys\": list(kwargs.keys())\n }\n",
|
||||
"args": null,
|
||||
"kwargs": null,
|
||||
"coalesce": false,
|
||||
"max_instances": 1,
|
||||
"start_date": null,
|
||||
"end_date": null,
|
||||
"status": 0,
|
||||
"description": "最简演示任务,用于验证调度器基本功能"
|
||||
},
|
||||
{
|
||||
"name": "数据库清理任务",
|
||||
"code": "db_cleanup",
|
||||
"jobstore": "sqlalchemy",
|
||||
"executor": "default",
|
||||
"trigger": null,
|
||||
"trigger_args": null,
|
||||
"func": "import logging\nfrom datetime import datetime, timedelta\n\ndef handler(*args, **kwargs):\n \"\"\"清理过期数据:删除N天前的日志和临时数据\"\"\"\n logger = logging.getLogger(__name__)\n days = kwargs.get(\"days\", 90)\n cutoff = datetime.now() - timedelta(days=days)\n logger.info(f\"清理 {cutoff.strftime('%Y-%m-%d')} 之前的过期数据...\")\n return {\n \"status\": \"success\",\n \"cutoff_date\": cutoff.strftime(\"%Y-%m-%d %H:%M:%S\"),\n \"deleted_count\": 0\n }\n",
|
||||
"args": null,
|
||||
"kwargs": "{\"days\": 30}",
|
||||
"coalesce": true,
|
||||
"max_instances": 1,
|
||||
"start_date": null,
|
||||
"end_date": null,
|
||||
"status": 0,
|
||||
"description": "清理过期操作日志和临时数据,建议每天凌晨3点执行"
|
||||
},
|
||||
{
|
||||
"name": "健康检查任务",
|
||||
"code": "health_check",
|
||||
"jobstore": "default",
|
||||
"executor": "default",
|
||||
"trigger": null,
|
||||
"trigger_args": null,
|
||||
"func": "import logging\nimport psutil\n\ndef handler(*args, **kwargs):\n \"\"\"系统健康检查:采集 CPU、内存、磁盘使用率\"\"\"\n logger = logging.getLogger(__name__)\n cpu = psutil.cpu_percent(interval=1)\n mem = psutil.virtual_memory()\n disk = psutil.disk_usage(\"/\")\n status = \"healthy\" if cpu < 80 and mem.percent < 90 and disk.percent < 90 else \"warning\"\n logger.info(f\"健康检查: CPU={cpu}% MEM={mem.percent}% DISK={disk.percent}%\")\n return {\n \"status\": status,\n \"cpu_percent\": cpu,\n \"memory_percent\": mem.percent,\n \"disk_percent\": disk.percent,\n \"memory_total_gb\": round(mem.total / (1024**3), 1),\n \"disk_total_gb\": round(disk.total / (1024**3), 1)\n }\n",
|
||||
"args": null,
|
||||
"kwargs": null,
|
||||
"coalesce": true,
|
||||
"max_instances": 1,
|
||||
"start_date": null,
|
||||
"end_date": null,
|
||||
"status": 0,
|
||||
"description": "系统资源健康检查,建议每5分钟执行一次"
|
||||
},
|
||||
{
|
||||
"name": "邮件批量发送",
|
||||
"code": "email_batch",
|
||||
"jobstore": "sqlalchemy",
|
||||
"executor": "default",
|
||||
"trigger": null,
|
||||
"trigger_args": null,
|
||||
"func": "import logging\n\ndef handler(*args, **kwargs):\n \"\"\"批量发送待发送邮件\"\"\"\n logger = logging.getLogger(__name__)\n batch_size = kwargs.get(\"batch_size\", 50)\n logger.info(f\"开始批量发送邮件,每批 {batch_size} 封...\")\n return {\n \"status\": \"success\",\n \"sent_count\": 0,\n \"failed_count\": 0,\n \"batch_size\": batch_size\n }\n",
|
||||
"args": null,
|
||||
"kwargs": "{\"batch_size\": 50}",
|
||||
"coalesce": false,
|
||||
"max_instances": 2,
|
||||
"start_date": null,
|
||||
"end_date": null,
|
||||
"status": 0,
|
||||
"description": "批量发送待发送邮件,建议每分钟执行一次"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user