mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-03-01 18:40:26 +00:00
@@ -117,3 +117,9 @@ func (sdb *scoredb) InsertOrUpdateSignInCountByUID(uid int64, count int) (err er
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (sdb *scoredb) GetScoreRankByTopN(n int) (st []scoretable, err error) {
|
||||
db := (*gorm.DB)(sdb)
|
||||
err = db.Debug().Model(&scoretable{}).Order("score desc").Limit(n).Find(&st).Error
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user