|
|
@@ -91,7 +91,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|
|
var config = input.Adapt<SysConfig>();
|
|
|
await SysConfigRep.AsUpdateable(config).IgnoreColumns(true).ExecuteCommandAsync();
|
|
|
|
|
|
- _sysCacheService.Remove(config.Code);
|
|
|
+ _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}");
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -109,7 +109,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|
|
|
|
|
await SysConfigRep.DeleteAsync(config);
|
|
|
|
|
|
- _sysCacheService.Remove(config.Code);
|
|
|
+ _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}");
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -129,7 +129,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|
|
|
|
|
await SysConfigRep.DeleteAsync(config);
|
|
|
|
|
|
- _sysCacheService.Remove(config.Code);
|
|
|
+ _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -154,12 +154,12 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|
|
{
|
|
|
if (string.IsNullOrWhiteSpace(code)) return default;
|
|
|
|
|
|
- var value = _sysCacheService.Get<string>(code);
|
|
|
+ var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}");
|
|
|
if (string.IsNullOrEmpty(value))
|
|
|
{
|
|
|
var config = await SysConfigRep.GetFirstAsync(u => u.Code == code);
|
|
|
value = config != null ? config.Value : default;
|
|
|
- _sysCacheService.Set(code, value);
|
|
|
+ _sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value);
|
|
|
}
|
|
|
if (string.IsNullOrWhiteSpace(value)) return default;
|
|
|
return (T)Convert.ChangeType(value, typeof(T));
|
|
|
@@ -180,7 +180,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
|
|
config.Value = value;
|
|
|
await SysConfigRep.AsUpdateable(config).ExecuteCommandAsync();
|
|
|
|
|
|
- _sysCacheService.Remove(config.Code);
|
|
|
+ _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}");
|
|
|
}
|
|
|
|
|
|
/// <summary>
|