手动拉取京东商城订单

This commit is contained in:
苏尹岚
2020-06-17 16:10:47 +08:00
parent 952e18fc52
commit e1e471d334
4 changed files with 34 additions and 1 deletions

View File

@@ -210,6 +210,15 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
errMsg += fmt.Sprintf(" 京东page账号:的Cookie无效了", vv)
flag = true
}
case model.VendorIDJDShop:
_, err := api.JdShopAPI.OrderDetail("124350112427")
if err != nil {
if strings.Contains(err.Error(), "登录") {
errMsg += fmt.Sprintf("京东商城:[%v]的Cookie无效了", vv)
flag = true
}
globals.SugarLogger.Debugf("cookieCheck", err)
}
}
cc.VendorID = v
cc.VendorOrgCode = vv

View File

@@ -205,7 +205,7 @@ func Init() {
cms.AutoFocusStoreSkusForTopSkus(jxcontext.AdminCtx, true, true)
}, createStorePriceTimeList)
ScheduleTimerFunc("GetCheckVendorCookie", func() {
event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM, model.VendorIDMTPS}, true)
event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM, model.VendorIDMTPS, model.VendorIDJDShop}, true)
}, checkCookieList)
ScheduleTimerFunc("SendSeckillSkusCountMsg", func() {
cms.SendSeckillSkusCountMsg(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM}, false, true)