作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

修改问题文档

@@ -290,6 +290,7 @@ class Order extends Frontend @@ -290,6 +290,7 @@ class Order extends Frontend
290 $car_model = new \app\index\model\Car(); 290 $car_model = new \app\index\model\Car();
291 $data = $car_model->field('id,store_id,goods_id,number')->whereIn('id',$car_ids)->select(); 291 $data = $car_model->field('id,store_id,goods_id,number')->whereIn('id',$car_ids)->select();
292 // $data = json_decode($data,true); 292 // $data = json_decode($data,true);
  293 + dump($data);exit;
293 Db::startTrans(); 294 Db::startTrans();
294 if(!$data) { 295 if(!$data) {
295 // 如果不在购物车则为立即购买 296 // 如果不在购物车则为立即购买
@@ -312,7 +313,6 @@ class Order extends Frontend @@ -312,7 +313,6 @@ class Order extends Frontend
312 foreach($data as $key1 => $vo){ 313 foreach($data as $key1 => $vo){
313 //获取店铺id 314 //获取店铺id
314 $goods = $goodsModel->findData(['g.id'=>$vo['goods_id']]); 315 $goods = $goodsModel->findData(['g.id'=>$vo['goods_id']]);
315 - dump($goods);exit;  
316 $data[$key1]['store_id'] = $goods['store_id']; 316 $data[$key1]['store_id'] = $goods['store_id'];
317 $store_ids[] = $goods['store_id']; 317 $store_ids[] = $goods['store_id'];
318 } 318 }