- optimize UploadWeimobImg4SkuName
This commit is contained in:
@@ -523,7 +523,9 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
|
||||
if err == nil {
|
||||
dao.Commit(db)
|
||||
_, err = CurVendorSync.SyncSku(ctx, db, nameID, -1, false, false, userName)
|
||||
initdata.UploadWeimobImg4SkuName(ctx, []int{nameID}, true, true)
|
||||
if valid["img"] != "" {
|
||||
initdata.UploadWeimobImg4SkuName(ctx, []int{nameID}, true, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ func UploadWeimobImg4SkuName(ctx *jxcontext.Context, nameIDs []int, isAsync, isC
|
||||
skuName := batchItemList[0].(*model.SkuName)
|
||||
if skuName.Img != "" && skuName.ImgWeimob == "" {
|
||||
if skuName.ImgWeimob, err = api.WeimobAPI.UploadImgByURL(skuName.Img, ""); err == nil {
|
||||
_, err = dao.UpdateEntity(db, skuName)
|
||||
_, err = dao.UpdateEntity(db, skuName, "ImgWeimob")
|
||||
}
|
||||
}
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user