From 31cc59845515d5312d3f8713f32ad9b55cf658bf 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, 29 Jun 2020 09:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=9B=A2=E6=B0=B4=E6=9E=9C=E5=88=86?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/mtwm/store_sku2.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/business/partner/purchase/mtwm/store_sku2.go b/business/partner/purchase/mtwm/store_sku2.go index 432f3611f..86475436b 100644 --- a/business/partner/purchase/mtwm/store_sku2.go +++ b/business/partner/purchase/mtwm/store_sku2.go @@ -5,8 +5,6 @@ import ( "regexp" "strings" - "github.com/astaxie/beego" - "git.rosy.net.cn/baseapi/platformapi/mtwmapi" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils" @@ -267,8 +265,9 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI foodData["unit"] = storeSku.Unit foodData["box_num"] = 1 foodData["box_price"] = jxutils.IntPrice2Standard(storeSku.BoxFee) - if beego.BConfig.RunMode == "jxgy" { - foodData["common_attr_value"] = switchAttr(storeSku.VendorVendorCatID) + attr := switchAttr(storeSku.VendorVendorCatID) + if attr != "" { + foodData["common_attr_value"] = attr } catCode := tryCatName2Code(storeSku.VendorCatID) if catCode != "" { @@ -387,6 +386,8 @@ func switchAttr(vendorCatID int64) (attrs string) { return mtwmapi.MtwmSkuAttr200002670 case 200002680: return mtwmapi.MtwmSkuAttr200002680 + default: + return "" } return attrs }