```
argument('start_date');
$end_date = $this->argument('end_date');
if($start_date == '' && $end_date == ''){
$date = date('Y-m-d',strtotime('-1 day'));
echo $date;
DataService::stat($date);
}
if($start_date != '' && $end_date == ''){
echo $start_date;
DataService::stat($start_date);
}
if($start_date != '' && $end_date != ''){
$date_from = strtotime($start_date);
$date_to = strtotime($end_date);
for($i=$date_from; $i<=$date_to; $i+=86400){
echo date("Y-m-d", $i)."\r\n";
DataService::stat(date("Y-m-d", $i));
}
}
}
}
```
支持以下几种
默认跑昨天的数据`php artisan StatData`
跑指定一天的数据 `php artisan StatData 2022-10-25`
跑指定时间的数据`php artisan StatData 2022-10-25 2022-10-26`