Skip to content

Commit

Permalink
Merge pull request #63 from XiMo-210/main
Browse files Browse the repository at this point in the history
修复失物招领获取全部记录时未排序问题
  • Loading branch information
cbluebird committed Aug 14, 2023
2 parents 79afbb6 + 62f8468 commit 431a5b9
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 431a5b9

Please sign in to comment.