aa
This commit is contained in:
@@ -1660,19 +1660,19 @@ func GetJdUpcCodeByName(ctx *jxcontext.Context, name, upcCode string) (productIn
|
||||
productInfos = append(productInfos, v.(*jdapi.ProductInfo))
|
||||
}
|
||||
} else {
|
||||
productInfo, err = apijd.GetJdUpcCodeByName("", upcCode, 1, 30)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, v := range productInfo {
|
||||
_, name, _, specUnit, unit, specQuality := jxutils.SplitSkuName(v.OriginalName)
|
||||
v.Name = name
|
||||
v.SpecQuality = specQuality
|
||||
v.SpecUnit = specUnit
|
||||
v.Unit = unit
|
||||
}
|
||||
//productInfos, err = GetJdUpcCodeByCode(ctx, upcCode)
|
||||
if len(productInfo) == 0 {
|
||||
//productInfo, err = apijd.GetJdUpcCodeByName("", upcCode, 1, 30)
|
||||
//if err != nil {
|
||||
// return nil, err
|
||||
//}
|
||||
//for _, v := range productInfo {
|
||||
// _, name, _, specUnit, unit, specQuality := jxutils.SplitSkuName(v.OriginalName)
|
||||
// v.Name = name
|
||||
// v.SpecQuality = specQuality
|
||||
// v.SpecUnit = specUnit
|
||||
// v.Unit = unit
|
||||
//}
|
||||
productInfos, err = GetJdUpcCodeByCode(ctx, upcCode)
|
||||
if len(productInfos) == 0 {
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "mtwmCookieStr", model.ConfigTypeCookie, ""); err == nil {
|
||||
api.MtwmAPI.SetCookieWithStr(configs[0].Value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user