chore: fix memo search

This commit is contained in:
Steven
2023-12-22 00:31:29 +08:00
parent 81524c38e9
commit 02265a6e1a
7 changed files with 69 additions and 54 deletions

View File

@@ -47,7 +47,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
}
if v := find.ContentSearch; len(v) != 0 {
for _, s := range v {
where, args = append(where, "memo.content LIKE ?"), append(args, "%"+s+"%")
where, args = append(where, "memo.content LIKE ?"), append(args, fmt.Sprintf("%%%s%%", s))
}
}
if v := find.VisibilityList; len(v) != 0 {