1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * 优化师新增用户统计
- * @file:PromotionDayUserStatistic.php
- * @Date: 2023/6/25
- * @Time: 16:38
- */
- namespace App\Console\Commands\Statistic;
- use Illuminate\Console\Command;
- use Modules\Common\Services\Statistic\CompanyDayUser;
- use Modules\Common\Services\Statistic\OptimizerDayUser;
- class CompanyDayUserStatistic extends Command
- {
- /**
- * The name and signature of the console command.
- *
- * @var string
- */
- protected $signature = 'Statistic:CompanyDayUser {--date= : 统计日期}';
- /**
- * The console command description.
- *
- * @var string
- */
- protected $description = '投放公司当日新增用户日统计';
- /**
- * Execute the console command.
- */
- public function handle(): void
- {
- $date = $this->option('date') ?? date('Y-m-d', strtotime('yesterday'));
- $this->info('统计开始--统计日期:'.$date);
- CompanyDayUser::companyDayUserStatistic($date);
- $this->info('统计结束');
- }
- }
|