【修复】修复后台支付单生成校验失败的问题。

【优化】新增SqlSugarExtensions扩展类,增加是否使用WITH(NoLock)方法扩展封装,删除BaseRepository中的一些冗余代码。
This commit is contained in:
jianweie code
2023-05-07 23:10:41 +08:00
parent 932eb84cea
commit 373198e1bf
3 changed files with 129 additions and 208 deletions

View File

@@ -0,0 +1,19 @@
using SqlSugar;
namespace CoreCms.Net.Repository
{
internal static class SqlSugarExtensions
{
internal static ISugarQueryable<T> WithNoLockOrNot<T>(this ISugarQueryable<T> query, bool @lock = false)
{
if (@lock)
{
query = query.With(SqlWith.NoLock);
}
return query;
}
}
}