From 28a1907bf75d77724025537d81627f01bba62eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 10 Apr 2020 15:02:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AEexcel=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=A0=87=E5=93=81=E8=A7=A3=E5=86=B3=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sku.go | 4 ++++ business/jxutils/jxutils_cms.go | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 926a16f77..16250545e 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -1899,6 +1899,10 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri skuName.Price = v.Price * 100 } if v.Unit != "" { + if v.Unit == model.UnitNames[0] { + createUpcSkuByExcelErrList = append(createUpcSkuByExcelErrList, buildCreateUpcSkuByExcelErr(v, "标品的单位不能为份!")) + continue + } skuName.Unit = v.Unit } else { createUpcSkuByExcelErrList = append(createUpcSkuByExcelErrList, buildCreateUpcSkuByExcelErr(v, "未查询到商品单位,请补充商品单位!")) diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index c8ea98268..1f4b50e60 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -464,7 +464,6 @@ func (s SkuList) Swap(i, j int) { func DownloadFileByURL(fileURL string) (bodyData []byte, fileMD5 string, err error) { response, err := http.Get(fileURL) - globals.SugarLogger.Debugf("TryRegisterDataResource2, response:%v", utils.Format4Output(response, false)) if err == nil { defer response.Body.Close() if response.StatusCode == http.StatusOK {