wesmiler 2 lat temu
rodzic
commit
8308d52611
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/Services/Api/GoodsService.php

+ 2 - 2
app/Services/Api/GoodsService.php

@@ -215,7 +215,7 @@ class GoodsService extends BaseService
                             'spu_sn'=> isset($item['spu_sn'])? $item['spu_sn'] : '',
                             'spu_name'=> isset($info['spu_name'])? $info['spu_name'] : '',
                             'main_img'=> isset($info['main_img'])? $info['main_img'] : '',
-                            'detail_img'=> isset($info['detail_img'])? $info['detail_img'] : '',
+                            'detail_img'=> isset($info['detail_img'])? json_encode($info['detail_img'], 256) : '',
                             'goods_name'=> isset($item['goods_name'])? $item['goods_name'] : '',
                             'brand_name'=> isset($info['brand_name'])? $info['brand_name'] : '',
                             'limit_num'=> isset($info['limit_num'])? intval($info['limit_num']) : 0,
@@ -244,7 +244,7 @@ class GoodsService extends BaseService
 
         if($goods){
             RedisService::set($cacheKey, $goods, rand(5, 10));
-            $this->model->insert($goods);
+            $this->model->insertAll($goods);
         }
 
         return ['count'=> count($goods),'updated'=> $updated,'errorCount'=> $error];