From 0a548b09beca7bcbf51b4447b41cdf8b7d60b1aa 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, 6 Jul 2020 14:43:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=95=86=E5=93=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=94=AE=E5=8D=96?= =?UTF-8?q?=E4=BB=B7=E4=BB=A3=E6=9B=BF=E4=B8=BA0=E7=9A=84=E4=BA=AC?= =?UTF-8?q?=E8=A5=BF=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,