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