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 }