|
|
@@ -131,18 +131,19 @@ class ThirdGoodsController extends BaseAdminController
|
|
|
foreach ($data as $key=>$items){
|
|
|
if(in_array($items['dealGroupId'], $product_ids)){
|
|
|
unset($data[$key]);
|
|
|
+ }else{
|
|
|
+ $good_data[] = [
|
|
|
+ 'third_type' => 1,
|
|
|
+ 'goods_id' => 0,
|
|
|
+ 'product_id' => $items['dealGroupId'],
|
|
|
+ 'product_name' => $items['title'],
|
|
|
+ 'product_price' => $items['price'],
|
|
|
+ ];
|
|
|
}
|
|
|
- $good_data[] = [
|
|
|
- 'third_type' => 1,
|
|
|
- 'goods_id' => 0,
|
|
|
- 'product_id' => $items['dealGroupId'],
|
|
|
- 'product_name' => $items['title'],
|
|
|
- 'product_price' => $items['price'],
|
|
|
- ];
|
|
|
}
|
|
|
|
|
|
if(!empty($good_data)){
|
|
|
- $result = ThirdGoodsLogic::addMeituanGoods($good_data);
|
|
|
+ ThirdGoodsLogic::addMeituanGoods($good_data);
|
|
|
}
|
|
|
}
|
|
|
return $this->success('同步成功', [], 1, 1);
|