作者 lyh

gx

... ... @@ -9,6 +9,7 @@
namespace App\Console\Commands\MonthlyCount;
use App\Models\HomeCount\MonthCount;
use App\Models\Project\Project;
use App\Models\Visit\Visit;
use App\Services\ProjectServer;
... ... @@ -51,8 +52,12 @@ class UpgradeProjectCount extends Command
->groupBy('month')->get()->toArray();
foreach ($list as $k=>$v){
$v = (array)$v;
$monthCountModel = new MonthCount();
$monthCountModel->read(['month'=>$v['month']]);
// 获取当月开始时间
$start = date('Y-m-01', strtotime($v['month']));
echo date('Y-m-d H:i:s') . 'end'.$v['month'] . PHP_EOL;
return;
// 获取当月结束时间
$end = date('Y-m-t', strtotime($v['month']));
$arr['project_id'] = 439;
... ... @@ -61,7 +66,7 @@ class UpgradeProjectCount extends Command
$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);
echo date('Y-m-d H:i:s') . '数据:'.json_encode($arr) . PHP_EOL;
}
echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
}
... ...