新增热搜契约:记录搜索行为与获取热搜列表

This commit is contained in:
堂吉诃德拉曼查的英豪
2026-08-18 09:18:24 +08:00
parent 5c229c226f
commit 397641cf52
2 changed files with 20 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ interface DataService extends
DataServiceInterface,
AgreementInterface,
ConfigInterface,
HotSearchInterface,
AppVersionInterface,
RecruitUnitInterface,
CampusRelationInterface,

View File

@@ -0,0 +1,19 @@
<?php
namespace Dhd\Micro\Interface\DataService;
interface HotSearchInterface
{
/**
* 记录搜索行为(热搜统计数据源,仅记录不返回榜单)
* @param array $params 包含:platform 平台、keyword 关键词、user_id 用户ID(未登录0)、result_count 聚合搜索结果数
*/
public function recordSearchKeyword(array $params): array;
/**
* 获取热搜词列表:运营置顶词优先,其后为近7天真实搜索热度词
* @param string $platform 平台
* @param int $limit 获取数量
*/
public function getHotSearchList(string $platform = 'app', int $limit = 10): array;
}