From 8870f18331f891159dc7174d5ceaf21161362af0 Mon Sep 17 00:00:00 2001 From: sanji Date: Mon, 16 Oct 2023 15:58:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=AE=B6=E6=89=BF?= =?UTF-8?q?=E6=8B=85=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/Order/OrderBusiness.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BBWY.Server.Business/Order/OrderBusiness.cs b/BBWY.Server.Business/Order/OrderBusiness.cs index f4894b60..b015187e 100644 --- a/BBWY.Server.Business/Order/OrderBusiness.cs +++ b/BBWY.Server.Business/Order/OrderBusiness.cs @@ -1257,7 +1257,7 @@ namespace BBWY.Server.Business Initiator = string.IsNullOrEmpty(j.Value("promotionName")) ? "平台" : "商家", CouponOrPromotionType = j.Value("saleTypeDesc"), PreferentialAmount = j.Value("salePrice"), - UndertakenByMerchantAmount = 0, + UndertakenByMerchantAmount = j.Value("salePrice"), UndertakenByPlatformAmount = 0 })); @@ -1267,7 +1267,9 @@ namespace BBWY.Server.Business Initiator = string.IsNullOrEmpty(j.Value("couponName")) ? "平台" : "商家", CouponOrPromotionType = j.Value("couponTypeDesc"), PreferentialAmount = j.Value("couponPrice"), - UndertakenByMerchantAmount = j.Value("venderDivideMoney"), + UndertakenByMerchantAmount = j.Value("priceDivide") == true ? + j.Value("venderDivideMoney") : + j.Value("couponPrice"), UndertakenByPlatformAmount = j.Value("jdDivideMoney") })); @@ -1282,8 +1284,8 @@ namespace BBWY.Server.Business ItemList = g.ToList() }).ToList(), TotalPreferentialAmount = itemList.Sum(x => x.PreferentialAmount ?? 0), - TotalUndertakenByMerchantAmount = itemList.Where(x => x.Initiator == "商家").Sum(x => x.UndertakenByMerchantAmount ?? 0), - TotalUndertakenByPlatformAmount = itemList.Where(x => x.Initiator == "平台").Sum(x => x.UndertakenByPlatformAmount ?? 0), + TotalUndertakenByMerchantAmount = itemList.Sum(x => x.UndertakenByMerchantAmount ?? 0), + TotalUndertakenByPlatformAmount = itemList.Sum(x => x.UndertakenByPlatformAmount ?? 0), TotalBalance = couponDetailVoJToken.Value("totalBalance"), TotalBaseDiscount = couponDetailVoJToken.Value("totalBaseDiscount"), TotalBaseFee = couponDetailVoJToken.Value("totalBaseFee"),