UserSubscribleStatistic.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2017/11/20
  6. * Time: 下午5:26
  7. */
  8. namespace App\Console\Commands;
  9. use App\Modules\User\Services\UserSubscribeBehaviorStatsService;
  10. use Log;
  11. use Illuminate\Console\Command;
  12. use DB;
  13. class UserSubscribleStatistic extends Command
  14. {
  15. /**
  16. * 执行命令 php artisan force_user_active
  17. *
  18. * The name and signature of the console command.
  19. *
  20. * @var string
  21. */
  22. protected $signature = 'user_subscribe_statistic';
  23. /**
  24. * The console command description.
  25. *
  26. * @var string
  27. */
  28. protected $description = '强关用户行为统计';
  29. /**
  30. * Execute the console command.
  31. *
  32. * @return mixed
  33. */
  34. public function handle()
  35. {
  36. print_r("======每日强关用户行为生成2 【任务执行开始】=====".date("y-m-d H:i:s"."\n"));
  37. Log::info("======每日强关用户行为生成2 【任务执行开始】=====".date("y-m-d H:i:s"."\n"));
  38. UserSubscribeBehaviorStatsService::generateData();
  39. Log::info("======每日强关用户行为生成2 【任务执行结束】=====" . date("y-m-d H:i:s" . "\n"));
  40. print_r("======每日强关用户行为生成2 【任务执行结束】=====" . date("y-m-d H:i:s" . "\n"));
  41. }
  42. }