尝试从数据库中取cookie
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
"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"
|
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||||
|
|
||||||
@@ -106,6 +107,8 @@ var (
|
|||||||
importantTaskMap = &sync.Map{}
|
importantTaskMap = &sync.Map{}
|
||||||
|
|
||||||
cancelPayTimeOutOrderList = localjx.GetHalfHoursList()
|
cancelPayTimeOutOrderList = localjx.GetHalfHoursList()
|
||||||
|
|
||||||
|
ebaiStorePageCookieExdTOKEN string
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetImportantTaskID(taskName string) string {
|
func GetImportantTaskID(taskName string) string {
|
||||||
@@ -200,6 +203,11 @@ func Init() {
|
|||||||
"04:05:06",
|
"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() {
|
func syncStoreSku() {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ ebaiStorePageCookieWMUSS = "B0AAFQCAAAGbhkuMCsvcyYBDkkyAxBGIBlgXAQYVwc7VwYZFkx2H
|
|||||||
ebaiStorePageCookieWMSTOKEN = "gAALgNAAAGfBI5YEBHSQd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cd1c6141c127d41d12be02a04e58e0a2529c8ac5aad36be932f6e341f8be9a0e56b833c924cc95dd2ced76b31ea6fcbc7341cc9c03e3e2f470441192d51fc8bd81b6c5d24a867630a65400e688ff8f4453895ca9a18d7e91726941b28631cf2ab81797279967fcb03ae57e5bc33bf91e4495727569681c724597fb2c639a85c145723c12de262224e2536ad2c6f94bcae0c10c8f30728a6ea3ab6000940fffaa66271f17ecbae139f0b4fdfff791b7986a88b8f252827e799a2e1862ec522fd4c51c70ae9d17c69da93f1c12715bf9e0b35eccf39ae605d424c83319acaa7acbe191a8ee410afd1d02d1e02834ce6cbd2503b89f30efc1f7635a1e71e10e3370fc79b33e6352290e87f82b1cb8ac91195a09ff28e4418923e89993eb10d01e39fb621d517a14081611b25e83da9ec860fbacd2cb13562271585b53a0a7178e8f614bd62ffa442c78a10f008b3721675cad803024fad0c13aeecd64d1360bab4127883d2e7198201"
|
# ebaiStorePageCookieExdTOKEN = "PBE_2.0_5cd1c6141c127d41d12be02a04e58e0a2529c8ac5aad36be932f6e341f8be9a0e56b833c924cc95dd2ced76b31ea6fcbc7341cc9c03e3e2f470441192d51fc8bd81b6c5d24a867630a65400e688ff8f4453895ca9a18d7e91726941b28631cf2ab81797279967fcb03ae57e5bc33bf91e4495727569681c724597fb2c639a85c145723c12de262224e2536ad2c6f94bcae0c10c8f30728a6ea3ab6000940fffaa66271f17ecbae139f0b4fdfff791b7986a88b8f252827e799a2e1862ec522fd4c51c70ae9d17c69da93f1c12715bf9e0b35eccf39ae605d424c83319acaa7acbe191a8ee410afd1d02d1e02834ce6cbd2503b89f30efc1f7635a1e71e10e3370fc79b33e6352290e87f82b1cb8ac91195a09ff28e4418923e89993eb10d01e39fb621d517a14081611b25e83da9ec860fbacd2cb13562271585b53a0a7178e8f614bd62ffa442c78a10f008b3721675cad803024fad0c13aeecd64d1360bab4127883d2e7198201"
|
||||||
mtpsStoreToken = "M0p9VatZSeSHfrosD5IViAVl73IcA8mlcuHIV5sG6Zpv83a7JE0wY3t26aEhrrs_MR5gtLSFF1UIkt8HAjaXow"
|
mtpsStoreToken = "M0p9VatZSeSHfrosD5IViAVl73IcA8mlcuHIV5sG6Zpv83a7JE0wY3t26aEhrrs_MR5gtLSFF1UIkt8HAjaXow"
|
||||||
|
|
||||||
weimobAppID = "319F5E7FB6784DFCA3684C9333EB7744"
|
weimobAppID = "319F5E7FB6784DFCA3684C9333EB7744"
|
||||||
|
|||||||
@@ -129,19 +129,19 @@ func Init() {
|
|||||||
EbaiAPI = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret"))
|
EbaiAPI = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret"))
|
||||||
ebaiStorePageCookieWMUSS := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS", "")
|
ebaiStorePageCookieWMUSS := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS", "")
|
||||||
ebaiStorePageCookieWMSTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN", "")
|
ebaiStorePageCookieWMSTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN", "")
|
||||||
ebaiStorePageCookieExdTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieExdTOKEN", "")
|
// ebaiStorePageCookieExdTOKEN := beego.AppConfig.DefaultString("ebaiStorePageCookieExdTOKEN", "")
|
||||||
if ebaiStorePageCookieWMUSS != "" && ebaiStorePageCookieWMSTOKEN != "" && ebaiStorePageCookieExdTOKEN != "" {
|
if ebaiStorePageCookieWMUSS != "" && ebaiStorePageCookieWMSTOKEN != "" { //&& ebaiStorePageCookieExdTOKEN != "" {
|
||||||
EbaiAPI.SetCookie("WMUSS", ebaiStorePageCookieWMUSS)
|
EbaiAPI.SetCookie("WMUSS", ebaiStorePageCookieWMUSS)
|
||||||
EbaiAPI.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN)
|
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"))
|
Ebai2API = ebaiapi.New(beego.AppConfig.String("ebaiSource"), beego.AppConfig.String("ebaiSecret"))
|
||||||
ebaiStorePageCookieWMUSS2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS2", "")
|
ebaiStorePageCookieWMUSS2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMUSS2", "")
|
||||||
ebaiStorePageCookieWMSTOKEN2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN2", "")
|
ebaiStorePageCookieWMSTOKEN2 := beego.AppConfig.DefaultString("ebaiStorePageCookieWMSTOKEN2", "")
|
||||||
if ebaiStorePageCookieWMUSS2 != "" && ebaiStorePageCookieWMSTOKEN2 != "" && ebaiStorePageCookieExdTOKEN != "" {
|
if ebaiStorePageCookieWMUSS2 != "" && ebaiStorePageCookieWMSTOKEN2 != "" { //&& ebaiStorePageCookieExdTOKEN != "" {
|
||||||
Ebai2API.SetCookie("WMUSS", ebaiStorePageCookieWMUSS2)
|
Ebai2API.SetCookie("WMUSS", ebaiStorePageCookieWMUSS2)
|
||||||
Ebai2API.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN2)
|
Ebai2API.SetCookie("WMSTOKEN", ebaiStorePageCookieWMSTOKEN2)
|
||||||
Ebai2API.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN)
|
// Ebai2API.SetCookie("PASSPORT_DELIMONT_TOKEN", ebaiStorePageCookieExdTOKEN)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
EbaiAPI = nil
|
EbaiAPI = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user