消息推送

This commit is contained in:
not-like-juvenile
2026-03-10 16:39:50 +08:00
parent ee9fabd806
commit e67016a6f4
18 changed files with 1176 additions and 49 deletions

View File

@@ -84,10 +84,13 @@ Invoke-RestMethod -Uri 'http://localhost:7301/api/v1/notifications' -Method POST
# 3) 等待 2 秒CONSUMER_POLL_MS=2000观察 push-server 控制台:应出现对 CLOUD_FUNC_URL 的 POST
```
- 如何确认是否已处理:在 Supabase 查询最近记录的 `status_code` / `last_error`
-- 如何确认是否已处理:在 Supabase 查询最近记录的 `send_status` / `last_error`
> 说明:`status_code` 是物流/业务状态(由 notify-worker 写入consumer 的投递状态使用 `send_status`。
> 若你的数据库还没有该字段,请先执行迁移:`pages/mall/delivery/doc/需求文档/20260309_add_express_notifications_send_status.sql`。
```sql
select id, message_id, status_code, retry_count, last_error, updated_at
select id, message_id, send_status, status_code, retry_count, last_error, updated_at
from public.express_notifications
order by created_at desc
limit 10;