From c394efa2ec5ec2ae70a1c7d47e25b2299d739c0b Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:41:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=20PostgreSQL=20?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=87=E6=8D=A2=E7=9A=84=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#5332)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/database_mysql.go | 2 +- backend/app/service/database_postgresql.go | 2 +- frontend/src/views/database/mysql/index.vue | 3 +++ frontend/src/views/database/postgresql/index.vue | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/app/service/database_mysql.go b/backend/app/service/database_mysql.go index fd00419ec..98b076b80 100644 --- a/backend/app/service/database_mysql.go +++ b/backend/app/service/database_mysql.go @@ -240,7 +240,7 @@ func (u *MysqlService) DeleteCheck(req dto.MysqlDBDeleteCheck) ([]string, error) } } } else { - apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID)) + apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID), appRepo.WithKey(req.Type)) for _, app := range apps { appInstall, _ := appInstallRepo.GetFirst(commonRepo.WithByID(app.AppInstallId)) if appInstall.ID != 0 { diff --git a/backend/app/service/database_postgresql.go b/backend/app/service/database_postgresql.go index ffea87627..f8439e94c 100644 --- a/backend/app/service/database_postgresql.go +++ b/backend/app/service/database_postgresql.go @@ -266,7 +266,7 @@ func (u *PostgresqlService) DeleteCheck(req dto.PostgresqlDBDeleteCheck) ([]stri } } } else { - apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID)) + apps, _ := appInstallResourceRepo.GetBy(appInstallResourceRepo.WithResourceId(db.ID), appRepo.WithKey(req.Type)) for _, app := range apps { appInstall, _ := appInstallRepo.GetFirst(commonRepo.WithByID(app.AppInstallId)) if appInstall.ID != 0 { diff --git a/frontend/src/views/database/mysql/index.vue b/frontend/src/views/database/mysql/index.vue index 44d78e0fd..57fbbf067 100644 --- a/frontend/src/views/database/mysql/index.vue +++ b/frontend/src/views/database/mysql/index.vue @@ -512,6 +512,9 @@ const loadDBOptions = async () => { } } if (currentDB.value) { + if (currentDB.value.from === 'remote') { + maskShow.value = false; + } globalStore.setCurrentDB(''); search(); return; diff --git a/frontend/src/views/database/postgresql/index.vue b/frontend/src/views/database/postgresql/index.vue index edbe33d3b..eb67277cc 100644 --- a/frontend/src/views/database/postgresql/index.vue +++ b/frontend/src/views/database/postgresql/index.vue @@ -469,6 +469,9 @@ const loadDBOptions = async () => { } } if (currentDB.value) { + if (currentDB.value.from === 'remote') { + maskShow.value = false; + } globalStore.setCurrentDB(''); search(); return;