fang 1 год назад
Родитель
Сommit
f62bba22fb
1 измененных файлов с 9 добавлено и 8 удалено
  1. 9 8
      app/adminapi/controller/third/ThirdGoodsController.php

+ 9 - 8
app/adminapi/controller/third/ThirdGoodsController.php

@@ -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);