|
@@ -16,7 +16,7 @@ class MiniprogramStats extends Command{
|
|
|
*
|
|
|
* @var string
|
|
|
*/
|
|
|
- protected $signature = 'Stats:MiniprogramStats';
|
|
|
+ protected $signature = 'Stats:MiniprogramStats {--day= : 日期}';
|
|
|
|
|
|
/**
|
|
|
* The console command description.
|
|
@@ -31,7 +31,12 @@ class MiniprogramStats extends Command{
|
|
|
* Execute the console command.
|
|
|
*/
|
|
|
public function handle(){
|
|
|
- $this->day = date('Y-m-d',time()-86400);
|
|
|
+ $day = $this->option('day');
|
|
|
+ if($day) {
|
|
|
+ $this->day = $day;
|
|
|
+ } else {
|
|
|
+ $this->day = date('Y-m-d',time()-86400);
|
|
|
+ }
|
|
|
$this->processUser();
|
|
|
$this->processCompany();
|
|
|
}
|