From 67f1c3bf770b39e56c198da2ceb39152c4f63ce0 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 27 Sep 2019 09:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUploadImg4Vendors=E4=B8=ADImg?= =?UTF-8?q?HashCode=E5=8F=AF=E8=83=BD=E9=87=8D=E5=A4=8D=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/initdata/initdata.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/business/jxstore/initdata/initdata.go b/business/jxstore/initdata/initdata.go index ae9977988..c31c387bc 100644 --- a/business/jxstore/initdata/initdata.go +++ b/business/jxstore/initdata/initdata.go @@ -324,6 +324,12 @@ func UploadImg4Vendors(ctx *jxcontext.Context, isAsync, isContinueWhenError bool CONCAT(t1.name, '_desc'), desc_img main_url, t1.desc_img_ebai ebai_url, IF(INSTR(t1.desc_img, "image.jxc4.com") > 0, t1.desc_img, '') qiniu_url, 2 FROM sku_name t1 + JOIN ( + SELECT img_hash_code, MAX(id) id, COUNT(*) ct + FROM sku_name + WHERE img_hash_code <> '' AND desc_img <> '' + GROUP BY 1 + ) t3 ON t3.id = t1.id LEFT JOIN data_resource t2 ON (t2.main_url <> '' AND t2.main_url = t1.desc_img) WHERE t1.desc_img <> '' AND t1.img_hash_code <> '' AND t2.id IS NULL; `)