rwadurian/backend/services/reporting-service/src
hailin 875f86c263 fix(reporting): 修复 contract.signed 事件 BigInt(undefined) 错误
根因:planting-service 发送的 contract.signed 消息为嵌套结构
  { eventName: 'contract.signed', data: { orderNo, userId, ... } }
但 reporting-service handleContractSigned 按扁平结构解析
  message.userId → undefined → BigInt(undefined) → TypeError
导致 ~200 次/10分钟持续报错。

修复:
- 消息类型改为匹配实际嵌套格式 { eventName, data: { ... } }
- 解构 message.data 后再访问各字段
- 添加 userId 防御性检查,避免再次 BigInt 崩溃
- 与 referral-service ContractSigningHandler 消息结构保持一致

影响范围:仅 reporting-service 活动记录,不影响核心业务流程
(referral-service / reward-service 已正确处理嵌套格式)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 07:59:16 -08:00
..
api fix(reporting-service): 修复 DashboardController 的依赖注入问题 2026-01-06 23:12:24 -08:00
application fix(reporting-service): 账户余额改为 累计收入 - 累计转出 2026-01-07 06:41:28 -08:00
config refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
domain feat(reporting-service): 新增多种活动事件类型 2026-01-08 05:51:26 -08:00
infrastructure fix(reporting): 修复 contract.signed 事件 BigInt(undefined) 错误 2026-02-15 07:59:16 -08:00
shared refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
app.module.ts feat(reporting): 实现 Dashboard API 完整功能 2025-12-18 00:31:08 -08:00
main.ts fix(reporting-service): 启动 Kafka 微服务消费者以记录真实活动 2025-12-19 21:50:36 -08:00