1
This commit is contained in:
@@ -2,7 +2,9 @@ package misc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||||
"git.rosy.net.cn/jx-callback/business/bidding"
|
"git.rosy.net.cn/jx-callback/business/bidding"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -250,9 +252,9 @@ func Init() {
|
|||||||
}, 60*time.Second, 30*time.Minute)
|
}, 60*time.Second, 30*time.Minute)
|
||||||
|
|
||||||
// 抖音更新门店商品
|
// 抖音更新门店商品
|
||||||
//ScheduleTimerFuncByInterval(func() {
|
ScheduleTimerFuncByInterval(func() {
|
||||||
// syncStoreSkuTiktok()
|
syncStoreSkuTiktok()
|
||||||
//}, 60*time.Second, 1*time.Minute)
|
}, 60*time.Second, 2*time.Minute)
|
||||||
|
|
||||||
// 定时任务刷新当前订单的物流信息
|
// 定时任务刷新当前订单的物流信息
|
||||||
ScheduleTimerFunc("RefreshMaterialLogistics", func() {
|
ScheduleTimerFunc("RefreshMaterialLogistics", func() {
|
||||||
@@ -574,7 +576,6 @@ func syncStoreSku() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func syncStoreSkuTiktok() {
|
func syncStoreSkuTiktok() {
|
||||||
globals.SugarLogger.Debugf("==========syncStoreSkuTiktok=")
|
|
||||||
syncFlag := 0 | model.SyncFlagSaleMask
|
syncFlag := 0 | model.SyncFlagSaleMask
|
||||||
task := tasksch.NewParallelTask("同步京西商品到抖音平台,方案二使用", nil, jxcontext.AdminCtx,
|
task := tasksch.NewParallelTask("同步京西商品到抖音平台,方案二使用", nil, jxcontext.AdminCtx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
@@ -586,7 +587,6 @@ func syncStoreSkuTiktok() {
|
|||||||
if beego.BConfig.RunMode != "jxgy" {
|
if beego.BConfig.RunMode != "jxgy" {
|
||||||
errList.AddErr(cms.DeleteSkuNameExPrefixOverdue(db))
|
errList.AddErr(cms.DeleteSkuNameExPrefixOverdue(db))
|
||||||
errList.AddErr(cms.SetMultiStoreSkuSyncModifyStatus(db, partner.GetMultiStoreVendorIDs()))
|
errList.AddErr(cms.SetMultiStoreSkuSyncModifyStatus(db, partner.GetMultiStoreVendorIDs()))
|
||||||
globals.SugarLogger.Debugf("=======定时任务更新")
|
|
||||||
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDDD}, []int{668594}, false, nil, nil, syncFlag, true, true)
|
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDDD}, []int{668594}, false, nil, nil, syncFlag, true, true)
|
||||||
errList.AddErr(err)
|
errList.AddErr(err)
|
||||||
}
|
}
|
||||||
@@ -594,7 +594,7 @@ func syncStoreSkuTiktok() {
|
|||||||
errList.AddErr(err)
|
errList.AddErr(err)
|
||||||
SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID)
|
SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID)
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("===============syncStoreSkuTiktok ,errList %s", utils.Format4Output(errList, false))
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "抖音同步商品", utils.Format4Output(errList, false))
|
||||||
err = errList.GetErrListAsOne()
|
err = errList.GetErrListAsOne()
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}, []int{0, 1})
|
}, []int{0, 1})
|
||||||
|
|||||||
Reference in New Issue
Block a user