Parcourir la source

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

sunxbiao il y a 6 mois
Parent
commit
e40e4bef91
1 fichiers modifiés avec 8 ajouts et 4 suppressions
  1. 8 4
      app/command/WiwibaoProductSync.php

+ 8 - 4
app/command/WiwibaoProductSync.php

@@ -354,7 +354,10 @@ class WiwibaoProductSync extends Command
354
     {
354
     {
355
         Db::name('store_product')
355
         Db::name('store_product')
356
             ->where('spu_id', $spuId)
356
             ->where('spu_id', $spuId)
357
-            ->update(['is_show' => 1]);
357
+            ->update([
358
+                'is_show' => 1,
359
+                'status' => 0
360
+            ]);
358
 
361
 
359
         Log::info("恢复商品上架状态: spu_id={$spuId}");
362
         Log::info("恢复商品上架状态: spu_id={$spuId}");
360
     }
363
     }
@@ -513,8 +516,8 @@ class WiwibaoProductSync extends Command
513
             ->where('product_id', $productId)
516
             ->where('product_id', $productId)
514
             ->update([
517
             ->update([
515
                 'is_show' => 0,
518
                 'is_show' => 0,
516
-                'offline_time' => time(),
517
-                'offline_reason' => '第三方平台价格变动'
519
+                'status' => 2,
520
+                'is_status' => 0
518
             ]);
521
             ]);
519
 
522
 
520
         // 3. 收集变动后数据
523
         // 3. 收集变动后数据
@@ -647,7 +650,8 @@ class WiwibaoProductSync extends Command
647
                 ->where('product_id', $product['product_id'])
650
                 ->where('product_id', $product['product_id'])
648
                 ->update([
651
                 ->update([
649
                     'is_show' => 0,
652
                     'is_show' => 0,
650
-                    'status' => 2
653
+                    'status' => 2,
654
+                    'is_status' => 0
651
                 ]);
655
                 ]);
652
 
656
 
653
             // 记录日志
657
             // 记录日志