修复UploadImg4Vendors中ImgHashCode可能重复的bug
This commit is contained in:
@@ -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;
|
||||
`)
|
||||
|
||||
Reference in New Issue
Block a user