diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 7c3f9f1f1..044ef4745 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -104,6 +104,7 @@ func (c *OrderManager) GetOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID str if vendorID == model.VendorIDJD { fullSkuNameSQL = "CONCAT(t1.sku_name, IF(t3.is_spu = 1 AND LOCATE(';', t1.sku_name) = 0, CONCAT('[约', t2.spec_quality, t2.spec_unit, '/', t3.unit, ']'), ''))" } + // IF(t1.shop_price = 0, t1.sale_price, t1.shop_price) shop_price, sql := fmt.Sprintf(` SELECT t1.id, @@ -114,8 +115,8 @@ func (c *OrderManager) GetOrderSkuInfo(ctx *jxcontext.Context, vendorOrderID str t1.sku_id, t1.jx_sku_id, t1.sku_name, - IF(t1.shop_price = 0, t1.sale_price, t1.shop_price) shop_price, t1.sale_price, + t1.shop_price, CAST(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t5.pay_percentage > 0, t5.pay_percentage, ?) / 100) AS SIGNED) earning_price, t1.weight, t1.sku_type,