cmb
This commit is contained in:
parent
3925ba5bb0
commit
587c3fe2c9
|
|
@ -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
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue