作者 赵彬吉

update

... ... @@ -64,7 +64,7 @@ class RankData extends BaseCommands
foreach ($list as $item) {
Log::channel('rank_data')->info('项目开始:ID' . $item['project_id'] .' - '. $item['api_no']) . '';
try {
(new RankDataLogic())->syncRankData($item['api_no'], $site_res, true);
(new RankDataLogic())->syncRankData($item['api_no'], $site_res);
} catch (\Exception $e) {
Log::channel('rank_data')->error('RankData:失败 ' . $item['api_no'] . $e->getMessage());
$error++;
... ...
... ... @@ -390,7 +390,7 @@ class RankDataLogic extends BaseLogic
$api = new QuanqiusouApi();
$model = RankData::where('project_id', $project_id)->where('lang', '')->first();
if (!$model || $model->updated_date != date('Y-m-d') || $force) {
$res = $api->getGoogleRank($api_no, '', 7, $force);
$res = $api->getGoogleRank($api_no, '', 7, true);
if (!$res) {
throw new \Exception("接口数据获取失败,api_no:{$api_no}");
}
... ...