service模板获取分页列表,修复存在连表是Id不明确的情况

This commit is contained in:
轻风2016 2024-08-28 17:02:39 +08:00
parent 6b90245949
commit 177e001683

View File

@ -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);
}
}
/// <summary>