Commit 2c0cbe8d authored by hujiebin's avatar hujiebin

feat:给个排序

parent 13ff203f
......@@ -28,7 +28,8 @@ func GetUserValidUserBag(model *domain.Model, userId mysql.ID, resType res_e.Res
Where("end_time > ?", time.Now()).
Where("count > 0").
Where("res_type = ?", resType).
Where("user_id = ?", userId).Find(&res).Error; err != nil {
Where("user_id = ?", userId).
Order("id").Find(&res).Error; err != nil {
return nil, err
}
return res, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment