1
This commit is contained in:
@@ -4430,7 +4430,7 @@ func RefreshTiktokShopToken(ctx *jxcontext.Context) (err error) {
|
||||
globals.SugarLogger.Debugf("定时任务更新抖店店铺token错误:%s,%s", utils.Format4Output(v, false), err.Error())
|
||||
continue
|
||||
}
|
||||
if access.ExpiresIn-time.Now().Unix() > 48*60*60 {
|
||||
if access.ExpiresIn-time.Now().Unix() > 60*60 {
|
||||
continue
|
||||
}
|
||||
api.SetToken(access.AccessToken)
|
||||
@@ -4441,7 +4441,7 @@ func RefreshTiktokShopToken(ctx *jxcontext.Context) (err error) {
|
||||
token, _ := json.Marshal(result)
|
||||
v.Token = string(token)
|
||||
v.UpdatedAt = time.Now()
|
||||
v.Comment = utils.Time2Str(time.Now())[0:11] + ":" + v.Token[0:230]
|
||||
v.StoreBrandName = "定时任务更新"
|
||||
dao.UpdateEntity(db, v, "Token", "UpdatedAt", "Comment")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,15 +678,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
||||
// }
|
||||
}
|
||||
|
||||
//globals.SugarLogger.Debugf("==============createList=%s", utils.Format4Output(createList, false))
|
||||
//globals.SugarLogger.Debugf("===============updateList%s", utils.Format4Output(updateList, false))
|
||||
//globals.SugarLogger.Debugf("==============deleteList=%s", utils.Format4Output(deleteList, false))
|
||||
//globals.SugarLogger.Debugf("===============priceList%s", utils.Format4Output(priceList, false))
|
||||
//globals.SugarLogger.Debugf("===============stockList%s", utils.Format4Output(stockList, false))
|
||||
//globals.SugarLogger.Debugf("==============onlineList=%s", utils.Format4Output(onlineList, false))
|
||||
//globals.SugarLogger.Debugf("===============offlineList %s", utils.Format4Output(offlineList, false))
|
||||
//globals.SugarLogger.Debugf("===============offlineList %s", utils.Format4Output(offlineList, false))
|
||||
|
||||
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
step := batchItemList[0].(int)
|
||||
|
||||
@@ -243,6 +243,11 @@ func Init() {
|
||||
orderman.FixedOrderManager.AmendMissingOrders(jxcontext.AdminCtx, []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI, model.VendorIDDD}, 0, curDate, curDate, true, true)
|
||||
}, 5*time.Second, 10*time.Minute)
|
||||
|
||||
//刷新抖音门店token
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
cms.RefreshTiktokShopToken(jxcontext.AdminCtx)
|
||||
}, 60*time.Second, 30*time.Minute)
|
||||
|
||||
//刷新京东物竞天择订单结算价
|
||||
ScheduleTimerFunc("RefreshJdShopOrdersEarningPrice", func() {
|
||||
orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, utils.Time2Str(time.Now().AddDate(0, 0, -2)), utils.Time2Str(time.Now().AddDate(0, 0, -2)))
|
||||
@@ -332,10 +337,7 @@ func Init() {
|
||||
ScheduleTimerFunc("RefreshMTWMToken", func() {
|
||||
cms.RefreshMTWMToken(jxcontext.AdminCtx)
|
||||
}, updateActStatusTimeList)
|
||||
//刷新抖音门店token
|
||||
ScheduleTimerFunc("RefreshTiktokShopToken", func() {
|
||||
cms.RefreshTiktokShopToken(jxcontext.AdminCtx)
|
||||
}, updateActStatusTimeList)
|
||||
|
||||
//获取最新平台流量活动
|
||||
ScheduleTimerFunc("GetNewVendorPopActs", func() {
|
||||
act.GetNewVendorPopActs(jxcontext.AdminCtx)
|
||||
|
||||
Reference in New Issue
Block a user