mirror of
https://github.com/usememos/memos.git
synced 2025-02-12 01:10:38 +01:00
fix: memo find for mysql(#3387)
* Update memo.go * Update store/db/mysql/memo.go Co-authored-by: boojack <stevenlgtm@gmail.com> --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
parent
537ae622d2
commit
0a9212f815
@ -91,7 +91,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
|
|||||||
where, args = append(where, "`memo`.`payload` = ?"), append(args, *v.Raw)
|
where, args = append(where, "`memo`.`payload` = ?"), append(args, *v.Raw)
|
||||||
}
|
}
|
||||||
if v.Tag != nil {
|
if v.Tag != nil {
|
||||||
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(payload, '$.property.tags[*]'), ?, '$')"), append(args, *v.Tag)
|
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(`memo`.`payload`, '$.property.tags'), ?)"), append(args, fmt.Sprintf(`["%s"]`, *v.Tag))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if find.ExcludeComments {
|
if find.ExcludeComments {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user