订单完成刷结算规则修改
This commit is contained in:
@@ -199,25 +199,13 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
|
|||||||
waybill, _ := c.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
waybill, _ := c.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
||||||
store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
||||||
if waybill == nil {
|
if waybill == nil {
|
||||||
// if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
if (order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100)) && store.PayPercentage <= 50 {
|
||||||
// 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)
|
order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage/2) / int64(100)
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
// if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
if (order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100)) && store.PayPercentage <= 50 {
|
||||||
// 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*int64(100-store.PayPercentage/2)/int64(100) - waybill.DesiredFee
|
order.NewEarningPrice = order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) - waybill.DesiredFee
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
dao.UpdateEntity(db, order, "NewEarningPrice")
|
dao.UpdateEntity(db, order, "NewEarningPrice")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user