diff --git a/CoreCms.Net.RedisMQ/Subscribe/AfterSalesReviewForPointSubscribe.cs b/CoreCms.Net.RedisMQ/Subscribe/AfterSalesReviewForPointSubscribe.cs index a74034e6..cb2b2c24 100644 --- a/CoreCms.Net.RedisMQ/Subscribe/AfterSalesReviewForPointSubscribe.cs +++ b/CoreCms.Net.RedisMQ/Subscribe/AfterSalesReviewForPointSubscribe.cs @@ -100,16 +100,37 @@ namespace CoreCms.Net.RedisMQ.Subscribe if (pointExchangeModel == 1) { //可能存在就是根本不是全积分抵扣,而是订单实际在不够积分的情况下,抵扣了多少金额。那么统一就根据订单的比例来计算,更加精准,(这里的总金额是实际支付金额,去掉了优惠) - var practicalProportion = Math.Round(order.pointMoney / order.orderAmount, 4); + //如果订单实际支付金额是0的话,那就是全积分。 + var practicalProportion = order.orderAmount <= 0 ? 1 : Math.Round(order.pointMoney / order.orderAmount, 4); + + //未发货的商品库存调整,如果订单未发货或者部分发货,并且用户未收到商品的情况下,需要解冻冻结库存 + if ((order.shipStatus == (int)GlobalEnumVars.OrderShipStatus.No || + order.shipStatus == (int)GlobalEnumVars.OrderShipStatus.PartialYes) && + info.type == (int)GlobalEnumVars.BillAftersalesIsReceive.Refund && p.nums == 0) + { + point += aftersalesProduct.price * practicalProportion * pointDiscountedProportion; + } + else + { + //获取货品金额*积分使用比例*数量*积分折现比例=积分抵扣的金额应该可以兑换的积分。 + point += aftersalesProduct.price * practicalProportion * p.nums * pointDiscountedProportion; + } - //获取货品金额*积分使用比例*数量*积分折现比例=积分抵扣的金额应该可以兑换的积分。 - point += aftersalesProduct.price * practicalProportion * p.nums * pointDiscountedProportion; } //如果是单品模式 else if (pointExchangeModel == 2) { - //单品模式只能是全积分抵扣或者全金额支付。所以直接按照扣掉的金额还原积分即可。 - point += aftersalesProduct.pointsDeduction * p.nums * pointDiscountedProportion; + if ((order.shipStatus == (int)GlobalEnumVars.OrderShipStatus.No || + order.shipStatus == (int)GlobalEnumVars.OrderShipStatus.PartialYes) && + info.type == (int)GlobalEnumVars.BillAftersalesIsReceive.Refund && p.nums == 0) + { + point += aftersalesProduct.pointsDeduction * pointDiscountedProportion; + } + else + { + //单品模式只能是全积分抵扣或者全金额支付。所以直接按照扣掉的金额还原积分即可。 + point += aftersalesProduct.pointsDeduction * p.nums * pointDiscountedProportion; + } } } diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html index 432884ab..8d839d1e 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html @@ -253,9 +253,9 @@
- +
-
前台下单时给商家发送短信通知
+
前台下单时给商家发送短信通知,多个手机号请使用小写逗号(,)隔开,最多8个号码,如:19145919666,19145919666