feat: 新增搜素 API

This commit is contained in:
kaixianzheng
2026-08-20 17:11:15 +08:00
parent ab3a544eec
commit 08bde54d74
3 changed files with 16 additions and 1 deletions

View File

@@ -362,7 +362,7 @@ function resourceWhere(input: ResourceFilters) {
const bindings: unknown[] = [];
if (input.query?.trim()) {
conditions.push(
"(a.nickname LIKE ? ESCAPE '\\' OR a.public_account_id LIKE ? ESCAPE '\\' OR a.current_contact LIKE ? ESCAPE '\\' OR a.tags LIKE ? ESCAPE '\\' OR a.bio LIKE ? ESCAPE '\\')",
"(a.nickname LIKE ? ESCAPE '\\\\' OR a.public_account_id LIKE ? ESCAPE '\\\\' OR a.current_contact LIKE ? ESCAPE '\\\\' OR a.tags LIKE ? ESCAPE '\\\\' OR a.bio LIKE ? ESCAPE '\\\\')",
);
const pattern = like(input.query.trim());
bindings.push(pattern, pattern, pattern, pattern, pattern);