This commit is contained in:
parent
d685855fc8
commit
d0ebfd76ac
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue