作者 lyh

gx

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