1
This commit is contained in:
@@ -532,18 +532,11 @@ func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *stri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if taoImgs.Img == "" && taoImgs.Img2 == "" && taoImgs.Img3 == "" && taoImgs.Img4 == "" && taoImgs.Img5 == "" && taoImgs.DescImg == "" {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
taoImgs.SkuID = skuId
|
|
||||||
taoImgs.VendorID = vendorId
|
|
||||||
if isCreate {
|
if isCreate {
|
||||||
|
taoImgs.SkuID = skuId
|
||||||
|
taoImgs.VendorID = vendorId
|
||||||
dao.CreateEntity(dao.GetDB(), taoImgs)
|
dao.CreateEntity(dao.GetDB(), taoImgs)
|
||||||
} else {
|
|
||||||
dao.UpdateEntity(dao.GetDB(), taoImgs, "Img", "Img2", "Img3", "Img4", "Img5", "DescImg")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 商品图片最多五张
|
// 商品图片最多五张
|
||||||
if len(result) > 5 {
|
if len(result) > 5 {
|
||||||
return utils.String2Pointer(strings.Join(result[1:], ","))
|
return utils.String2Pointer(strings.Join(result[1:], ","))
|
||||||
|
|||||||
Reference in New Issue
Block a user