From 1bb65fa0ddd1ede4f65a30b4d43a516a3c14f8f9 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Wed, 27 Sep 2023 01:03:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=85=88=E7=94=A8=E4=BC=98?= =?UTF-8?q?=E5=85=88=E7=BA=A7=E6=8E=92=E5=BA=8F=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/channel.go b/model/channel.go index a41a04e8..8702ac44 100644 --- a/model/channel.go +++ b/model/channel.go @@ -34,7 +34,7 @@ func GetAllChannels(startIdx int, num int, selectAll bool) ([]*Channel, error) { if selectAll { err = DB.Order("id desc").Find(&channels).Error } else { - err = DB.Order("id desc").Limit(num).Offset(startIdx).Omit("key").Find(&channels).Error + err = DB.Order("id desc").Limit(num).Offset(startIdx).Omit("key").Order("priority desc").Find(&channels).Error } return channels, err }