1
This commit is contained in:
@@ -202,6 +202,12 @@ func Init() {
|
||||
"03:35:00",
|
||||
"09:35:00",
|
||||
})
|
||||
/// 更新淘鲜达结算信息
|
||||
ScheduleTimerFunc("UpdateTiktokShopTotalMoney", func() {
|
||||
orderman.UpdateTaoSettleInfo()
|
||||
}, []string{
|
||||
"23:20:00",
|
||||
})
|
||||
|
||||
// 每分钟轮询一次,推送骑手信息
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
@@ -273,8 +279,14 @@ func Init() {
|
||||
// syncStoreSkuTiktok()
|
||||
// }, []string{"13:00:00"})
|
||||
//}
|
||||
// 抖音更新门店商品 ,接口收费暂不使用
|
||||
if beego.BConfig.RunMode != "jxgy" {
|
||||
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
|
||||
syncStoreSkuTao()
|
||||
}, []string{"13:00:00"})
|
||||
}
|
||||
|
||||
//刷新抖音门店token
|
||||
// 刷新抖音门店token
|
||||
if beego.BConfig.RunMode != "jxgy" {
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
cms.RefreshTiktokShopToken(jxcontext.AdminCtx)
|
||||
@@ -614,8 +626,6 @@ func syncStoreSkuTiktok() {
|
||||
switch step {
|
||||
case 0:
|
||||
if beego.BConfig.RunMode != "jxgy" {
|
||||
errList.AddErr(cms.DeleteSkuNameExPrefixOverdue(db))
|
||||
errList.AddErr(cms.SetMultiStoreSkuSyncModifyStatus(db, partner.GetMultiStoreVendorIDs()))
|
||||
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDDD}, nil, false, nil, nil, syncFlag, true, true)
|
||||
errList.AddErr(err)
|
||||
}
|
||||
@@ -630,6 +640,31 @@ func syncStoreSkuTiktok() {
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
}
|
||||
|
||||
// syncStoreSkuTao 同步商品到淘鲜达
|
||||
func syncStoreSkuTao() {
|
||||
syncFlag := 0
|
||||
task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
step := batchItemList[0].(int)
|
||||
errList := errlist.New()
|
||||
db := dao.GetDB()
|
||||
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)
|
||||
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})
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
}
|
||||
|
||||
func doDailyWork2() {
|
||||
if beego.BConfig.RunMode == "jxgy" {
|
||||
syncStoreSku()
|
||||
|
||||
Reference in New Issue
Block a user