禁用事务

This commit is contained in:
ziming 2025-03-26 14:17:15 +08:00
parent 9bacaf120e
commit c6e72948e0
2 changed files with 3 additions and 7 deletions

View File

@ -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) {
//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)
if err3 != nil {
return orderNo, err3
@ -59,7 +55,6 @@ func (v *VoucherBiz) CmbOrder(ctx context.Context, req *bo.OrderCreateReqBo) (or
orderNo = order.OrderNo
return orderNo, nil
//})
}
func (v *VoucherBiz) CmbQuery(ctx context.Context, orderNo string) (resp *v1.CmbQueryReply, err error) {

View File

@ -15,6 +15,7 @@ func NewDb(db *GormDb) *Db {
}
}
func (d *Db) DB(ctx context.Context) *gorm.DB {
return d.db.Client.WithContext(ctx)
func (d *Db) DB(_ context.Context) *gorm.DB {
return d.db.Client
//return d.db.Client.WithContext(ctx)
}