作者 lyh

gx

... ... @@ -51,7 +51,7 @@ class GoogleSearchKeyword extends Command
public function handle(){
$noticeModel = new NoticeLog();
while (true){
$list = $noticeModel->list(['type'=>NoticeLog::GOOGLE_SEARCH,'status'=>NoticeLog::STATUS_PENDING]);;
$list = $noticeModel->list(['type'=>['like',NoticeLog::GOOGLE_SEARCH.'_%'],'status'=>NoticeLog::STATUS_PENDING]);;
if(empty($list)){
sleep(50);
return true;
... ...
... ... @@ -38,13 +38,12 @@ class GoogleSearchController extends BaseController
//获取当前项目域名
$domain = parse_url($this->user['domain'], PHP_URL_HOST);
$noticeModel = new NoticeLog();
$info = $noticeModel->read(['status'=>NoticeLog::STATUS_PENDING,'type'=>$noticeModel::GOOGLE_SEARCH,'data'=>json_encode(['project_id' => $this->user['project_id'],'domain'=>$domain,'type'=>$this->param['type']],true
)]);
$info = $noticeModel->read(['status'=>NoticeLog::STATUS_PENDING,'type'=>$noticeModel::GOOGLE_SEARCH.'_'.$this->map['type']]);
if($info === false){
$noticeModel->addReturnId(['data'=>json_encode(['project_id' => $this->user['project_id'],'domain'=>$domain,'type'=>$this->param['type']],true
),'type'=>$noticeModel::GOOGLE_SEARCH]);
),'type'=>$noticeModel::GOOGLE_SEARCH.'_'.$this->map['type']]);
}
$this->response('数据更新时间为7天,新数据生成中...',Code::SUCCESS);
$this->response('数据更新时间为7天,新数据生成中...');
}
//查询详情数据
$searchDetailModel = new GoogleSearchDetail();
... ...