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))
|
productInfos = append(productInfos, v.(*jdapi.ProductInfo))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
productInfo, err = apijd.GetJdUpcCodeByName("", upcCode, 1, 30)
|
//productInfo, err = apijd.GetJdUpcCodeByName("", upcCode, 1, 30)
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
return nil, err
|
// return nil, err
|
||||||
}
|
//}
|
||||||
for _, v := range productInfo {
|
//for _, v := range productInfo {
|
||||||
_, name, _, specUnit, unit, specQuality := jxutils.SplitSkuName(v.OriginalName)
|
// _, name, _, specUnit, unit, specQuality := jxutils.SplitSkuName(v.OriginalName)
|
||||||
v.Name = name
|
// v.Name = name
|
||||||
v.SpecQuality = specQuality
|
// v.SpecQuality = specQuality
|
||||||
v.SpecUnit = specUnit
|
// v.SpecUnit = specUnit
|
||||||
v.Unit = unit
|
// v.Unit = unit
|
||||||
}
|
//}
|
||||||
//productInfos, err = GetJdUpcCodeByCode(ctx, upcCode)
|
productInfos, err = GetJdUpcCodeByCode(ctx, upcCode)
|
||||||
if len(productInfo) == 0 {
|
if len(productInfos) == 0 {
|
||||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "mtwmCookieStr", model.ConfigTypeCookie, ""); err == nil {
|
if configs, err := dao.QueryConfigs(dao.GetDB(), "mtwmCookieStr", model.ConfigTypeCookie, ""); err == nil {
|
||||||
api.MtwmAPI.SetCookieWithStr(configs[0].Value)
|
api.MtwmAPI.SetCookieWithStr(configs[0].Value)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user