feat:order logs by time desc (#1250)

pull/1252/head
CNCSMonster 9 months ago committed by GitHub
parent 8a54e465a2
commit b3d2f3b182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,6 +24,7 @@ func (l *LogGorm) Search(ctx context.Context, keyword string, start time.Time, e
if end.UnixMilli() != 0 {
db = l.db.WithContext(ctx).Where("create_time <= ?", end)
}
db = db.Order("create_time desc")
return ormutil.GormSearch[relationtb.Log](db, []string{"user_id"}, keyword, pageNumber, showNumber)
}

Loading…
Cancel
Save