feat: change order by for login log and reward records

This commit is contained in:
RockYang
2023-08-22 22:04:46 +08:00
parent 88c13e7b9a
commit 1189ad7862
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ func NewRewardHandler(app *core.AppServer, db *gorm.DB) *RewardHandler {
func (h *RewardHandler) List(c *gin.Context) {
var items []model.Reward
res := h.db.Find(&items)
res := h.db.Order("id DESC").Find(&items)
var rewards = make([]vo.Reward, 0)
if res.Error == nil {
userIds := make([]uint, 0)