CommunityMemberStatistics.php 1014 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2019-06-25
  6. * Time: 9:58
  7. */
  8. namespace App\Console\Commands;
  9. use App\Repositories\CommunityMemberStatisticsRepository;
  10. use Illuminate\Console\Command;
  11. use Illuminate\Support\Facades\Log;
  12. class CommunityMemberStatistics extends Command{
  13. /**
  14. * The name and signature of the console command.
  15. *
  16. * @var string
  17. */
  18. protected $signature = 'member:statistics';
  19. /**
  20. * The console command description.
  21. *
  22. * @var string
  23. */
  24. protected $description = '用户行为统计';
  25. public function __construct(CommunityMemberStatisticsRepository $communityMemberStatisticsRepository)
  26. {
  27. $this->communityMemberStatisticsRepository = $communityMemberStatisticsRepository;
  28. }
  29. //统计
  30. public function handle(){
  31. $this->line("统计用户行为数据");
  32. $this->communityMemberStatisticsRepository->statistics();
  33. $this->line("结束统计用户行为数据");
  34. }
  35. }