Cookie验证修改
This commit is contained in:
@@ -130,13 +130,11 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
|||||||
case 3:
|
case 3:
|
||||||
resultMap, err := api.EbaiAPI.GetStoreOrderInfo(ebaiOrderID)
|
resultMap, err := api.EbaiAPI.GetStoreOrderInfo(ebaiOrderID)
|
||||||
if len(resultMap) < 1 && err != nil {
|
if len(resultMap) < 1 && err != nil {
|
||||||
if errExt, ok := err.(*utils.ErrorWithCode); ok {
|
if strings.Contains(err.Error(), ebaiErr) {
|
||||||
if strings.Contains(errExt.ErrMsg(), ebaiErr) {
|
//Cookie无效了
|
||||||
//Cookie无效了
|
errMsg += " 饿百Cookie无效了!"
|
||||||
errMsg += " 饿百Cookie无效了!"
|
cc.VendorID = v
|
||||||
cc.VendorID = v
|
cc.Status = "无效"
|
||||||
cc.Status = "无效"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Cookie有效
|
//Cookie有效
|
||||||
@@ -146,12 +144,10 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
|||||||
case 1:
|
case 1:
|
||||||
err := api.MtwmAPI.OrderModityTips(mtOrderID, mtStoreID, 0.2)
|
err := api.MtwmAPI.OrderModityTips(mtOrderID, mtStoreID, 0.2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errExt, ok := err.(*utils.ErrorWithCode); ok {
|
if strings.Contains(err.Error(), mtErr) {
|
||||||
if strings.Contains(errExt.ErrMsg(), mtErr) {
|
errMsg += " 美团Cookie无效了!"
|
||||||
errMsg += " 美团Cookie无效了!"
|
cc.VendorID = v
|
||||||
cc.VendorID = v
|
cc.Status = "无效"
|
||||||
cc.Status = "无效"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Cookie有效
|
//Cookie有效
|
||||||
@@ -162,13 +158,11 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
|||||||
for _, vv := range apimanager.CurAPIManager.GetAppOrgCodeList(v) {
|
for _, vv := range apimanager.CurAPIManager.GetAppOrgCodeList(v) {
|
||||||
result, err := jd.GetAPI(vv).GetJdUpcCodeByName("", jdUpcCode, 1, 5)
|
result, err := jd.GetAPI(vv).GetJdUpcCodeByName("", jdUpcCode, 1, 5)
|
||||||
if len(result) < 1 && err != nil {
|
if len(result) < 1 && err != nil {
|
||||||
if errExt, ok := err.(*utils.ErrorWithCode); ok {
|
if strings.Contains(err.Error(), jdErr) {
|
||||||
if strings.Contains(errExt.ErrMsg(), jdErr) {
|
//Cookie无效
|
||||||
//Cookie无效
|
errMsg += " 京东Cookie无效了!"
|
||||||
errMsg += " 京东Cookie无效了!"
|
cc.VendorID = v
|
||||||
cc.VendorID = v
|
cc.Status = "无效"
|
||||||
cc.Status = "无效"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Cookie有效
|
//Cookie有效
|
||||||
|
|||||||
Reference in New Issue
Block a user