aa
This commit is contained in:
@@ -1657,6 +1657,9 @@ func GetJdUpcCodeByName(ctx *jxcontext.Context, name, upcCode string) (productIn
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
if result, err := api.MtwmAPI.GetStandardProductListWithCond(upcCode); err == nil && result != nil {
|
||||
productInfo := &jdapi.ProductInfo{
|
||||
OriginalName: result.Name,
|
||||
@@ -2344,6 +2347,9 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
}
|
||||
skuName.Skus[0].Status = model.SkuStatusNormal
|
||||
if skuName.Img == model.NOSkuNameImg {
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "mtwmCookieStr", model.ConfigTypeCookie, ""); err == nil {
|
||||
api.MtwmAPI.SetCookieWithStr(configs[0].Value)
|
||||
}
|
||||
result, _ := api.MtwmAPI.GetStandardProductListWithCond(*skuName.Upc)
|
||||
if result != nil {
|
||||
imgs := strings.Split(result.Pic, ",")
|
||||
@@ -2376,6 +2382,9 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
skuName.Img4 = imgs[3]
|
||||
skuName.Img5 = imgs[4]
|
||||
}
|
||||
} else {
|
||||
retVal = []*CreateUpcSkuByExcelErr{buildCreateUpcSkuByExcelErr(v, "美团cookie过期了吧")}
|
||||
return retVal, err
|
||||
}
|
||||
}
|
||||
//需要把图片传到七牛云上, 很难受
|
||||
|
||||
@@ -375,9 +375,7 @@ func GetUserStoresResultMap(userID string) (resultMap map[int]int, err error) {
|
||||
}
|
||||
if stores, err := dao.GetStoreList(db, storeIDs, cityCodes, nil, brandIDs, nil, ""); len(stores) > 0 && err == nil {
|
||||
for _, v := range stores {
|
||||
if _, ok := resultMap[v.ID]; !ok {
|
||||
resultMap[v.ID] = v.ID
|
||||
}
|
||||
resultMap[v.ID] = v.ID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user