创建标品优化,同步物料测试
This commit is contained in:
@@ -2145,6 +2145,11 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
skuName.CategoryID = categoryID
|
||||
}
|
||||
skuName.Skus[0].Status = model.SkuStatusNormal
|
||||
if resBinary, _, err := jxutils.DownloadFileByURL(skuName.Img); err == nil {
|
||||
if model.ValidMimeTypes[http.DetectContentType(resBinary)] == 0 {
|
||||
skuName.Img = model.NOSkuNameImg
|
||||
}
|
||||
}
|
||||
_, err = AddSkuName(ctx, skuName, ctx.GetUserName())
|
||||
if err != nil {
|
||||
retVal = []*CreateUpcSkuByExcelErr{buildCreateUpcSkuByExcelErr(v, err.Error())}
|
||||
|
||||
Reference in New Issue
Block a user