This commit is contained in:
Leufolium 2024-11-07 18:44:25 +08:00
parent d685855fc8
commit d0ebfd76ac
1 changed files with 8 additions and 6 deletions

View File

@ -27,7 +27,7 @@ func InitNotifSender(_DefaultNotification *logic.Notification, _DefaultNotifBcst
// 获取通知builder
notifBuildersObj, ok := ctx.Get("notif_builders")
if !ok {
ctx.Next()
return
}
notifBuilders := notifBuildersObj.([]*dbstruct.NotifBuilder)
@ -92,14 +92,16 @@ func InitNotifSender(_DefaultNotification *logic.Notification, _DefaultNotifBcst
})
if err != nil {
logger.Error("通知创建失败:%v", err)
ctx.Next()
continue
}
// 将通知id暂存若暂存失败则不广播该条通知因业务无法再控制其停止
err = notifBuilder.NidSaveFunc(ctx, notification.GetId())
if err != nil {
logger.Error("通知id暂存失败:%v", err)
continue
if notifBuilder.NidSaveFunc != nil {
err = notifBuilder.NidSaveFunc(ctx, notification.GetId())
if err != nil {
logger.Error("通知id暂存失败:%v", err)
continue
}
}
nids := make([]int64, 0)