From dbc87bd0d78493405d5764bc4e8535f27b940217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 10 Aug 2020 18:01:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=95=86=E5=9F=8E=E5=92=8C?= =?UTF-8?q?=E4=BA=AC=E8=A5=BF=E7=9A=84=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 32 +++++++++++++-------------- business/jxutils/jxutils.go | 20 ++++++++--------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 841c2e7ad..865209fc4 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -199,25 +199,25 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m waybill, _ := c.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID) store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID) if waybill == nil { - if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { - if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage)/int64(100) { - order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage) / int64(100) - } - } else { - if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) { - order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage/2) / int64(100) - } + // if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { + // if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage)/int64(100) { + // order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage) / int64(100) + // } + // } else { + if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) { + order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage/2) / int64(100) } + // } } else { - if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { - if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage)/int64(100) { - order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage) / int64(100) - } - } else { - if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100) { - order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage/2) / int64(100) - } + // if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { + // if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage)/int64(100) { + // order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage) / int64(100) + // } + // } else { + if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100) { + order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage/2) / int64(100) } + // } } dao.UpdateEntity(db, order, "NewEarningPrice") } diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index 30064d05e..c7288df87 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -590,11 +590,11 @@ func RefreshOrderSkuRelated(order *model.GoodsOrder) *model.GoodsOrder { func RefreshOrderEarningPrice2(order *model.GoodsOrder, payPercentage int) *model.GoodsOrder { if order.EarningType == model.EarningTypePoints { - if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { - order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage)) / 100 - } else { - order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100 - } + // if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { + // order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage)) / 100 + // } else { + order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100 + // } } else { order.NewEarningPrice = order.EarningPrice } @@ -603,11 +603,11 @@ func RefreshOrderEarningPrice2(order *model.GoodsOrder, payPercentage int) *mode func RefreshOrderEarningPrice3(order *model.GoodsOrder, payPercentage int, bill *model.Waybill) *model.GoodsOrder { if order.EarningType == model.EarningTypePoints { - if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { - order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - payPercentage)) / 100 - } else { - order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - payPercentage/2)) / 100 - } + // if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX { + // order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - payPercentage)) / 100 + // } else { + order.NewEarningPrice = (order.TotalShopMoney - bill.DesiredFee) * int64((100 - payPercentage/2)) / 100 + // } } else { order.NewEarningPrice = order.EarningPrice }