This commit is contained in:
邹宗楠
2022-12-19 11:14:00 +08:00
parent e10db669dc
commit 57f699d16c
8 changed files with 51 additions and 13 deletions

View File

@@ -249,10 +249,10 @@ func Init() {
cms.RefreshTiktokShopToken(jxcontext.AdminCtx)
}, 60*time.Second, 30*time.Minute)
// 更新门店商品
//ScheduleTimerFuncByInterval(func() {
// syncStoreSkuTiktok()
//}, 60*time.Second, 1*time.Minute)
// 抖音更新门店商品
ScheduleTimerFuncByInterval(func() {
syncStoreSkuTiktok()
}, 60*time.Second, 1*time.Minute)
// 定时任务刷新当前订单的物流信息
ScheduleTimerFunc("RefreshMaterialLogistics", func() {
@@ -574,6 +574,7 @@ func syncStoreSku() {
}
func syncStoreSkuTiktok() {
globals.SugarLogger.Debugf("==========syncStoreSkuTiktok=")
syncFlag := 0 | model.SyncFlagSaleMask
task := tasksch.NewParallelTask("同步京西商品到抖音平台,方案二使用", nil, jxcontext.AdminCtx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
@@ -593,6 +594,7 @@ func syncStoreSkuTiktok() {
errList.AddErr(err)
SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID)
}
globals.SugarLogger.Debugf("===============syncStoreSkuTiktok ,errList %s", utils.Format4Output(errList, false))
err = errList.GetErrListAsOne()
return retVal, err
}, []int{0, 1})