mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-04 22:59:49 +08:00
【优化】调整在秒杀团购模式下,sku显示价格体系只到商品体系,未到具体sku价格模式的问题。
This commit is contained in:
@@ -805,7 +805,7 @@ namespace CoreCms.Net.Services
|
|||||||
}
|
}
|
||||||
result = new CoreCmsProductsView();
|
result = new CoreCmsProductsView();
|
||||||
result._id = product.id.ToString();
|
result._id = product.id.ToString();
|
||||||
result.name = product.name;
|
result.name = good.name;
|
||||||
result.goods_thumb = product.images;
|
result.goods_thumb = product.images;
|
||||||
result.buyPinTuanCount = buyPinTuanCount;
|
result.buyPinTuanCount = buyPinTuanCount;
|
||||||
result.buyPromotionCount = buyPromotionCount;
|
result.buyPromotionCount = buyPromotionCount;
|
||||||
|
|||||||
@@ -619,17 +619,38 @@ namespace CoreCms.Net.Services
|
|||||||
goods.groupPromotionResult = "订单打" + resultParameters["discount"].ObjectToString() + "折 ";
|
goods.groupPromotionResult = "订单打" + resultParameters["discount"].ObjectToString() + "折 ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var item in goods.skuList.sku_list)
|
||||||
|
{
|
||||||
|
switch (result.code)
|
||||||
|
{
|
||||||
|
//指定商品减固定金额
|
||||||
|
case "GOODS_REDUCE":
|
||||||
|
var reoucePrice = resultParameters["money"].ObjectToDecimal(0);
|
||||||
|
item.price = Math.Round(item.price - reoucePrice, 2);
|
||||||
|
break;
|
||||||
|
//指定商品打X折
|
||||||
|
case "GOODS_DISCOUNT":
|
||||||
|
var objDiscount = resultParameters["discount"].ObjectToDecimal(0);
|
||||||
|
item.price = Math.Round(Math.Round(Math.Round(item.price * objDiscount, 3) * 10, 2) / 100, 2);
|
||||||
|
break;
|
||||||
|
//指定商品一口价
|
||||||
|
case "GOODS_ONE_PRICE":
|
||||||
|
var newPrice = resultParameters["money"].ObjectToDecimal(0);
|
||||||
|
item.price = Math.Round(newPrice, 2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
item.price = Math.Round(item.price - promotionAmount, 2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (promotionAmount > 0)
|
if (promotionAmount > 0)
|
||||||
{
|
{
|
||||||
goods.product.price = Math.Round(goods.product.price - promotionAmount, 2);
|
goods.product.price = Math.Round(goods.product.price - promotionAmount, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var item in goods.skuList.sku_list)
|
|
||||||
{
|
|
||||||
item.price = Math.Round(item.price - promotionAmount, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//进行促销后要更换原销售价替换原市场价
|
//进行促销后要更换原销售价替换原市场价
|
||||||
|
|||||||
Reference in New Issue
Block a user