From e1cf673d87136a21ee504b5f5dd2c146748a932e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 2 Mar 2020 14:15:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BB=8E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E4=B8=AD=E5=8F=96cookie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc.go | 8 ++++++++ conf/app.conf | 2 +- globals/api/api.go | 10 +++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 54ded4119..34748517b 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -7,6 +7,7 @@ import ( "time" "git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx" + "git.rosy.net.cn/jx-callback/globals/api" "git.rosy.net.cn/jx-callback/business/jxstore/event" @@ -106,6 +107,8 @@ var ( importantTaskMap = &sync.Map{} cancelPayTimeOutOrderList = localjx.GetHalfHoursList() + + ebaiStorePageCookieExdTOKEN string ) func GetImportantTaskID(taskName string) string { @@ -200,6 +203,11 @@ func Init() { "04:05:06", }) } + if configs, err := dao.QueryConfigs(dao.GetDB(), "ebaiStorePageCookieExdTOKEN", model.ConfigTypeSys, ""); err == nil { + ebaiStorePageCookieExdTOKEN = configs[0].Value + } + api.Ebai2API.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN) + api.EbaiAPI.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN) } func syncStoreSku() { diff --git a/conf/app.conf b/conf/app.conf index 04e48ba7f..a61720e93 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -73,7 +73,7 @@ ebaiStorePageCookieWMUSS = "B0AAFQCAAAGbhkuMCsvcyYBDkkyAxBGIBlgXAQYVwc7VwYZFkx2H ebaiStorePageCookieWMSTOKEN = "gAALgNAAAGfBI5YEBHSQdZY1InIS8CVQU9aBU1f3VLWVQqKHAAAc5LnRLZ1QLLx0S5IuzCSX8ZQ7oUwAAUr-GEm9JpRc9AQAAsLkLHHXzuhh2lZkbyrcAAAWBESKg3ZA" ebaiStorePageCookieWMUSS2 = "A8AAIcCAAADJhpNHQoGGjZaLFRBdnE7Uwp9TBQXH1o9RTBgP30NQiQmEEAwFVplbwc6wAAMXwsa082aRxJfzskPX9THj9RKgJ0TxE1fyYPZRYVH0YSSjFgARt8Shs3bVc3QHV2Eh94B24KO20vSlJEXnELcDxTl9sJ35T2Dvg21A3wCT0NMXaNAcPzKhPamv" ebaiStorePageCookieWMSTOKEN2 = "A4AANwHAAARMA9ZWhh6BzcGYTQZJjVOHGIxPUdPVElXQz8iahGqiIS5gAAsLaD8yOwpYLCVMU2qqCEN8nAyiUQAAUr-GEu-F2xVbAQAAYcnZGrUx2Rf9qJkbRKQAAONp" -ebaiStorePageCookieExdTOKEN = "PBE_2.0_5cd1c6141c127d41d12be02a04e58e0a2529c8ac5aad36be932f6e341f8be9a0e56b833c924cc95dd2ced76b31ea6fcbc7341cc9c03e3e2f470441192d51fc8bd81b6c5d24a867630a65400e688ff8f4453895ca9a18d7e91726941b28631cf2ab81797279967fcb03ae57e5bc33bf91e4495727569681c724597fb2c639a85c145723c12de262224e2536ad2c6f94bcae0c10c8f30728a6ea3ab6000940fffaa66271f17ecbae139f0b4fdfff791b7986a88b8f252827e799a2e1862ec522fd4c51c70ae9d17c69da93f1c12715bf9e0b35eccf39ae605d424c83319acaa7acbe191a8ee410afd1d02d1e02834ce6cbd2503b89f30efc1f7635a1e71e10e3370fc79b33e6352290e87f82b1cb8ac91195a09ff28e4418923e89993eb10d01e39fb621d517a14081611b25e83da9ec860fbacd2cb13562271585b53a0a7178e8f614bd62ffa442c78a10f008b3721675cad803024fad0c13aeecd64d1360bab4127883d2e7198201" +# ebaiStorePageCookieExdTOKEN = "PBE_2.0_5cd1c6141c127d41d12be02a04e58e0a2529c8ac5aad36be932f6e341f8be9a0e56b833c924cc95dd2ced76b31ea6fcbc7341cc9c03e3e2f470441192d51fc8bd81b6c5d24a867630a65400e688ff8f4453895ca9a18d7e91726941b28631cf2ab81797279967fcb03ae57e5bc33bf91e4495727569681c724597fb2c639a85c145723c12de262224e2536ad2c6f94bcae0c10c8f30728a6ea3ab6000940fffaa66271f17ecbae139f0b4fdfff791b7986a88b8f252827e799a2e1862ec522fd4c51c70ae9d17c69da93f1c12715bf9e0b35eccf39ae605d424c83319acaa7acbe191a8ee410afd1d02d1e02834ce6cbd2503b89f30efc1f7635a1e71e10e3370fc79b33e6352290e87f82b1cb8ac91195a09ff28e4418923e89993eb10d01e39fb621d517a14081611b25e83da9ec860fbacd2cb13562271585b53a0a7178e8f614bd62ffa442c78a10f008b3721675cad803024fad0c13aeecd64d1360bab4127883d2e7198201" mtpsStoreToken = "M0p9VatZSeSHfrosD5IViAVl73IcA8mlcuHIV5sG6Zpv83a7JE0wY3t26aEhrrs_MR5gtLSFF1UIkt8HAjaXow" weimobAppID = "319F5E7FB6784DFCA3684C9333EB7744" diff --git a/globals/api/api.go b/globals/api/api.go index 4122f0b8d..25420c685 100644 --- a/globals/api/api.go +++ b/globals/api/api.go @@ -129,19 +129,19 @@ func Init() { EbaiAPI = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret")) ebaiStorePageCookieWMUSS := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS", "") ebaiStorePageCookieWMSTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN", "") - ebaiStorePageCookieExdTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieExdTOKEN", "") - if ebaiStorePageCookieWMUSS != "" && ebaiStorePageCookieWMSTOKEN != "" && ebaiStorePageCookieExdTOKEN != "" { + // ebaiStorePageCookieExdTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieExdTOKEN", "") + if ebaiStorePageCookieWMUSS != "" && ebaiStorePageCookieWMSTOKEN != "" { //&& ebaiStorePageCookieExdTOKEN != "" { EbaiAPI.SetCookie("WMUSS", ebaiStorePageCookieWMUSS) EbaiAPI.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN) - EbaiAPI.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN) + // EbaiAPI.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN) } Ebai2API = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret")) ebaiStorePageCookieWMUSS2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS2", "") ebaiStorePageCookieWMSTOKEN2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN2", "") - if ebaiStorePageCookieWMUSS2 != "" && ebaiStorePageCookieWMSTOKEN2 != "" && ebaiStorePageCookieExdTOKEN != "" { + if ebaiStorePageCookieWMUSS2 != "" && ebaiStorePageCookieWMSTOKEN2 != "" { //&& ebaiStorePageCookieExdTOKEN != "" { Ebai2API.SetCookie("WMUSS", ebaiStorePageCookieWMUSS2) Ebai2API.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN2) - Ebai2API.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN) + // Ebai2API.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN) } } else { EbaiAPI = nil