fix: 第1批 M9 H5 进入资产的临期个人通知写入即已读
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 12m9s

H5 进入资产时已同步弹窗展示临期提醒,通知中心再记未读会重复提醒;
通知按剩余天数每天新增一条,保持未读会持续累积红点。
直发通知载荷新增可选 mark_read,仅临期个人通知设置,其他直发通知与店铺临期通知仍为未读。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
邹进
2026-10-14 10:45:20 +09:00
parent eb98478b09
commit 713045a657
6 changed files with 35 additions and 4 deletions

View File

@@ -108,6 +108,8 @@ func (p *ReminderPublisher) appendNotification(ctx context.Context, tx *gorm.DB,
RecipientID: customerID, NotificationType: constants.NotificationTypePackageExpiring,
TemplateData: expiryTemplateData(candidate), RefType: constants.NotificationRefTypeAsset,
RefID: assetID, RefKey: candidate.Identifier, ExpiresAt: candidate.EstimatedFinalExpiresAt,
// 进入资产时 H5 已同步弹窗展示该提醒,通知写入即已读,避免通知中心重复红点。
MarkRead: true,
},
})
if err != nil {