禁用事务
This commit is contained in:
parent
9bacaf120e
commit
c6e72948e0
|
|
@ -24,10 +24,6 @@ func (v *VoucherBiz) GetByOutBizNo(ctx context.Context, req *bo.OrderCreateReqBo
|
||||||
|
|
||||||
func (v *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) (orderNo string, err error) {
|
func (v *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) (orderNo string, err error) {
|
||||||
|
|
||||||
//c := vo.CmbOrderLockKey.BuildCache([]string{req.OutBizNo, req.Type.String()})
|
|
||||||
|
|
||||||
//err = lock.NewMutex(v.rdb.Rdb, c.TTL).Lock(ctx, c.Key, func(ctx context.Context) error {
|
|
||||||
|
|
||||||
order, err3 := v.GetByOutBizNo(ctx, req)
|
order, err3 := v.GetByOutBizNo(ctx, req)
|
||||||
if err3 != nil {
|
if err3 != nil {
|
||||||
return orderNo, err3
|
return orderNo, err3
|
||||||
|
|
@ -59,7 +55,6 @@ func (v *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) (or
|
||||||
orderNo = order.OrderNo
|
orderNo = order.OrderNo
|
||||||
|
|
||||||
return orderNo, nil
|
return orderNo, nil
|
||||||
//})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *VoucherBiz) CmbQuery(ctx context.Context, orderNo string) (resp *v1.CmbQueryReply, err error) {
|
func (v *VoucherBiz) CmbQuery(ctx context.Context, orderNo string) (resp *v1.CmbQueryReply, err error) {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ func NewDb(db *GormDb) *Db {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Db) DB(ctx context.Context) *gorm.DB {
|
func (d *Db) DB(_ context.Context) *gorm.DB {
|
||||||
return d.db.Client.WithContext(ctx)
|
return d.db.Client
|
||||||
|
//return d.db.Client.WithContext(ctx)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue