chore: 😀代码优化
This commit is contained in:
parent
d052b8747c
commit
9edbea7f80
@ -182,8 +182,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}");
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
var config = await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code);
|
||||
value = config != null ? config.Value : default;
|
||||
value = (await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code))?.Value;
|
||||
_sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value);
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(value)) return default;
|
||||
|
||||
@ -182,8 +182,7 @@ public class SysConfigTenantService : IDynamicApiController, ITransient
|
||||
var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}");
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
var config = await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code);
|
||||
value = config != null ? config.Value : default;
|
||||
value = (await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code))?.Value;
|
||||
_sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value);
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(value)) return default;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user