fix: 数据库实例删除等问题修复

This commit is contained in:
meilin.huang
2024-07-05 13:14:31 +08:00
parent 10630847df
commit a80221a950
12 changed files with 94 additions and 131 deletions

View File

@@ -76,18 +76,9 @@ func (r *redisAppImpl) TestConn(param *dto.SaveRedis) error {
db = cast.ToInt(strings.Split(re.Db, ",")[0])
}
authCert := param.AuthCert
if authCert.Id != 0 {
// 密文可能被清除,故需要重新获取
authCert, _ = r.resourceAuthCertApp.GetAuthCert(authCert.Name)
} else {
if authCert.CiphertextType == tagentity.AuthCertCiphertextTypePublic {
publicAuthCert, err := r.resourceAuthCertApp.GetAuthCert(authCert.Ciphertext)
if err != nil {
return err
}
authCert = publicAuthCert
}
authCert, err := r.resourceAuthCertApp.GetRealAuthCert(param.AuthCert)
if err != nil {
return err
}
rc, err := re.ToRedisInfo(db, authCert).Conn()