From e3666d17a3a62689316952bd3f9f8a547b2884b1 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 31 Jan 2024 20:38:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E8=AE=A1=E5=88=92=E4=BB=BB=E5=8A=A1=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98=20(#3770?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/backup.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/app/service/backup.go b/backend/app/service/backup.go index d3765c735..8afc978f1 100644 --- a/backend/app/service/backup.go +++ b/backend/app/service/backup.go @@ -83,6 +83,7 @@ func (u *BackupService) List() ([]dto.BackupInfo, error) { func (u *BackupService) SearchRecordsWithPage(search dto.RecordSearch) (int64, []dto.BackupRecords, error) { total, records, err := backupRepo.PageRecord( search.Page, search.PageSize, + commonRepo.WithOrderBy("created_at desc"), commonRepo.WithByName(search.Name), commonRepo.WithByType(search.Type), backupRepo.WithByDetailName(search.DetailName), @@ -101,6 +102,7 @@ func (u *BackupService) SearchRecordsWithPage(search dto.RecordSearch) (int64, [ func (u *BackupService) SearchRecordsByCronjobWithPage(search dto.RecordSearchByCronjob) (int64, []dto.BackupRecords, error) { total, records, err := backupRepo.PageRecord( search.Page, search.PageSize, + commonRepo.WithOrderBy("created_at desc"), backupRepo.WithByCronID(search.CronjobID), ) if err != nil {