mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:43:26 +08:00
【优化】优化售后单数量统计规则。
This commit is contained in:
@@ -33,13 +33,14 @@ namespace CoreCms.Net.IServices
|
|||||||
WebApiCallBack OrderToAftersales(string orderId, int aftersaleLevel = 0);
|
WebApiCallBack OrderToAftersales(string orderId, int aftersaleLevel = 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 统计用户的售后数量
|
/// 统计用户的售后数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userId"></param>
|
/// <param name="whereExpression"></param>
|
||||||
/// <param name="status"></param>
|
/// <param name="noLock"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<int> GetUserAfterSalesNum(int userId, int status);
|
Task<int> GetUserAfterSalesNum(Expression<Func<CoreCmsBillAftersales, bool>> whereExpression, bool noLock = false);
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -147,12 +147,12 @@ namespace CoreCms.Net.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 统计用户的售后数量
|
/// 统计用户的售后数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userId"></param>
|
/// <param name="whereExpression"></param>
|
||||||
/// <param name="status"></param>
|
/// <param name="noLock"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<int> GetUserAfterSalesNum(int userId, int status)
|
public async Task<int> GetUserAfterSalesNum(Expression<Func<CoreCmsBillAftersales, bool>> whereExpression, bool noLock = false)
|
||||||
{
|
{
|
||||||
var count = await base.GetCountAsync(p => p.userId == userId && p.status == status);
|
var count = await base.GetCountAsync(whereExpression, noLock);
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -929,8 +929,7 @@ namespace CoreCms.Net.Services
|
|||||||
}
|
}
|
||||||
if (isAfterSale)
|
if (isAfterSale)
|
||||||
{
|
{
|
||||||
var number = await _billAftersalesServices.GetUserAfterSalesNum(userId,
|
var number = await _billAftersalesServices.GetUserAfterSalesNum(p => p.userId == userId, true);
|
||||||
(int)GlobalEnumVars.BillAftersalesStatus.WaitAudit);
|
|
||||||
data.Add("isAfterSale", number);
|
data.Add("isAfterSale", number);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user