作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

order

@@ -77,7 +77,7 @@ class OrderController extends HomeBaseController{ @@ -77,7 +77,7 @@ class OrderController extends HomeBaseController{
77 ]; 77 ];
78 try{ 78 try{
79 Db::startTrans(); 79 Db::startTrans();
80 - Db::name('users')->where('users_id',$users_id)->update(['is_use'=>0,'order_no'=>null]); 80 + Db::name('users')->where('id',$users_id)->update(['is_use'=>0,'order_no'=>null]);
81 Db::name('order')->where('order_no',$users['order_no'])->update($data); 81 Db::name('order')->where('order_no',$users['order_no'])->update($data);
82 }catch (\Exception $exception){ 82 }catch (\Exception $exception){
83 Db::rollback(); 83 Db::rollback();
@@ -124,7 +124,7 @@ class OrderController extends HomeBaseController{ @@ -124,7 +124,7 @@ class OrderController extends HomeBaseController{
124 */ 124 */
125 public function pay($order_no){ 125 public function pay($order_no){
126 $order=Db::name('order')->where(['order_no'=>$order_no,'state'=>2])->find(); 126 $order=Db::name('order')->where(['order_no'=>$order_no,'state'=>2])->find();
127 - $openId=Db::name('users')->where('users_id',$order['users_id'])->find()['open_id']; 127 + $openId=Db::name('users')->where('id',$order['users_id'])->find()['open_id'];
128 $body='支付'; 128 $body='支付';
129 $price=$order['price']*100;//订单价格 129 $price=$order['price']*100;//订单价格
130 $notify_url=url('order/notify','','',true);//回调地址 130 $notify_url=url('order/notify','','',true);//回调地址