feat: 添加主定调过滤选项,优化内容列表查询功能
This commit is contained in:
@@ -128,6 +128,9 @@ func (s *creator) ListContents(
|
||||
q = q.Where(tbl.Genre.Eq(val))
|
||||
}
|
||||
}
|
||||
if filter.Key != nil && *filter.Key != "" {
|
||||
q = q.Where(tbl.Key.Eq(*filter.Key))
|
||||
}
|
||||
if filter.Keyword != nil && *filter.Keyword != "" {
|
||||
q = q.Where(tbl.Title.Like("%" + *filter.Keyword + "%"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user