CommunityMemberStatistics.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. parent::__construct();
  28. $this->communityMemberStatisticsRepository = $communityMemberStatisticsRepository;
  29. }
  30. //统计
  31. public function handle(){
  32. $this->line("统计用户行为数据");
  33. $this->communityMemberStatisticsRepository->statistics();
  34. $this->line("结束统计用户行为数据");
  35. }
  36. }