1
This commit is contained in:
@@ -1033,12 +1033,14 @@ func (a *API) GetJdUpcCodeByName(name, upcCode string, pageNo, pageSize int) (pr
|
||||
for _, vv := range ImgStr {
|
||||
ImgList = append(ImgList, "http://img20.360buyimg.com/vc/"+vv.(string))
|
||||
}
|
||||
category, _ := utils.TryInterface2Int64(v.(map[string]interface{})["thirdCategoryId"])
|
||||
productInfo := &ProductInfo{
|
||||
OriginalName: v.(map[string]interface{})["name"].(string),
|
||||
UpcCode: v.(map[string]interface{})["upcCode"].(string),
|
||||
Weight: float32(utils.Interface2Float64WithDefault(v.(map[string]interface{})["weight"], 0) * 1000),
|
||||
ImgList: ImgList,
|
||||
BrandName: v.(map[string]interface{})["brandName"].(string),
|
||||
Categories: []string{utils.Int64ToStr(category)},
|
||||
}
|
||||
productInfos = append(productInfos, productInfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user