Skip to content

Commit

Permalink
[U] 大小写
Browse files Browse the repository at this point in the history
  • Loading branch information
zxysilent committed Aug 14, 2021
1 parent a98809b commit e237eac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/app_post_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TagPostCount(tagId int) int {
// TagPostPage 通过标签查询文章分页
func TagPostPage(tagId, pi, ps int) ([]PostTag, error) {
mods := make([]PostTag, 0, ps)
err := Db.SQL(`SELECT id,post_id,tag_id FROM post_tag WHERE tag_id=? limit ?,? `, tagId, (pi-1)*ps, ps).Find(&mods)
err := Db.SQL(`SELECT id,post_id,tag_id FROM post_tag WHERE tag_id=? ORDER BY post_id DESC LIMIT ?,? `, tagId, (pi-1)*ps, ps).Find(&mods)
if len(mods) > 0 {
ids := make([]int, 0, len(mods))
for idx := range mods {
Expand Down

0 comments on commit e237eac

Please sign in to comment.