Parcourir la source

命令行-修复拉取微唯宝商品逻辑

sunxbiao il y a 6 mois
Parent
commit
81a260159a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      app/command/WiwibaoProductSync.php

+ 2 - 2
app/command/WiwibaoProductSync.php

@@ -154,7 +154,7 @@ class WiwibaoProductSync extends Command
154
         return [
154
         return [
155
             'cover_url' => $goodsInfo['main_img'] ?? '',
155
             'cover_url' => $goodsInfo['main_img'] ?? '',
156
             'detail_images' => $goodsInfo['detail_img'] ?? [],
156
             'detail_images' => $goodsInfo['detail_img'] ?? [],
157
-            'detail_img_list' => $goodsInfo['detail_img_list'] ?? []
157
+            'detail_img_list' => $goodsInfo['detail_img'] ?? [] // 为了兼容以前写的代码,建议保留这个数据项,之前用的是detail_img_list字段,但我感觉他们意义一样
158
         ];
158
         ];
159
     }
159
     }
160
 
160
 
@@ -184,7 +184,7 @@ class WiwibaoProductSync extends Command
184
                 'mer_profit' => $this->calculateMerProfit($sku['plat_price']),
184
                 'mer_profit' => $this->calculateMerProfit($sku['plat_price']),
185
                 'yanglaojin' => '0.00',
185
                 'yanglaojin' => '0.00',
186
                 'main_img' => $sku['main_img'] ?? '',
186
                 'main_img' => $sku['main_img'] ?? '',
187
-                'attr' => !empty($sku['attr']) ? $sku['attr'] : []
187
+                'attribute_json' => !empty($sku['attr']) ? $sku['attr'] : [['val' => '默认', 'name' => '默认']]
188
             ];
188
             ];
189
 
189
 
190
             $processedSkus[] = array_merge($sku, $processedSku);
190
             $processedSkus[] = array_merge($sku, $processedSku);