mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-04 05:36:35 +08:00
fix: redis集群修复
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v8"
|
||||
"github.com/redis/go-redis/v9"
|
||||
)
|
||||
|
||||
type Redis interface {
|
||||
@@ -81,6 +81,9 @@ func (r *redisAppImpl) Save(re *entity.Redis) {
|
||||
|
||||
// 查找是否存在该库
|
||||
oldRedis := &entity.Redis{Host: re.Host}
|
||||
if re.SshTunnelMachineId > 0 {
|
||||
oldRedis.SshTunnelMachineId = re.SshTunnelMachineId
|
||||
}
|
||||
err := r.GetRedisBy(oldRedis)
|
||||
|
||||
if re.Id == 0 {
|
||||
|
||||
Reference in New Issue
Block a user