作者 jinglong
1 个管道 的构建 通过 耗费 4 秒

付款成功,返回订单id

@@ -57,7 +57,7 @@ class Pay extends Api @@ -57,7 +57,7 @@ class Pay extends Api
57 $status = $this->order_status; 57 $status = $this->order_status;
58 $orderModel = new Order(); 58 $orderModel = new Order();
59 $orderModel->where(['uid'=>$this->uid,'order_sn'=>$order_sn,'status'=>$status[0]])->update(['status'=>$status[2]]); 59 $orderModel->where(['uid'=>$this->uid,'order_sn'=>$order_sn,'status'=>$status[0]])->update(['status'=>$status[2]]);
60 - $this->success('成功'); 60 + $this->success('成功',['order_id'=>$res['id']]);
61 61
62 62
63 63
@@ -167,7 +167,7 @@ class Pay extends Api @@ -167,7 +167,7 @@ class Pay extends Api
167 //写入订单 167 //写入订单
168 $res = Common::createOrder($data,$pay_order_sn,$this->uid); 168 $res = Common::createOrder($data,$pay_order_sn,$this->uid);
169 if($res){ 169 if($res){
170 - $this->success('成功'); 170 + $this->success('成功',['order_id'=>$res['order_id']]);
171 } 171 }
172 $this->error('创建订单失败'); 172 $this->error('创建订单失败');
173 173