From 377c64707ae7465307ad2232b462c49eff2e821e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 1 Apr 2020 09:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8=E4=BA=AC?= =?UTF-8?q?=E4=B8=9C=E7=9A=84=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 4 ++-- business/jxutils/datares/datares.go | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 6ac0464a9..7bde60cb6 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -4147,8 +4147,8 @@ func CreateSkusAndFocusFromYb(ctx *jxcontext.Context, isAsync, isContinueWhenErr skuNameExt.Skus[0].Weight = int(utils.Str2Int64(utils.Float64ToStr(float64(productInfo.Weight)))) skuNameExt.Skus[0].Status = model.SkuStatusNormal } - if len(v.PictureList) > 0 { - skuNameExt.Img = v.PictureList[0] + if len(productInfo.ImgList) > 0 { + skuNameExt.Img = productInfo.ImgList[0] } outSkuNameExt, err := AddSkuName(ctx, skuNameExt, ctx.GetUserName()) if err != nil { diff --git a/business/jxutils/datares/datares.go b/business/jxutils/datares/datares.go index b796deb06..267ad6da7 100644 --- a/business/jxutils/datares/datares.go +++ b/business/jxutils/datares/datares.go @@ -80,14 +80,10 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h if err != nil { return nil, err } - fmt.Println("test11111111111111111") if imgType == model.ImgTypeMain { - fmt.Println("test222222222222222222222") - fmt.Println(img.Bounds().Dx(), img.Bounds().Dy()) if img.Bounds().Dx() != MainImgWidth || img.Bounds().Dy() != MainImgHeight { return nil, fmt.Errorf("图片大小:%dx%d非法,要求必须:%dx%d", img.Bounds().Dx(), img.Bounds().Dy(), MainImgWidth, MainImgHeight) } - fmt.Println("test33333333333333333333333333") } dataRes = &model.DataResource{ Name: name,