mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
【优化】并发下单场景用户金额变动增加事务锁的悲观锁等待模式,防止出现金额异常情况。
This commit is contained in:
@@ -230,6 +230,18 @@ namespace CoreCms.Net.IServices
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据(悲观锁等待模式)
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseTranLock">是否使用TranLock</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseWithTranLockAsync(Expression<Func<T, bool>> predicate,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseTranLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user