diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index 08a2fc6c2..2b553922e 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -222,6 +222,7 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, dao.Rollback(db, txDB) return nil, "更新user_vendor_order状态失败", err } + dao.Commit(db, txDB) //再次从数据库获取order、userOrder orderNew, err := dao.GetOrderByID(db, orderID) if err != nil { @@ -234,13 +235,14 @@ func PayByBalance(ctx *jxcontext.Context, orderID string, isChoose, payType int, } globals.SugarLogger.Debug("再次获取user_vendor_order数据进行检验", userOrder.OrderStatus) //快递单 同步到qbd + globals.SugarLogger.Debug("输出一下", orderInfo.Status, userOrder.OrderStatus) if orderInfo.Status == 110 && userOrder.OrderStatus == 4 { globals.SugarLogger.Debug("进入qbd创建订单流程") if err := q_bida.CreateOrder2QBiDa(userOrder, orderInfo.OrderID); err != nil { return nil, "", err } } - dao.Commit(db, txDB) + } if isChoose == Choose { //(1)用户不使用余额或者余额=0 即直接微信支付