UploadImg4Vendors中防止添加DataResource时,加入hashCode为空的
This commit is contained in:
@@ -389,7 +389,7 @@ func UploadImg4Vendors(ctx *jxcontext.Context, isAsync, isContinueWhenError bool
|
|||||||
GROUP BY 1
|
GROUP BY 1
|
||||||
) t3 ON t3.id = t1.id
|
) t3 ON t3.id = t1.id
|
||||||
LEFT JOIN data_resource t2 ON ((t2.main_url <> '' AND t2.main_url = t1.img) OR (t2.hash_code <> '' AND t2.hash_code = t1.img_hash_code))
|
LEFT JOIN data_resource t2 ON ((t2.main_url <> '' AND t2.main_url = t1.img) OR (t2.hash_code <> '' AND t2.hash_code = t1.img_hash_code))
|
||||||
WHERE t1.img <> '' AND t2.id IS NULL;
|
WHERE t1.img_hash_code <> '' AND t1.img <> '' AND t2.id IS NULL;
|
||||||
`)
|
`)
|
||||||
case 2: // 统一SkuName中同hashCode,不同图片地址至同一地址
|
case 2: // 统一SkuName中同hashCode,不同图片地址至同一地址
|
||||||
_, err = dao.ExecuteSQL(db, `
|
_, err = dao.ExecuteSQL(db, `
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ func UploadImage2Vendors(ctx *jxcontext.Context, parentTask tasksch.ITask, dataR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
uploadTask := tasksch.NewParallelTask(fmt.Sprintf("上传图片至平台2:%s,%s", dataRes.Name, dataRes.MainURL),
|
uploadTask := tasksch.NewParallelTask(fmt.Sprintf("上传图片至平台2:%s,%s", dataRes.Name, imgName),
|
||||||
tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
vendorID := batchItemList[0].(int)
|
vendorID := batchItemList[0].(int)
|
||||||
|
|||||||
Reference in New Issue
Block a user