fix: import cycle
This commit is contained in:
Vendored
+2
-3
@@ -3,7 +3,6 @@ package cache
|
||||
import (
|
||||
models2 "cutego/modules/core/dataobject"
|
||||
"cutego/pkg/cache"
|
||||
"cutego/pkg/common"
|
||||
"cutego/pkg/constant"
|
||||
)
|
||||
|
||||
@@ -13,13 +12,13 @@ import (
|
||||
func GetRedisConfig(key string) *models2.SysConfig {
|
||||
val := cache.GetCache(constant.RedisConst{}.GetRedisConfigKey() + key)
|
||||
s := new(models2.SysConfig)
|
||||
return common.JsonToStruct(val, s).(*models2.SysConfig)
|
||||
return cache.JsonToStruct(val, s).(*models2.SysConfig)
|
||||
}
|
||||
|
||||
// SetRedisConfig 将配置存入缓存
|
||||
// @Param config models2.SysConfig
|
||||
func SetRedisConfig(config models2.SysConfig) {
|
||||
cache.SetCache(config.ConfigKey, common.StructToJson(config))
|
||||
cache.SetCache(config.ConfigKey, cache.StructToJson(config))
|
||||
}
|
||||
|
||||
// RemoveRedisConfig 从缓存中删除配置
|
||||
|
||||
Vendored
+1
-2
@@ -3,7 +3,6 @@ package cache
|
||||
import (
|
||||
models2 "cutego/modules/core/dataobject"
|
||||
"cutego/pkg/cache"
|
||||
"cutego/pkg/common"
|
||||
"cutego/pkg/constant"
|
||||
)
|
||||
|
||||
@@ -13,7 +12,7 @@ import (
|
||||
func GetRedisDict(key string) interface{} {
|
||||
val := cache.GetCache(key)
|
||||
s := make([]interface{}, 0)
|
||||
return common.JsonToStruct(val, s)
|
||||
return cache.JsonToStruct(val, s)
|
||||
}
|
||||
|
||||
// SetRedisDict 保存字典数据
|
||||
|
||||
Reference in New Issue
Block a user