From ebe149fdd9267fb783044feae757ad62dabbc860 Mon Sep 17 00:00:00 2001 From: mycode99 <661753@qq.com> Date: Sat, 29 Mar 2025 16:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Admin.NET/Admin.NET.Web.En?= =?UTF-8?q?try/wwwroot/template/service=5FMid.cs.vm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正缓存BUG --- .../Admin.NET.Web.Entry/wwwroot/template/service_Mid.cs.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Mid.cs.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Mid.cs.vm index 7d44eefd..697ec0d1 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Mid.cs.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Mid.cs.vm @@ -87,7 +87,7 @@ public partial class @(@Model.ClassName)Mid @: var key = $"@(@column.FkEntityName)_{t.@(@column.PropertyName)}"; @: if (!sysCacheService.ExistKey(key)) @: { - @: var m = db.ForTenant<@(@column.FkEntityName)>().Queryable<@(@column.FkEntityName)>().FirstAsync(f => f.@(@column.FkLinkColumnName) == t.@(@column.PropertyName)); + @: var m = db.ForTenant<@(@column.FkEntityName)>().Queryable<@(@column.FkEntityName)>().First(f => f.@(@column.FkLinkColumnName) == t.@(@column.PropertyName)); @: if (m != null) sysCacheService.Set(key, m); @: } @: t.@(@column.PropertyName)@(@column.FkColumnName) = sysCacheService.Get<@(@column.FkEntityName)>(key)?.@(@column.FkColumnName);