Explorar el Código

!1195 update Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs.
Merge pull request !1195 from xin12023/N/A

zuohuaijun hace 2 años
padre
commit
c390a8cfab
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs

@@ -147,7 +147,7 @@ public class SysConfigService : IDynamicApiController, ITransient
         var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}");
         var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}");
         if (string.IsNullOrEmpty(value))
         if (string.IsNullOrEmpty(value))
         {
         {
-            var config = await _sysConfigRep.GetFirstAsync(u => u.Code == code);
+            var config = await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code);
             value = config != null ? config.Value : default;
             value = config != null ? config.Value : default;
             _sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value);
             _sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value);
         }
         }