|
...
|
...
|
@@ -61,23 +61,24 @@ 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;
|
|
|
|
$this->inquiry('www.cnzyl.com',$v['month']);
|
|
|
|
// $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){
|
|
|
|
// $selectedDate = $start;
|
|
|
|
// $firstDayOfNextMonth = date('Y-m-01 01:00:00', strtotime("$selectedDate +1 month"));
|
|
|
|
// $arr['created_at'] = $firstDayOfNextMonth;
|
|
|
|
// $arr['updated_at'] = $firstDayOfNextMonth;
|
|
|
|
// $monthCountModel->insert($arr);
|
|
|
|
// }else{
|
|
|
|
// $monthCountModel->edit($arr,['id'=>$info['id']]);
|
|
|
|
// }
|
|
|
|
$res = $this->inquiry('www.cnzyl.com',$v['month']);
|
|
|
|
$arr['month_count'] = 0;
|
|
|
|
if(isset($res['data']['count'])){
|
|
|
|
$arr['month_count'] = $res['data']['count'];
|
|
|
|
}
|
|
|
|
$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){
|
|
|
|
$selectedDate = $start;
|
|
|
|
$firstDayOfNextMonth = date('Y-m-01 01:00:00', strtotime("$selectedDate +1 month"));
|
|
|
|
$arr['created_at'] = $firstDayOfNextMonth;
|
|
|
|
$arr['updated_at'] = $firstDayOfNextMonth;
|
|
|
|
$monthCountModel->insert($arr);
|
|
|
|
}else{
|
|
|
|
$monthCountModel->edit($arr,['id'=>$info['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
|
|
|
|
}
|
|
...
|
...
|
@@ -150,7 +151,7 @@ class UpgradeProjectCount extends Command |
|
|
|
$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']);
|
|
|
|
dd($res);
|
|
|
|
return $res;
|
|
|
|
}
|
|
|
|
|
|
|
|
} |
...
|
...
|
|