文章新增了排序值字段111

This commit is contained in:
2024-11-04 15:40:06 +08:00
parent 397f20c15c
commit ff24ed4e0c
2 changed files with 13 additions and 8 deletions
+4
View File
@@ -196,6 +196,10 @@ func (r *ArticleScienceDao) GetArticleSciencePageSearch(req requests.GetArticleS
if req.Order.UpdatedAt != "" {
query = query.Order("updated_at " + req.Order.UpdatedAt)
}
if req.Order.Sort != "" {
query = query.Order("sort " + req.Order.Sort)
}
}
// 排序