feat(core): build_event_payload 统一信封 — 28 处事件发布全部迁移

- erp-core 添加 build_event_payload(),自动注入 schema_version + occurred_at
- erp-health 12 个 service(25 处)、erp-auth(1 处)、erp-workflow(2 处)
  全部迁移到统一信封格式
This commit is contained in:
iven
2026-04-27 18:01:05 +08:00
parent d31d7beb1f
commit 97bb592688
16 changed files with 63 additions and 41 deletions

View File

@@ -161,7 +161,7 @@ impl AuthService {
event_bus.publish(erp_core::events::DomainEvent::new(
"user.login",
tenant_id,
serde_json::json!({ "user_id": user_model.id, "username": user_model.username }),
erp_core::events::build_event_payload(serde_json::json!({ "user_id": user_model.id, "username": user_model.username })),
), db).await;
// 审计:登录成功