click subpath

This commit is contained in:
2025-04-10 17:19:40 +08:00
parent ace231b93f
commit 48d5bdafa4
10 changed files with 95 additions and 10 deletions

View File

@@ -24,6 +24,7 @@ export async function GET(request: NextRequest) {
const startTime = searchParams.get('startTime');
const endTime = searchParams.get('endTime');
const linkId = searchParams.get('linkId');
const subpath = searchParams.get('subpath');
// 获取团队、项目和标签筛选参数
const teamIds = searchParams.getAll('teamId');
@@ -39,6 +40,7 @@ export async function GET(request: NextRequest) {
startTime,
endTime,
linkId,
subpath,
teamIds,
projectIds,
tagIds,
@@ -63,6 +65,11 @@ export async function GET(request: NextRequest) {
conditions.push(`link_id = '${linkId}'`);
}
// 添加子路径筛选
if (subpath) {
conditions.push(`positionCaseInsensitive(url, '/${subpath}') > 0`);
}
// 添加团队筛选
if (teamIds && teamIds.length > 0) {
// 如果只有一个团队ID