From 177e0016833b30d6e86421e10dff09ef0565a3e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=BB=E9=A3=8E2016?= <616036448@qq.com> Date: Wed, 28 Aug 2024 17:02:39 +0800 Subject: [PATCH] =?UTF-8?q?service=E6=A8=A1=E6=9D=BF=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=88=97=E8=A1=A8=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E8=BF=9E=E8=A1=A8=E6=98=AFId=E4=B8=8D?= =?UTF-8?q?=E6=98=8E=E7=A1=AE=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/template/service_Service.cs.vm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm index 26ea6097..c9f0901c 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm @@ -116,7 +116,11 @@ if (@column.QueryWhether == "Y"){ } else { @:.Select<@(@Model.ClassName)Output>(); } - return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + @if(@Model.TableField.Any(x=>x.EffectType == "fk")){ + @:return await query.OrderBuilder(input,"[u].","[@(PKName)]").ToPagedListAsync(input.Page, input.PageSize); + } else { + @:return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } } ///