diff --git a/app/hdl/hdl_set_center.go b/app/hdl/hdl_set_center.go index d87202a..e4d88f5 100644 --- a/app/hdl/hdl_set_center.go +++ b/app/hdl/hdl_set_center.go @@ -45,11 +45,11 @@ func SetOss(c *gin.Context) { sysCfgDb.SysCfgUpdate(enum.FileBucketHost, req.FileBucketHost) sysCfgDb.SysCfgUpdate(enum.FileBucketRegion, req.FileBucketRegion) sysCfgDb.SysCfgUpdate(enum.FileBucket, req.FileBucket) - svc.ClearRedis(c, enum.FileAccessKey) - svc.ClearRedis(c, enum.FileSecretKey) - svc.ClearRedis(c, enum.FileBucketHost) - svc.ClearRedis(c, enum.FileBucketRegion) - svc.ClearRedis(c, enum.FileBucket) + svc.ClearRedis(c, masterId, enum.FileAccessKey) + svc.ClearRedis(c, masterId, enum.FileSecretKey) + svc.ClearRedis(c, masterId, enum.FileBucketHost) + svc.ClearRedis(c, masterId, enum.FileBucketRegion) + svc.ClearRedis(c, masterId, enum.FileBucket) e.OutSuc(c, "success", nil) return } @@ -500,8 +500,8 @@ func SetMob(c *gin.Context) { sysCfgDb := implement2.NewSysCfgDb(engine, masterId) sysCfgDb.SysCfgUpdate("mob_app_key", req.MobAppKey) sysCfgDb.SysCfgUpdate("mob_app_secret", req.MobAppSecret) - svc.ClearRedis(c, "mob_app_key") - svc.ClearRedis(c, "mob_app_secret") + svc.ClearRedis(c, masterId, "mob_app_key") + svc.ClearRedis(c, masterId, "mob_app_secret") e.OutSuc(c, "success", nil) return } diff --git a/app/svc/svc_redis.go b/app/svc/svc_redis.go index b249105..23d92c4 100644 --- a/app/svc/svc_redis.go +++ b/app/svc/svc_redis.go @@ -6,7 +6,7 @@ import ( "github.com/gin-gonic/gin" ) -func ClearRedis(c *gin.Context, key string) { - key1 := fmt.Sprintf("%s:cfg_cache:%s", c.GetString("mid"), key) +func ClearRedis(c *gin.Context, masterId, key string) { + key1 := fmt.Sprintf("%s:cfg_cache:%s", masterId, key) cache.Del(key1) }