From 32fb7feb44cfb9141a90285fc26b4601d16fc6f0 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:07:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=8E=92=E5=BA=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#5257)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/database.go | 2 +- backend/app/service/database.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/dto/database.go b/backend/app/dto/database.go index d40c2fe6a..4b57f31c9 100644 --- a/backend/app/dto/database.go +++ b/backend/app/dto/database.go @@ -285,7 +285,7 @@ type DatabaseCreate struct { Address string `json:"address"` Port uint `json:"port"` Username string `json:"username" validate:"required"` - Password string `json:"password" validate:"required"` + Password string `json:"password"` SSL bool `json:"ssl"` RootCert string `json:"rootCert"` diff --git a/backend/app/service/database.go b/backend/app/service/database.go index 5dd438ca3..402bf6954 100644 --- a/backend/app/service/database.go +++ b/backend/app/service/database.go @@ -43,6 +43,7 @@ func (u *DatabaseService) SearchWithPage(search dto.DatabaseSearch) (int64, inte total, dbs, err := databaseRepo.Page(search.Page, search.PageSize, databaseRepo.WithTypeList(search.Type), commonRepo.WithLikeName(search.Info), + commonRepo.WithOrderRuleBy(search.OrderBy, search.Order), databaseRepo.WithoutByFrom("local"), ) var datas []dto.DatabaseInfo