it0/packages/services
hailin 5ff8bda99e feat(notification): 完整站内消息推送体系 (Phase 1-4)
## Phase 1 — 精准推送基础
- 新增 notification-service 微服务 (port 3013)
- DB迁移 007: notifications, notification_reads, notification_tenant_targets 表
- DB迁移 008: tenant_tags, tenant_tag_assignments, notification_user_targets 表
  + notifications 表新增 target_tag_ids/target_tag_logic/target_plans/target_statuses/channel_key 字段
- auth-service: TenantTagController — 租户标签 CRUD + 批量分配 (9个接口)
- notification-service 支持 7 种推送目标类型:
  ALL / SPECIFIC_TENANTS / SPECIFIC_USERS / BY_TENANT_TAG(ANY|ALL) / BY_PLAN / BY_TENANT_STATUS / BY_SEGMENT
- Web Admin: /tenant-tags 标签管理页 + 通知表单全面扩展

## Phase 2 — 通知频道与用户偏好
- DB迁移 009: notification_channels (6个预置频道) + user_notification_preferences
  + notification_segment_members 表 (Phase 4 人群包)
- notification-service: ChannelRepository + NotificationChannelController
  (频道 CRUD + 用户偏好 API,强制频道不可关闭)
- Web Admin: /notification-channels 频道管理页
- Flutter: NotificationPreferencesPage — 用户按频道 toggle 订阅,profile页新增入口

## Phase 3 — Campaign 活动与数据分析
- DB迁移 010: notification_campaigns, campaign_execution_log, notification_event_log 表
- notification-service: CampaignRepository + CampaignAdminController
  (ONCE/RECURRING调度, 排期/取消/删除, 发送量/阅读率统计)
- Web Admin: /campaigns 推送活动管理页 (状态机 + 数据统计弹窗)

## Phase 4 — 事件触发与人群包
- EventTriggerService: Redis Stream 消费者,监听并自动创建通知:
  billing.payment_failed / billing.quota_warning / tenant.registered / alert.fired
- SegmentRepository + SegmentAdminController (全量同步/增量添加/删除)
- Web Admin: /segments 人群包管理页 (成员管理 + ETL全量替换)

## 基础设施
- Kong: 新增 notification-service 服务 + 6条路由 + JWT插件
- Docker Compose: 新增 notification-service 容器 (13013:3013)
- notification-service 新增 ioredis 依赖 (Redis Stream 消费)

## Flutter (APK需手动编译)
- 新增路由: /notifications/inbox, /notifications/preferences
- 新增: NotificationInboxPage, NotificationPreferencesPage
- 新增: ForceReadNotificationDialog (强制阅读拦截弹窗)
- profile页: 站内消息行(未读角标) + 通知偏好设置入口

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-07 22:33:40 -08:00
..
agent-service fix(agent-service): use hailin168/openclaw-bridge Docker Hub image 2026-03-07 12:21:27 -08:00
audit-service fix(auth): allow platform_admin to access all web-admin endpoints 2026-03-07 05:54:05 -08:00
auth-service feat(notification): 完整站内消息推送体系 (Phase 1-4) 2026-03-07 22:33:40 -08:00
billing-service fix: store tenant slug (not UUID) in current_tenant; remove plan trial periods 2026-03-07 09:01:21 -08:00
comm-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
inventory-service feat(openclaw): Phase 1 — server pool + agent instance deployment infrastructure 2026-03-07 11:11:21 -08:00
monitor-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
notification-service feat(notification): 完整站内消息推送体系 (Phase 1-4) 2026-03-07 22:33:40 -08:00
ops-service fix(ops-service): add new TenantInfo quota fields to inline TenantContextService.run calls 2026-03-04 00:04:36 -08:00
presence-service fix(presence-service): use linux-musl-openssl-3.0.x Prisma binary target for Alpine 2026-03-07 18:19:13 -08:00
referral-service fix(referral-service): add empty prisma dir for Dockerfile.service compatibility 2026-03-07 21:30:43 -08:00
version-service feat(auth): add platform_super_admin role for two-level platform access control 2026-03-07 01:17:27 -08:00
voice-agent feat(voice): add per-turn interrupt support to VoiceSessionManager 2026-03-04 04:25:57 -08:00
voice-service feat: add engine type selection (Agent SDK / Claude API) for voice calls 2026-03-02 02:11:51 -08:00