This commit is contained in:
李子铭 2025-03-11 18:10:57 +08:00
parent 3925ba5bb0
commit 587c3fe2c9
1 changed files with 1 additions and 2 deletions

View File

@ -28,7 +28,7 @@ func (v *VoucherBiz) OrderConsume(ctx context.Context, orderNo string) (err erro
c := vo.OrderConsume.BuildCache([]string{orderNo}) 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) order, err := v.OrderRepo.GetByOrderNo(ctx, orderNo)
if err != nil { 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 fmt.Errorf("订单类型错误:%s", order.Type.GetText())
}) })
return
} }