wesmiler hace 2 años
padre
commit
495c93365c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      app/Services/Api/GoodsService.php

+ 3 - 1
app/Services/Api/GoodsService.php

@@ -333,7 +333,9 @@ class GoodsService extends BaseService
         if ($goods) {
             RedisService::set($cacheKey . '_page', $page, rand(300, 600));
             RedisService::set($cacheKey, $goods, rand(5, 10));
-            if(!$this->model->insertAll($goods) && $skus){
+            $this->model->insertAll($goods);
+
+            if($skus){
                 GoodsSkuModel::insertAll($skus);
             }
         }