fix: correlate downstream receipts with submit responses

This commit is contained in:
hectorzhao
2026-07-14 16:22:41 +08:00
parent 135b4fd24e
commit 1ce02ef206
12 changed files with 487 additions and 91 deletions
@@ -0,0 +1,11 @@
ALTER TABLE "SmsMessageRecord"
ADD COLUMN "cmppSubmitSequenceId" TEXT;
UPDATE "CmppDownstreamDelivery"
SET
"status" = 'unconfirmed',
"deliveredAt" = NULL,
"lastError" = 'CMPP_DELIVER_RESP Msg_Id=0,仅确认协议收包,未确认业务回执关联'
WHERE "deliveryType" = 'receipt'
AND "status" = 'delivered'
AND COALESCE("ackMessageId", '0') = '0';
+1
View File
@@ -983,6 +983,7 @@ model SmsMessageRecord {
channelId String?
submitId String?
gatewayMessageId String?
cmppSubmitSequenceId String?
status String @default("queued")
submitStatus String?
receiptStatus String?