mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:23:25 +08:00
【修复】修复订单金额满xx减,设置多种条件的情况下,参开启排他后,所有订单优惠金额无效的问题。
This commit is contained in:
@@ -88,8 +88,9 @@ namespace CoreCms.Net.Services
|
|||||||
|
|
||||||
foreach (var item in promotions)
|
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;
|
return cart;
|
||||||
@@ -160,7 +161,7 @@ namespace CoreCms.Net.Services
|
|||||||
if (key)
|
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)
|
foreach (var item in promotionResults)
|
||||||
{
|
{
|
||||||
await _promotionResultServices.toResult(item, cartModel, promotion);
|
await _promotionResultServices.toResult(item, cartModel, promotion);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
"isAutoReceive" => p => p.isAutoReceive,
|
"isAutoReceive" => p => p.isAutoReceive,
|
||||||
"isEnable" => p => p.isEnable,
|
"isEnable" => p => p.isEnable,
|
||||||
"isDel" => p => p.isDel,
|
"isDel" => p => p.isDel,
|
||||||
_ => p => p.id
|
_ => p => p.sort
|
||||||
};
|
};
|
||||||
//设置排序方式
|
//设置排序方式
|
||||||
var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
|
var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
|
||||||
@@ -121,7 +121,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
{
|
{
|
||||||
"asc" => OrderByType.Asc,
|
"asc" => OrderByType.Asc,
|
||||||
"desc" => OrderByType.Desc,
|
"desc" => OrderByType.Desc,
|
||||||
_ => OrderByType.Desc
|
_ => OrderByType.Asc
|
||||||
};
|
};
|
||||||
//查询筛选
|
//查询筛选
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user