diff --git a/CoreCms.Net.IRepository/Pintuan/ICoreCmsPintuanRuleRepository.cs b/CoreCms.Net.IRepository/Pintuan/ICoreCmsPintuanRuleRepository.cs
index 07e656e0..0ca8773f 100644
--- a/CoreCms.Net.IRepository/Pintuan/ICoreCmsPintuanRuleRepository.cs
+++ b/CoreCms.Net.IRepository/Pintuan/ICoreCmsPintuanRuleRepository.cs
@@ -30,8 +30,9 @@ namespace CoreCms.Net.IRepository
/// 取购物车数据的时候,更新价格
///
///
+ /// 规则序列
///
- WebApiCallBack PinTuanInfo(List list);
+ WebApiCallBack PinTuanInfo(List list, int ruleId);
///
diff --git a/CoreCms.Net.IServices/Pintuan/ICoreCmsPintuanRuleServices.cs b/CoreCms.Net.IServices/Pintuan/ICoreCmsPintuanRuleServices.cs
index 1195bb9c..10da2a99 100644
--- a/CoreCms.Net.IServices/Pintuan/ICoreCmsPintuanRuleServices.cs
+++ b/CoreCms.Net.IServices/Pintuan/ICoreCmsPintuanRuleServices.cs
@@ -30,8 +30,9 @@ namespace CoreCms.Net.IServices
/// 取购物车数据的时候,更新价格
///
///
+ /// 规则序列
///
- WebApiCallBack PinTuanInfo(List list);
+ WebApiCallBack PinTuanInfo(List list, int ruleId);
///
diff --git a/CoreCms.Net.Repository/Pintuan/CoreCmsPintuanRuleRepository.cs b/CoreCms.Net.Repository/Pintuan/CoreCmsPintuanRuleRepository.cs
index 4c95b149..6e4b9207 100644
--- a/CoreCms.Net.Repository/Pintuan/CoreCmsPintuanRuleRepository.cs
+++ b/CoreCms.Net.Repository/Pintuan/CoreCmsPintuanRuleRepository.cs
@@ -35,12 +35,14 @@ namespace CoreCms.Net.Repository
}
#region 取购物车数据的时候,更新价格
+
///
/// 取购物车数据的时候,更新价格
///
///
+ /// 规则序列
///
- public WebApiCallBack PinTuanInfo(List list)
+ public WebApiCallBack PinTuanInfo(List list, int ruleId)
{
var res = new WebApiCallBack();
foreach (var item in list)
@@ -50,7 +52,7 @@ namespace CoreCms.Net.Repository
{
JoinType.Inner, pinTuanGoods.ruleId == pinTuanRule.id
}).Where((pinTuanGoods, pinTuanRule) =>
- pinTuanGoods.goodsId == item.products.goodsId && pinTuanRule.isStatusOpen == true)
+ pinTuanGoods.goodsId == item.products.goodsId && pinTuanRule.isStatusOpen == true && pinTuanRule.id == ruleId)
.Select((pinTuanGoods, pinTuanRule) => pinTuanRule).First();
if (ruleModel == null)
{
diff --git a/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs b/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs
index 591268d0..fe7a9845 100644
--- a/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs
+++ b/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs
@@ -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;
diff --git a/CoreCms.Net.Services/Pintuan/CoreCmsPintuanRuleServices.cs b/CoreCms.Net.Services/Pintuan/CoreCmsPintuanRuleServices.cs
index a51ed146..00030f9c 100644
--- a/CoreCms.Net.Services/Pintuan/CoreCmsPintuanRuleServices.cs
+++ b/CoreCms.Net.Services/Pintuan/CoreCmsPintuanRuleServices.cs
@@ -56,10 +56,11 @@ namespace CoreCms.Net.Services
/// 取购物车数据的时候,更新价格
///
///
+ /// 规则序列
///
- public WebApiCallBack PinTuanInfo(List list)
+ public WebApiCallBack PinTuanInfo(List list, int ruleId)
{
- return _dal.PinTuanInfo(list);
+ return _dal.PinTuanInfo(list,ruleId);
}