Accept Merge Request #91: (yonghui -> mark)

Merge Request: 推荐分类
Created By: @苏尹岚
Accepted By: @苏尹岚
URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/91
This commit is contained in:
苏尹岚
2019-12-16 18:08:02 +08:00

View File

@@ -1315,15 +1315,11 @@ func GetJdUpcCodeByName(ctx *jxcontext.Context, name, upcCode string) (productIn
if err != nil { if err != nil {
return retVal, err return retVal, err
} }
if len(productInfo) > 0 {
for _, v := range productInfo { for _, v := range productInfo {
productInfo2, _ := api.ShowAPI.GetProductInfoByBarCode(v.UpcCode) _, name, _, specUnit, _, specQuality := jxutils.SplitSkuName(v.OriginalName)
if productInfo2 != nil { v.Name = name
v.Name = productInfo2.Name v.SpecQuality = specQuality
v.SpecQuality = productInfo2.SpecQuality v.SpecUnit = specUnit
v.SpecUnit = productInfo2.SpecUnit
}
}
} }
retVal = productInfo retVal = productInfo
return retVal, err return retVal, err