mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:13:26 +08:00
【优化】仓储单个数据查询增加悲观锁等待模式。
【优化】通过优惠券编码领取优惠券增加事务处理。
This commit is contained in:
@@ -246,8 +246,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <param name="blUseTranLock">是否使用锁</param>
|
||||
/// <param name="dbLockType">数据锁类型</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue, bool blUseTranLock = false, DbLockType dbLockType = DbLockType.Wait);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
@@ -271,23 +273,10 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="blUseNoLock">是否使用WITH(NoLock)</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <param name="blUseTranLock">是否使用锁</param>
|
||||
/// <param name="dbLockType">数据锁类型</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据(悲观锁等待模式)
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseTranLock">是否使用TranLock</param>
|
||||
/// <param name="isDataCache">是否启用缓存</param>
|
||||
/// <param name="cacheTimes">缓存时长(分钟)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseWithTranLockAsync(Expression<Func<T, bool>> predicate,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseTranLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue);
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false, bool isDataCache = false, int cacheTimes = int.MaxValue, bool blUseTranLock = false, DbLockType dbLockType = DbLockType.Wait);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user