From d6185e270fc949d8d50a9a5671bdb14b99e2ae12 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Mon, 27 May 2024 02:12:14 +0800 Subject: [PATCH] z --- internal/subject/mysql_repository.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/subject/mysql_repository.go b/internal/subject/mysql_repository.go index 06af61bb2..71f276a2d 100644 --- a/internal/subject/mysql_repository.go +++ b/internal/subject/mysql_repository.go @@ -244,7 +244,9 @@ func (r mysqlRepo) Count( if filter.Series.Set { q = q.Where(r.q.Subject.Series.Is(filter.Series.Value)) } - // TODO:(everpcpc): add platform filter + if filter.Platform.Set { + q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value)) + } if filter.Year.Set { q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value)) } @@ -277,7 +279,9 @@ func (r mysqlRepo) Browse( if filter.Series.Set { q = q.Where(r.q.Subject.Series.Is(filter.Series.Value)) } - // TODO:(everpcpc): add platform filter + if filter.Platform.Set { + q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value)) + } if filter.Year.Set { q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value)) }