From 70233af5426b0d1c343ebe87183303a34a9aaa58 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期三, 20 十一月 2024 09:05:38 +0800
Subject: [PATCH] WIDESEAWCS_QuartzJob更新版本

---
 WIDESEAWCS_Server/WIDESEAWCS_Core/BaseRepository/RepositoryBase.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseRepository/RepositoryBase.cs b/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseRepository/RepositoryBase.cs
index 6988086..77621f8 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseRepository/RepositoryBase.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseRepository/RepositoryBase.cs
@@ -66,7 +66,9 @@
                 return db;
             }
         }
-
+        /// <summary>
+        /// 鍒涘缓鏁版嵁搴撹繛鎺ュ璞�
+        /// </summary>
         public ISqlSugarClient Db => _db;
 
         public RepositoryBase(IUnitOfWorkManage unitOfWorkManage)
@@ -124,7 +126,7 @@
         public virtual int AddData(List<TEntity> listEntity)
         {
             IInsertable<TEntity> insert = _db.Insertable(listEntity);
-            return insert.ExecuteReturnIdentity();
+            return insert.ExecuteCommand();
         }
 
         /// <summary>
@@ -515,8 +517,8 @@
                 orderByModels.Add(orderByModel);
             }
             int totalCount = 0;
-            List<TEntity> list = _db.Queryable<TEntity>()
-                .WhereIF(!string.IsNullOrEmpty(where), where).OrderBy(orderByModels).ToPageList(pageIndex, pageSize, ref totalCount);
+            List<TEntity> list = _db.Queryable<TEntity>().OrderBy(orderByModels)
+                .WhereIF(!string.IsNullOrEmpty(where), where).ToPageList(pageIndex, pageSize, ref totalCount);
 
             return new PageGridData<TEntity>(totalCount, list);
         }
@@ -534,9 +536,10 @@
         public virtual List<TResult> QueryTabs<T, T2, TResult>(
            Expression<Func<T, T2, object[]>> joinExpression,
            Expression<Func<T, T2, TResult>> selectExpression,
+           Expression<Func<T,T2, bool>> whereExpressionT1,
            Expression<Func<TResult, bool>> whereExpression)
         {
-            List<TResult> list = _db.Queryable(joinExpression)
+            List<TResult> list = _db.Queryable(joinExpression).WhereIF(whereExpressionT1 != null, whereExpressionT1)
                .Select(selectExpression)
                .WhereIF(whereExpression != null, whereExpression).ToList();
             return list;

--
Gitblit v1.9.3