This commit is contained in:
苏尹岚
2021-03-18 09:55:11 +08:00
parent 79291abfbc
commit a17211c679

View File

@@ -1656,14 +1656,28 @@ func GetJdUpcCodeByName(ctx *jxcontext.Context, name, upcCode string) (productIn
}
} else {
productInfos, err = GetJdUpcCodeByCode(ctx, upcCode)
if len(productInfos) == 0 {
if result, err := api.MtwmAPI.GetStandardProductListWithCond(upcCode); err == nil && result != nil {
productInfo := &jdapi.ProductInfo{
OriginalName: result.Name,
OriginalSpec: result.Spec,
}
_, name, _, specUnit, unit, specQuality := jxutils.SplitSkuName(productInfo.OriginalName)
productInfo.Name = name
productInfo.SpecUnit = specUnit
productInfo.Unit = unit
productInfo.SpecQuality = specQuality
productInfo.ImgList = strings.Split(result.Pic, ",")
productInfo.Weight = float32(result.Weight)
productInfo.Price = result.AvgPrice
productInfo.BrandName = result.BrandNamePath
productInfos = append(productInfos, productInfo)
}
}
}
return productInfos, err
}
func GetMTUpcCodeByCode(upcCode string) {
}
func UpdateSkuNamesExPrefix(ctx *jxcontext.Context, nameIDs []int, imgWaterMark string, vendorID int, exPrefix, fromTime, toTime string, isAsync, isContinueWhenError bool) (hint string, err error) {
var (
fromTimeP time.Time