|
@@ -318,7 +318,10 @@ class User extends ApiController
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
var_dump($data);
|
|
var_dump($data);
|
|
|
- if($orderid = UserPaymentOrder::insertGetId($data)){
|
|
|
|
|
|
|
+ DB::startTrans();
|
|
|
|
|
+ $orderid = UserPaymentOrder::insertGetId($data);
|
|
|
|
|
+ if(!$orderid){
|
|
|
|
|
+ Db::rollback();
|
|
|
return IResponse::failure('创建升级订单失败');
|
|
return IResponse::failure('创建升级订单失败');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -330,6 +333,10 @@ class User extends ApiController
|
|
|
'order_idx' => $orderid,
|
|
'order_idx' => $orderid,
|
|
|
'ascription' => 'level' // 归属订单
|
|
'ascription' => 'level' // 归属订单
|
|
|
]);
|
|
]);
|
|
|
|
|
+ if(!$logID){
|
|
|
|
|
+ Db::rollback();
|
|
|
|
|
+ return IResponse::failure('升级订单提交失败');
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// 返回支付单号
|
|
// 返回支付单号
|
|
|
return $this->ApiJson(0,'升级订单提交成功', [
|
|
return $this->ApiJson(0,'升级订单提交成功', [
|