diff --git a/internal/biz/order_consume.go b/internal/biz/order_consume.go index a2cc647..edfb15d 100644 --- a/internal/biz/order_consume.go +++ b/internal/biz/order_consume.go @@ -28,7 +28,7 @@ func (v *VoucherBiz) OrderConsume(ctx context.Context, orderNo string) (err erro c := vo.OrderConsume.BuildCache([]string{orderNo}) - err = lock.NewMutex(v.rdb.Rdb, c.TTL).Lock(ctx, c.Key, func(ctx context.Context) error { + return lock.NewMutex(v.rdb.Rdb, c.TTL).Lock(ctx, c.Key, func(ctx context.Context) error { order, err := v.OrderRepo.GetByOrderNo(ctx, orderNo) if err != nil { @@ -49,5 +49,4 @@ func (v *VoucherBiz) OrderConsume(ctx context.Context, orderNo string) (err erro return fmt.Errorf("订单类型错误:%s", order.Type.GetText()) }) - return }