diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 13038749c..9f0d2bef8 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -362,7 +362,7 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro SELECT t1.afs_total_shop_money, t2.shop_price FROM afs_order t1 LEFT JOIN ( - SELECT a.afs_order_id, SUM(c.earning_price*a.count) shop_price + SELECT a.afs_order_id, SUM(a.shop_price*a.count) shop_price FROM order_sku_financial a LEFT JOIN ( SELECT MAX(created_at), afs_order_id @@ -371,7 +371,6 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro AND vendor_order_id = ? GROUP BY 2 ) b ON a.afs_order_id = b.afs_order_id - JOIN order_sku c ON IF(a.jx_sku_id = 0, a.sku_id, a.jx_sku_id) = IF(c.jx_sku_id = 0, c.sku_id, c.jx_sku_id) AND a.vendor_order_id = c.vendor_order_id WHERE a.afs_order_id = b.afs_order_id AND a.is_afs_order = ? GROUP BY 1) t2 ON t1.afs_order_id = t2.afs_order_id WHERE t1.afs_order_id = t2.afs_order_id @@ -382,7 +381,7 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro if afsOrder.AfsTotalShopMoney != 0 && afsOrder.AfsTotalShopMoney != order.TotalShopMoney { //报价,要减去商品的京西价 if order.EarningType == model.EarningTypeQuote { - order.JxIncome = afsOrder.AfsTotalShopMoney - order.EarningPrice - order.DesiredFee + (afsOrder.ShopPrice * int64(order.OrderPayPercentage/100)) + order.JxIncome = afsOrder.AfsTotalShopMoney - order.EarningPrice - order.DesiredFee + (afsOrder.ShopPrice * int64(order.OrderPayPercentage) / int64(100)) } else { order.JxIncome = afsOrder.AfsTotalShopMoney * int64(order.OrderPayPercentage/2) / 100 }