mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
【修复】修复订单金额满xx减,设置多种条件的情况下,参开启排他后,所有订单优惠金额无效的问题。
This commit is contained in:
@@ -88,8 +88,9 @@ namespace CoreCms.Net.Services
|
||||
|
||||
foreach (var item in promotions)
|
||||
{
|
||||
await SetPromotion(item, cart);
|
||||
if (item.isExclusive == true) break;
|
||||
//如果当前这个条件满足,并且它排他(意思就是它可以了,别的就不要来了。)
|
||||
var isSatisfy = await SetPromotion(item, cart);
|
||||
if (item.isExclusive == true && isSatisfy) break;
|
||||
}
|
||||
|
||||
return cart;
|
||||
@@ -160,7 +161,7 @@ namespace CoreCms.Net.Services
|
||||
if (key)
|
||||
{
|
||||
//走到这一步就说明所有的促销条件都符合,那么就去计算结果
|
||||
var promotionResults = await _promotionResultServices.QueryListByClauseAsync(p => p.promotionId == promotion.id);
|
||||
var promotionResults = await _promotionResultServices.QueryListByClauseAsync(p => p.promotionId == promotion.id, p => p.id, OrderByType.Asc, true, true);
|
||||
foreach (var item in promotionResults)
|
||||
{
|
||||
await _promotionResultServices.toResult(item, cartModel, promotion);
|
||||
|
||||
Reference in New Issue
Block a user