feat(health,ai): 后端服务优化 + 媒体文件处理

- erp-health: article/banner/consultation/media 服务层优化
- erp-ai: analysis/insight/prompt 服务增强
- erp-auth: auth/role/token 服务改进
- erp-workflow: executor 执行引擎修复
- erp-plugin: 服务层改进
- 新增媒体上传文件样例
This commit is contained in:
iven
2026-05-13 23:28:57 +08:00
parent e4e5ef04d4
commit 212c08b7ae
30 changed files with 320 additions and 3 deletions

View File

@@ -89,6 +89,7 @@ impl FlowExecutor {
// 消费当前 token
let mut active: token::ActiveModel = current_token.into();
active.version = Set(active.version.unwrap() + 1);
active.status = Set("consumed".to_string());
active.consumed_at = Set(Some(Utc::now()));
active
@@ -599,6 +600,7 @@ impl FlowExecutor {
.ok_or_else(|| WorkflowError::NotFound(format!("流程实例不存在: {instance_id}")))?;
let mut active: process_instance::ActiveModel = instance.into();
active.version = Set(active.version.unwrap() + 1);
active.status = Set("completed".to_string());
active.completed_at = Set(Some(Utc::now()));
active.updated_at = Set(Utc::now());