|
|
@@ -187,11 +187,12 @@ class GoodsService extends BaseService
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ $page = RedisService::get($cacheKey.'_page');
|
|
|
+ $page = $page? $page+1 : 1;
|
|
|
$lastTime = $this->model->where(['mark'=>1])->orderBy('create_time','desc')->value('create_time');
|
|
|
$params = [
|
|
|
'limit'=> $pageSize>0?$pageSize : 50,
|
|
|
- 'page'=> 1,
|
|
|
+ 'page'=> $page,
|
|
|
'status'=> isset($params['status'])? $params['status'] : 1, // 状态:0-全部,1-上架的,2-下架的
|
|
|
'supply_type'=> isset($params['supply_type'])? $params['supply_type'] : 0, // 渠道商
|
|
|
'title'=> isset($params['title'])? $params['title'] : '', // 标题关键词
|
|
|
@@ -240,9 +241,12 @@ class GoodsService extends BaseService
|
|
|
}
|
|
|
}
|
|
|
unset($item);
|
|
|
+ }else {
|
|
|
+ RedisService::set($cacheKey.'_page', 1, rand(300,600));
|
|
|
}
|
|
|
|
|
|
if($goods){
|
|
|
+ RedisService::set($cacheKey.'_page', $page, rand(300,600));
|
|
|
RedisService::set($cacheKey, $goods, rand(5, 10));
|
|
|
$this->model->insertAll($goods);
|
|
|
}
|