修复拼团针对同一个商品设置多个拼团规则时,金额计算错误的问题

This commit is contained in:
jianweie code
2024-02-01 01:29:03 +08:00
parent 6c7da1661e
commit 6f6916ee91
5 changed files with 13 additions and 8 deletions

View File

@@ -495,7 +495,7 @@ namespace CoreCms.Net.Services
cartProducts.isSelect = false;
}
//判断商品是否已收藏
cartProducts.isCollection = await _goodsCollectionServices.Check(userId, (int)cartProducts.products.goodsId);
cartProducts.isCollection = await _goodsCollectionServices.Check(userId, cartProducts.products.goodsId);
cartDto.list.Add(cartProducts);
}
@@ -507,7 +507,7 @@ namespace CoreCms.Net.Services
break;
case (int)GlobalEnumVars.OrderType.PinTuan:
//拼团模式走拼团价,去修改商品价格
var result = _pinTuanRuleServices.PinTuanInfo(cartDto.list);
var result = _pinTuanRuleServices.PinTuanInfo(cartDto.list, objectId);
if (result.status)
{
cartDto.list = result.data as List<CartProducts>;

View File

@@ -56,10 +56,11 @@ namespace CoreCms.Net.Services
/// 取购物车数据的时候,更新价格
/// </summary>
/// <param name="list"></param>
/// <param name="ruleId">规则序列</param>
/// <returns></returns>
public WebApiCallBack PinTuanInfo(List<CartProducts> list)
public WebApiCallBack PinTuanInfo(List<CartProducts> list, int ruleId)
{
return _dal.PinTuanInfo(list);
return _dal.PinTuanInfo(list,ruleId);
}