fix - bug

This commit is contained in:
toom1996
2025-06-20 15:27:14 +08:00
parent b7fe1994f1
commit e25a4156c3
15 changed files with 112 additions and 286 deletions

View File

@ -20,12 +20,16 @@ class ToolsController extends AbstractController
#[RequestMapping(path:'get-query-keyword', methods:'get')]
public function getQueryKeyword(): \Psr\Http\Message\ResponseInterface
{
$keyword = AppKeywordsMonitorTask::formatQuery(['created_at'])
$keyword = AppKeywordsMonitorTask::query()
->where('queried_at', '<=', strtotime('-2 hours'))
->where('is_delete', 0);
if ($keyword) {
$query = $keyword->first()?->toArray();
if ($query) {
$ignoreUrl = AppKeywordsMonitor::formatQuery([])->where('id', $query['aid'])->first()?->toArray()['ignore_url'] ?? [];
$query['ignore_url'] = $ignoreUrl;
}
return $this->response->json([
'code' => 0,
'data' => $query