|
...
|
...
|
@@ -36,7 +36,7 @@ class UpgradeProjectCount extends Command |
|
|
|
protected $description = '升级项目统计';
|
|
|
|
|
|
|
|
public function handle(){
|
|
|
|
$project_id = 450;
|
|
|
|
$project_id = 627;
|
|
|
|
$oldModel = new UpdateOldInfo();
|
|
|
|
$info = $oldModel->read(['project_id'=>$project_id]);
|
|
|
|
$url = $info['old_domain_online'];
|
|
...
|
...
|
@@ -67,8 +67,9 @@ class UpgradeProjectCount extends Command |
|
|
|
$end = date('Y-m-t', strtotime($v['month']));
|
|
|
|
$arr['project_id'] = $project_id;
|
|
|
|
$res = $this->inquiry($url,$v['month']);
|
|
|
|
$arr['month_total'] = 0;
|
|
|
|
// $arr['month_total'] = 0;
|
|
|
|
if(isset($res['data']['count'])){
|
|
|
|
echo date('Y-m-d H:i:s') . '数据:'.$res['data']['count'] . PHP_EOL;
|
|
|
|
$arr['month_total'] = $res['data']['count'];
|
|
|
|
//获取上一个的count
|
|
|
|
$previousMonth = date('Y-m', strtotime($v['month'] . ' -1 month'));
|
|
...
|
...
|
@@ -115,7 +116,6 @@ class UpgradeProjectCount extends Command |
|
|
|
->first();
|
|
|
|
$arr['pv'] = $pv_ip->pv_num;
|
|
|
|
$arr['ip'] = $pv_ip->ip_num;
|
|
|
|
$arr['month_total'] = $pv_ip->inquiry_num;
|
|
|
|
if($arr['ip'] != 0){
|
|
|
|
$arr['rate'] = round(($arr['month_total'] / $arr['ip']) * 10,2);
|
|
|
|
}
|
...
|
...
|
|