cookie验证增加两个
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -162,6 +164,16 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
result, err := api.Ebai2API.GetEbaiDepotSku(ebaiapi.EbaiWholeCountryStore, "190700570")
|
||||
if err != nil || len(result) < 1 {
|
||||
errMsg += fmt.Sprintf(" 饿百账号:[饿百后台饿鲜达全国账号]的Cookie无效了!", vv)
|
||||
flag = true
|
||||
}
|
||||
result2, err2 := api.EbaiAPI.GetExianDaSkuDepot("190600741")
|
||||
if err2 != nil || result2 == nil {
|
||||
errMsg += fmt.Sprintf(" 饿百账号:[饿鲜达供应链系统]的Cookie无效了!", vv)
|
||||
flag = true
|
||||
}
|
||||
case model.VendorIDMTWM:
|
||||
_, err := api.MtwmAPI.PackagePriceGet(mtStoreID)
|
||||
if err != nil {
|
||||
@@ -189,24 +201,6 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
||||
ccList = append(ccList, cc)
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// cc := &CheckCookie{}
|
||||
// var flag = false
|
||||
// if v == model.VendorIDMTPS {
|
||||
// err := api.MtpsAPI.GetAccountDetail()
|
||||
// if err != nil && strings.Contains(err.Error(), mtpsErr) {
|
||||
// errMsg += " 美团配送账号的Cookie无效了!"
|
||||
// flag = true
|
||||
// }
|
||||
// }
|
||||
// cc.VendorID = v
|
||||
// if flag {
|
||||
// cc.Status = "无效"
|
||||
// } else {
|
||||
// cc.Status = "有效"
|
||||
// }
|
||||
// ccList = append(ccList, cc)
|
||||
// }
|
||||
}
|
||||
if isAuto && errMsg != "" {
|
||||
globals.SugarLogger.Warnf("GetCheckVendorCookie:[%v]", errMsg)
|
||||
|
||||
Reference in New Issue
Block a user