作者 潘浩文
1 个管道 的构建 通过 耗费 1 秒

XIAOPAN

@@ -83,22 +83,22 @@ class OrderController extends HomeBaseController{ @@ -83,22 +83,22 @@ class OrderController extends HomeBaseController{
83 'price' => $price, 83 'price' => $price,
84 'state' => 2 84 'state' => 2
85 ]; 85 ];
86 -// $this->apiResponse(200,'success',$name);  
87 - try{  
88 - Db::startTrans(); 86 +// try{
  87 +// Db::startTrans();
89 Db::name('users')->where('id',$users_id)->update(['is_use'=>0]); 88 Db::name('users')->where('id',$users_id)->update(['is_use'=>0]);
  89 + $this->apiResponse(200,'success',$name);
90 Db::name('equipment')->where('name',$name)->update(['use'=>0]); 90 Db::name('equipment')->where('name',$name)->update(['use'=>0]);
91 Db::name('order')->where('order_no',$order['order_no'])->update($data); 91 Db::name('order')->where('order_no',$order['order_no'])->update($data);
92 - }catch (\Exception $exception){  
93 - Db::rollback();  
94 - $data=[  
95 - 'state'=>false,  
96 - 'message'=>'数据库操作失败',  
97 - 'error' =>$exception->getMessage()  
98 - ];  
99 - $this->apiResponse(200,'success',$data);  
100 - }  
101 - Db::commit(); 92 +// }catch (\Exception $exception){
  93 +// Db::rollback();
  94 +// $data=[
  95 +// 'state'=>false,
  96 +// 'message'=>'数据库操作失败',
  97 +// 'error' =>$exception->getMessage()
  98 +// ];
  99 +// $this->apiResponse(200,'success',$data);
  100 +// }
  101 +// Db::commit();
102 //调起支付 102 //调起支付
103 if ($price==0){ 103 if ($price==0){
104 try{ 104 try{