|
...
|
...
|
@@ -37,6 +37,7 @@ class UpgradeProjectCount extends Command |
|
|
|
public function handle(){
|
|
|
|
ProjectServer::useProject(439);
|
|
|
|
$this->count();
|
|
|
|
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -60,11 +61,15 @@ class UpgradeProjectCount extends Command |
|
|
|
// 获取当月结束时间
|
|
|
|
$end = date('Y-m-t', strtotime($v['month']));
|
|
|
|
$arr['project_id'] = 439;
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList('www.cnzyl.com','',1,100000000);
|
|
|
|
//总数
|
|
|
|
$arr['total'] = $inquiry_list['data']['total'] ?? 0;
|
|
|
|
$res = $this->inquiry('www.cnzyl.com',$v['month']);
|
|
|
|
$arr['month_total'] = 0;
|
|
|
|
if(isset($res['data']['count'])){
|
|
|
|
$arr['month_total'] = $res['data']['count'];
|
|
|
|
}
|
|
|
|
if(isset($res['data']['data'])){
|
|
|
|
$arr['country'] = $res['data']['data'];
|
|
|
|
}
|
|
|
|
$arr['month'] = $v['month'];
|
|
|
|
$arr['country'] = '{"\u5c3c\u65e5\u5229\u4e9a":1,"\u5370\u5ea6\u5c3c\u897f\u4e9a":1,"\u4f0a\u6717":1}';
|
|
|
|
$arr = $this->pv_ip($arr,$start,$end);
|
|
|
|
$arr = $this->sourceCount($arr,$start,$end);
|
|
|
|
if($info === false){
|
|
...
|
...
|
@@ -143,4 +148,13 @@ class UpgradeProjectCount extends Command |
|
|
|
return $arr;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function inquiry($url,$month){
|
|
|
|
$url = 'https://'.$url.'/';
|
|
|
|
$token = md5($url.date("Y-m-d"));
|
|
|
|
$url = 'https://form.globalso.com/api/external-interface/country_con/15243d63ed5a5738?domain='.$url.'&token='.$token.'&source=1,2,3,4&model=month&sta_date='.$month;
|
|
|
|
$res = http_get($url,['charset=utf-8']);
|
|
|
|
echo date('Y-m-d H:i:s') . '数据:'.json_encode($res) . PHP_EOL;
|
|
|
|
return $res;
|
|
|
|
}
|
|
|
|
|
|
|
|
} |
...
|
...
|
|