Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
a069244b57
2 changed files with 9 additions and 9 deletions
  1. +7
    -7
      app/hdl/hdl_set_center.go
  2. +2
    -2
      app/svc/svc_redis.go

+ 7
- 7
app/hdl/hdl_set_center.go View File

@@ -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
}


+ 2
- 2
app/svc/svc_redis.go View File

@@ -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)
}

Loading…
Cancel
Save