Browse Source

修复暂停订单货款等于0时造成利润为负的问题

qianyi
shanji 2 years ago
parent
commit
1e0e0ca321
  1. 6
      BBWY.Server.Business/Sync/OrderSyncBusiness.cs

6
BBWY.Server.Business/Sync/OrderSyncBusiness.cs

@ -321,7 +321,7 @@ namespace BBWY.Server.Business
WaybillNo = waybillNo,
StoreOrder = storeOrder,
StoreId = storeId,
IsGift = orderTotalPrice == 0M || orderSellerPrice == 0M,
IsGift = orderSellerPrice == 0M,
StorageType = storageType
};
@ -457,7 +457,7 @@ namespace BBWY.Server.Business
orderState != Enums.OrderState.)
{
var orderCost = dbOrderCostList.FirstOrDefault(oc => oc.OrderId == dbOrder.Id);
if (orderCost == null && orderTotalPrice > 0M)
if (orderCost == null && orderSellerPrice > 0M)
{
if (isNewOrder && dbOrder.StorageType == Enums.StorageType.SD && sDCalculationCostRequest != null)
{
@ -610,7 +610,7 @@ namespace BBWY.Server.Business
.SetIf(sellerPreferentialAmount != dbOrder.SellerPreferentialAmount, o => o.SellerPreferentialAmount, sellerPreferentialAmount)
.SetIf(orderSellerPrice != dbOrder.OrderSellerPrice, o => o.OrderSellerPrice, orderSellerPrice)
.SetIf(orderTotalPrice != dbOrder.OrderTotalPrice, o => o.OrderTotalPrice, orderTotalPrice)
.SetIf(orderTotalPrice != dbOrder.OrderTotalPrice && orderTotalPrice > 0M, o => o.IsGift, false)
.SetIf(orderSellerPrice > 0M, o => o.IsGift, false)
.SetIf(storeOrder != dbOrder.StoreOrder, o => o.StoreOrder, storeOrder)
.SetIf(storeOrder != dbOrder.StoreOrder, o => o.StorageType, storageType)
.SetIf(preferentialAmount != dbOrder.PreferentialAmount, o => o.PreferentialAmount, preferentialAmount)

Loading…
Cancel
Save