Skip to content

Commit

Permalink
修复失物招领获取全部记录时未排序问题
Browse files Browse the repository at this point in the history
  • Loading branch information
XiMo-210 committed Aug 13, 2023
1 parent 79afbb6 commit 62f8468
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ func GetAllLostAndFoundRecord(campus, kind string, pageNum, pageSize int) ([]mod
result := database.DB.Where(models.LostAndFoundRecord{
Campus: campus,
Kind: kind,
}).Not("is_processed", true).Limit(pageSize).Offset((pageNum - 1) * pageSize).Find(&record)
}).Not("is_processed", true).Limit(pageSize).Offset((pageNum - 1) * pageSize).
Order("publish_time desc").Find(&record)
if result.Error != nil {
return nil, result.Error
}
Expand Down

0 comments on commit 62f8468

Please sign in to comment.