From 14c9c57ced81761c1aec7fd15e55be1b04bcf5f8 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:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/datares/datares.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/business/jxutils/datares/datares.go b/business/jxutils/datares/datares.go index b04e0fdaf..92b176b9d 100644 --- a/business/jxutils/datares/datares.go +++ b/business/jxutils/datares/datares.go @@ -77,6 +77,9 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h return nil, fmt.Errorf("MIME type:%s非法,当前只支持:%s", mimeType, model.GetValidMimeTypeDesc()) } img, _, err := Binary2Image(resBinary, mimeType) + fmt.Println("test11111111111111111111111111111111") + img.Bounds() + fmt.Println("test2122222222222222222222222222222222") if err != nil { return nil, err } @@ -85,7 +88,6 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h return nil, fmt.Errorf("图片大小:%dx%d非法,要求必须:%dx%d", img.Bounds().Dx(), img.Bounds().Dy(), MainImgWidth, MainImgHeight) } } - fmt.Println("test11111111111111111111111111111111111") dataRes = &model.DataResource{ Name: name, HashCode: hashCode, @@ -101,11 +103,9 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h case model.VendorIDEBAI: dataRes.EbaiURL = resourceURL } - fmt.Println("test222222222222222222222222222222222222222") dao.WrapAddIDCULEntity(dataRes, ctx.GetUserName()) if err = dao.CreateEntity(dao.GetDB(), dataRes); err != nil { if dao.IsDuplicateError(err) { - fmt.Println("test4444444444444444444444444444444444") dataRes, err = dao.GetDataResource(dao.GetDB(), dataRes.HashCode, dataRes.MainURL) } else { dataRes = nil @@ -114,7 +114,6 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h } if imgType > 0 { if globals.EnableStoreWrite { - fmt.Println("test333333333333333333333333333333333") // 忽略上传错误 UploadImage2Vendors(ctx, nil, dataRes, resBinary, isAsyncUpload2Vendor) }