From 71921160970796117d1e5a6bd65819b805f1a2eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 9 Jun 2020 10:15:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E6=AF=94=E4=BE=8B=E4=BD=8E?= =?UTF-8?q?=E4=BA=8E50=E7=9A=84=E9=97=A8=E5=BA=97=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 7 +++++++ business/partner/purchase/jdshop/store_sku.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index eb46d94c1..700488c08 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -4504,6 +4504,13 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto time.Sleep(time.Second / 5) db := dao.GetDB() for _, storeID := range storeIDs { + stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "") + if len(stores) > 0 { + if stores[0].PayPercentage <= 50 { + globals.SugarLogger.Debugf("doStoreSkuAudit return0 storeID : %v", storeID) + return false, err + } + } for _, skuBindInfo := range skuBindInfos { globals.SugarLogger.Debugf("doStoreSkuAudit storeID: %v , nameID: %v", storeID, skuBindInfo.NameID) storeAudits, err := dao.GetStoreSkuAuditLight(db, []int{storeID}, []int{skuBindInfo.NameID}, model.StoreAuditStatusOnline) diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index 2978c7500..044cb0997 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -662,7 +662,7 @@ func buildCreateWareParam(storeSku *dao.StoreSkuSyncInfo) (createSkuParamWare *j multiPropSku []*jdshopapi.CreateSkuParamAttrs ) valuesSku, maxNo, _ := api.JdShopAPI.FindValuesByAttrId(attrIDs["规格"]) - specQuality := utils.Float64ToStr(float64(v.SpecQuality)) + v.SpecUnit + specQuality := strings.TrimRight(fmt.Sprintf("%.2f", float64(v.SpecQuality)), "0.") + v.SpecUnit for _, v := range valuesSku { if v.Name == specQuality { ggValueID = v.ID