feat: 参数配置修改配置参数
This commit is contained in:
@@ -27,4 +27,7 @@ type ISysConfig interface {
|
||||
|
||||
// ResetConfigCache 重置参数缓存数据
|
||||
ResetConfigCache()
|
||||
|
||||
// SelectConfigByKey 查询配置信息BY键
|
||||
SelectConfigByKey(configKey string) model.SysConfig
|
||||
}
|
||||
|
||||
@@ -155,3 +155,14 @@ func (r *SysConfigImpl) clearConfigCache(configKey string) bool {
|
||||
delOk, _ := redis.DelKeys("", keys)
|
||||
return delOk
|
||||
}
|
||||
|
||||
// SelectConfigByKey 查询配置信息BY键
|
||||
func (r *SysConfigImpl) SelectConfigByKey(configKey string) model.SysConfig {
|
||||
sysConf := r.sysConfigRepository.SelectConfigList(model.SysConfig{
|
||||
ConfigKey: configKey,
|
||||
})
|
||||
if len(sysConf) > 0 {
|
||||
return sysConf[0]
|
||||
}
|
||||
return model.SysConfig{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user