diff --git a/internal/biz/cmb/order_consume.go b/internal/biz/cmb/order_consume.go index 3e9c9ce..36a40da 100644 --- a/internal/biz/cmb/order_consume.go +++ b/internal/biz/cmb/order_consume.go @@ -55,6 +55,7 @@ func (v *Cmb) registerNotifyTag(ctx context.Context, stockCreatorMchID, stockID _, err := v.rdb.Rdb.Get(ctx, c.Key).Result() if err == nil { + // 缓存存在,直接返回 return nil } @@ -94,6 +95,7 @@ func (v *Cmb) registerNotifyTag(ctx context.Context, stockCreatorMchID, stockID } if err = v.WechatCpnRepo.RegisterNotifyTag(ctx, stockID); err != nil { + return v.WechatNotifyRegisterTagRepo.Fail(ctx, wechatNotifyTag.ID, err.Error()) }