This commit is contained in:
邹宗楠
2023-07-19 18:11:31 +08:00
parent 039f1b5bab
commit 76d1ce7aea
3 changed files with 177 additions and 22 deletions

View File

@@ -279,11 +279,24 @@ func Init() {
// syncStoreSkuTiktok()
// }, []string{"13:00:00"})
//}
// 抖音更新门店商品 ,接口收费暂不使用
// 淘鲜达更新门店商品 ,接口收费暂不使用
if beego.BConfig.RunMode != "jxgy" {
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
syncStoreSkuTao()
}, []string{"13:00:00"})
}, []string{
//"13:00:00",
//"15:00:00",
//"17:00:00",
"18:35:00",
//"20:40:00",
//"21:40:00",
//"23:40:00",
//"01:40:00",
"03:40:00",
//"05:40:00",
//"07:40:00",
"08:40:00",
})
}
// 刷新抖音门店token
@@ -640,6 +653,163 @@ func syncStoreSkuTiktok() {
tasksch.HandleTask(task, nil, true).Run()
}
var beijin = []int{
669158,
668691,
668673,
668282,
667447,
667354,
667321,
667319,
667316,
667269,
667268,
667267,
667260,
667132,
667094,
667030,
666965,
666714,
666708,
666705,
103437,
103349,
103123,
103121,
103106,
103038,
103028,
103019,
102831,
102751,
102683,
102542,
102514,
102382,
102182,
102178,
102173,
102098,
102094,
102080,
102072,
102069,
101870,
101869,
101868,
101867,
101866,
101865,
100956,
100930,
100871,
100786,
100746,
100744,
100726,
100705,
100400,
100111,
100108,
100106,
100104,
100103,
100102,
100100,
100097,
100096,
100095,
100093,
100092,
100089,
100087,
100086,
100085,
100082,
100079,
100078,
669053, // 上海
668985,
668960,
668959,
668953,
668949,
668932,
668931,
668917,
668909,
668908,
668906,
668905,
668901,
668894,
668886,
668884,
668880,
668878,
668757,
668751,
668701,
668622,
668618,
668592,
668583,
668569,
668567,
668506,
668498,
668476,
668462,
668276,
668180,
667320,
667237,
667231,
667068,
667036,
666678,
103191,
103074,
103065,
103051,
103050,
103037,
103029,
103018,
103002,
102999,
102969,
102966,
102951,
102946,
102939,
102938,
102934,
102933,
102930,
102924,
102920,
102908,
102903,
102561,
102293,
100946,
100945,
100943,
100935,
100905,
100720,
100325,
100324,
100309,
100299,
100296,
100292,
100290,
}
// syncStoreSkuTao 同步商品到淘鲜达
func syncStoreSkuTao() {
syncFlag := 0
@@ -651,14 +821,13 @@ func syncStoreSkuTao() {
switch step {
case 0:
if beego.BConfig.RunMode != "jxgy" {
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, nil, false, nil, nil, syncFlag, true, true)
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin, false, nil, nil, syncFlag, true, true)
errList.AddErr(err)
}
case 1:
errList.AddErr(err)
SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID)
}
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘宝同步商品", utils.Format4Output(errList, false))
err = errList.GetErrListAsOne()
return retVal, err
}, []int{0, 1})