RequestLogPath.php 922 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Module\System\Cache;
  3. use UCore\job\QueueJob;
  4. use UCore\Model\RequestLog;
  5. use App\Module\LCache\Cache;
  6. use App\Module\LCache\SCache;
  7. use function Laravel\Prompts\select;
  8. class RequestLogPath extends \App\Module\LCache\QueueJob
  9. {
  10. public static function getPreventDuplication(): int
  11. {
  12. return 3600 ;
  13. }
  14. public static function getTtl(): int
  15. {
  16. return 3600 * 24;
  17. }
  18. static public function getNewData($parameter=[])
  19. {
  20. $args = func_get_args();
  21. $data = RequestLog::query()
  22. ->groupBy('path')
  23. ->distinct()
  24. ->where('module', '!=','temp')
  25. ->pluck('path', 'path')
  26. ->toArray();
  27. dump($data);
  28. return $data;
  29. }
  30. /**
  31. * 获取参数索引
  32. * @return array
  33. */
  34. public static function getRequiredArgIndex(): array
  35. {
  36. return [];
  37. }
  38. }