From ec3daa05f122738f18d4474b9257e4cf794dc5cf Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期五, 06 三月 2026 10:36:01 +0800
Subject: [PATCH] 接口新增
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
index ee96461..8357492 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
@@ -498,21 +498,30 @@
/// <returns></returns>
public virtual PageGridData<TEntity> QueryPage(string where, int pageIndex, int pageSize, Dictionary<string, OrderByType> orderBy)
{
- List<OrderByModel> orderByModels = new List<OrderByModel>();
- foreach (var item in orderBy)
+ try
{
- OrderByModel orderByModel = new OrderByModel()
+ List<OrderByModel> orderByModels = new List<OrderByModel>();
+ foreach (var item in orderBy)
{
- FieldName = item.Key,
- OrderByType = item.Value
- };
- orderByModels.Add(orderByModel);
- }
- int totalCount = 0;
- List<TEntity> list = _db.Queryable<TEntity>()
- .WhereIF(!string.IsNullOrEmpty(where), where).OrderBy(orderByModels).IncludesAllFirstLayer().ToPageList(pageIndex, pageSize, ref totalCount);
+ OrderByModel orderByModel = new OrderByModel()
+ {
+ FieldName = item.Key,
+ OrderByType = item.Value
+ };
+ orderByModels.Add(orderByModel);
+ }
+ int totalCount = 0;
+ List<TEntity> list = _db.Queryable<TEntity>()
+ .WhereIF(!string.IsNullOrEmpty(where), where).OrderBy(orderByModels).IncludesAllFirstLayer().ToPageList(pageIndex, pageSize, ref totalCount);
- return new PageGridData<TEntity>(totalCount, list);
+
+ return new PageGridData<TEntity>(totalCount, list);
+ }
+ catch (Exception ex)
+ {
+
+ throw;
+ }
}
/// <summary>
--
Gitblit v1.9.3