! orderman中尽量使用事务

! orderman中全换成dao.DaoDB
This commit is contained in:
gazebo
2019-04-16 16:33:53 +08:00
parent 3b8209906f
commit 8083f2f638
5 changed files with 117 additions and 56 deletions

View File

@@ -638,8 +638,7 @@ func CreateOrderFromOriginal(ctx *jxcontext.Context, isAsync, isContinueWhenErro
}
}
if err == nil {
rawDB := orm.NewOrm()
if _, err = orderman.FixedOrderManager.SaveOrder(order, false, rawDB); err != nil {
if _, err = orderman.FixedOrderManager.SaveOrder(order, false, dao.GetDB()); err != nil {
globals.SugarLogger.Debugf("CreateOrderFromOriginal abnormal orderID:%s, error:%v", orderOriginal.VendorOrderID, err)
}
} else {