diff --git a/internal/biz/cron_notice.go b/internal/biz/cron_notice.go index fc6f45f..276eb7a 100644 --- a/internal/biz/cron_notice.go +++ b/internal/biz/cron_notice.go @@ -85,10 +85,10 @@ func (v *VoucherBiz) isCanNotice(ctx context.Context) error { // 二次获取,判定处理,以免获取锁后又执行了一次 - cacheValue, err := v.rdb.Rdb.Get(ctx, cache.Key).Result() + cacheValue, err2 := v.rdb.Rdb.Get(ctx, cache.Key).Result() - if err != nil && err != redis.Nil { - return fmt.Errorf(fmt.Sprintf("notice 二次获取redis缓存%s异常:%v", cache.Key, err)) + if err2 != nil && err2 != redis.Nil { + return fmt.Errorf(fmt.Sprintf("notice 二次获取redis缓存%s异常:%v", cache.Key, err2)) } if len(cacheValue) > 0 { @@ -113,7 +113,7 @@ func (v *VoucherBiz) notice(ctx context.Context, order *bo.OrderBo) error { } if order.Status == status { - log.Warnf("notice 券状态未改变:%s,忽略不处理,orderNo:%s", order.Status.GetText(), order.OrderNo) + //log.Warnf("notice 券状态未改变:%s,忽略不处理,orderNo:%s", order.Status.GetText(), order.OrderNo) return nil } @@ -140,7 +140,7 @@ func (v *VoucherBiz) notice(ctx context.Context, order *bo.OrderBo) error { func (v *VoucherBiz) cmbNotice(ctx context.Context, order *bo.OrderBo, orderNotify *bo.OrderNotifyBo) error { if !orderNotify.Event.CanNotify() { - log.Warnf("notice 券状态:%s,忽略不通知,orderNo:%s", orderNotify.Event.GetText(), order.OrderNo) + //log.Warnf("notice 券状态:%s,忽略不通知,orderNo:%s", orderNotify.Event.GetText(), order.OrderNo) return nil }