| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace App\Module\System\Cache;
- use UCore\Model\RequestLog;
- /**
- *
- */
- class RequestLogRouterSearch extends \App\Module\LCache\QueueJob
- {
- public static function getTtl(): int
- {
- return 3600 * 24;
- }
- public static function getPreventDuplication(): int
- {
- return 3600;
- }
- static public function getNewData($parameter=[])
- {
- $data = RequestLog::query()
- ->groupBy('router')
- ->distinct()
- ->pluck('router', 'router')
- ->toArray();
- $res = [];
- $modules = [
- 'app', 'oap'
- ];
- foreach ($data as $k => $v) {
- if (in_array(substr($k, 0, 3), $modules)) {
- $res[$k] = $k;
- }
- }
- return $res;
- }
- /**
- * 获取参数索引
- * @return array
- */
- public static function getRequiredArgIndex(): array
- {
- return [];
- }
- }
|