- optimize UploadWeimobImg4SkuName

This commit is contained in:
gazebo
2019-02-13 11:21:26 +08:00
parent a590c61fde
commit aa9c83ec94
2 changed files with 4 additions and 2 deletions

View File

@@ -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