From 68cb150245353bc2b2b563a719800d9110e4d389 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Mon, 27 May 2024 11:36:53 +0800 Subject: [PATCH] z --- internal/subject/mysql_repository.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/subject/mysql_repository.go b/internal/subject/mysql_repository.go index d8e0fed19..1765eb9c4 100644 --- a/internal/subject/mysql_repository.go +++ b/internal/subject/mysql_repository.go @@ -247,7 +247,7 @@ func (r mysqlRepo) Count( q = q.Where(r.q.Subject.Series.Is(filter.Series.Value)) } if filter.Platform.Set { - q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value)) + q = q.Where(r.q.Subject.Infobox.Like(fmt.Sprintf("%%[%s]%%", filter.Platform.Value))) } if filter.Year.Set { q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value)) @@ -284,7 +284,7 @@ func (r mysqlRepo) Browse( q = q.Where(r.q.Subject.Series.Is(filter.Series.Value)) } if filter.Platform.Set { - q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value)) + q = q.Where(r.q.Subject.Infobox.Like(fmt.Sprintf("%%[%s]%%", filter.Platform.Value))) } if filter.Year.Set { q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value))