Skip to content

Commit 0a9212f

Browse files
wzc90boojack
andauthored
fix: memo find for mysql(#3387)
* Update memo.go * Update store/db/mysql/memo.go Co-authored-by: boojack <[email protected]> --------- Co-authored-by: boojack <[email protected]>
1 parent 537ae62 commit 0a9212f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

store/db/mysql/memo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
9191
where, args = append(where, "`memo`.`payload` = ?"), append(args, *v.Raw)
9292
}
9393
if v.Tag != nil {
94-
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(payload, '$.property.tags[*]'), ?, '$')"), append(args, *v.Tag)
94+
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(`memo`.`payload`, '$.property.tags'), ?)"), append(args, fmt.Sprintf(`["%s"]`, *v.Tag))
9595
}
9696
}
9797
if find.ExcludeComments {

0 commit comments

Comments
 (0)