aa
This commit is contained in:
@@ -1656,14 +1656,28 @@ func GetJdUpcCodeByName(ctx *jxcontext.Context, name, upcCode string) (productIn
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
productInfos, err = GetJdUpcCodeByCode(ctx, upcCode)
|
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
|
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) {
|
func UpdateSkuNamesExPrefix(ctx *jxcontext.Context, nameIDs []int, imgWaterMark string, vendorID int, exPrefix, fromTime, toTime string, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
var (
|
var (
|
||||||
fromTimeP time.Time
|
fromTimeP time.Time
|
||||||
|
|||||||
Reference in New Issue
Block a user