mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:03:25 +08:00
【优化】优化分销商升级策略。
This commit is contained in:
@@ -167,6 +167,27 @@ namespace CoreCms.Net.Repository
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 根据用户id和商品id获取下了多少订单
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户id和商品id获取下了多少订单
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="goodId"></param>
|
||||
/// <param name="orderStatus">状态</param>
|
||||
/// <returns></returns>
|
||||
public int GetOrderNum(int userId, int goodId,int orderStatus)
|
||||
{
|
||||
var num = DbClient.Queryable<CoreCmsOrder, CoreCmsOrderItem>((op, ot) => new object[]
|
||||
{
|
||||
JoinType.Inner, op.orderId == ot.orderId
|
||||
}).Where((op, ot) => op.userId == userId && ot.goodsId == goodId && op.status == orderStatus).Count();
|
||||
return num;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 重写根据条件列表数据
|
||||
/// <summary>
|
||||
/// 重写根据条件列表数据
|
||||
|
||||
Reference in New Issue
Block a user