rwadurian/backend
hailin 893513ad78 feat(presence): 添加设备档案表,实现事件流水+设备快照分离
大厂标准架构(Amplitude/Mixpanel):
- analytics_event_log: 事件流水(append-only,每条事件一行)
- analytics_device_profile: 设备快照(每台设备一行,upsert 更新)

设备分布查询从 O(events) 降为 O(devices):
- SELECT COUNT(*), device_brand FROM analytics_device_profile GROUP BY device_brand
  不再需要 COUNT(DISTINCT install_id) 扫描全量事件表

ON CONFLICT (install_id) DO UPDATE:
- COALESCE 保留已有字段(不被 NULL 覆盖)
- last_seen_at 每次上报更新
- event_count 累加(可用于活跃度分析)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 19:31:33 -08:00
..
.claude refactor: simplify mpc-service to gateway mode 2025-12-06 17:16:14 -08:00
api-gateway feat(gateway): 添加 transfer-service Kong 路由配置 2026-03-01 22:10:09 -08:00
infrastructure chore(docker): 为 mpc-system、api-gateway、infrastructure 添加时区配置 2025-12-23 18:35:09 -08:00
mpc-system fix(service-party-android): 修复导入钱包签名时 'party not registered' 错误 2026-02-02 03:24:14 -08:00
scripts fix(scripts): 修正容器名为 rwa-blockchain-service 2025-12-15 10:34:25 -08:00
services feat(presence): 添加设备档案表,实现事件流水+设备快照分离 2026-03-05 19:31:33 -08:00
.env.windows fix(referral): 修复 getMyReferralInfo 使用 userId 而不是 accountSequence 的问题 2025-12-14 05:05:03 -08:00
docker-compose.windows.yml fix(mining-service): Redis DB 11 冲突修复,迁移至 DB 16 2026-01-30 02:22:20 -08:00