From 3d7c3e99df31a414ce8688636411bf4e1b495bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 09:55:02 +0800 Subject: [PATCH] 1 --- business/jxstore/misc/misc.go | 43 ++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index afda7929f..c5b2d6166 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -165,16 +165,16 @@ func IsImportantTaskRunning(taskName string) bool { } var hangzhou = []int{ - 669113, - 669111, - 669110, - 669109, - 669108, - 669107, - 669106, - 669103, - 669100, - 669099, + //669113, + //669111, + //669110, + //669109, + //669108, + //669107, + //669106, + //669103, + //669100, + //669099, 669098, 669097, 669096, @@ -514,13 +514,24 @@ func Init() { // }, []string{"13:00:00"}) //} - globals.SugarLogger.Debugf("======== : %s", utils.Format4Output(hangzhou[0:20], false)) if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - globals.SugarLogger.Debugf("========2 : %s", utils.Format4Output(hangzhou[0:20], false)) syncStoreSkuTao(hangzhou[0:50]) }, []string{ - "22:51:00", + "10:05:00", + "12:05:00", + "14:05:00", + "16:05:00", + "18:05:00", + "20:05:00", + "22:05:00", + "00:05:00", + "01:05:00", + "02:05:00", + "04:05:00", + "06:05:00", + "07:05:00", + "0:05:00", }) } @@ -898,7 +909,6 @@ var syncLen = 0 // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao(beijin []int) { syncFlag := 0 - globals.SugarLogger.Debugf("===========beijin %s", utils.Format4Output(beijin, false)) task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) @@ -906,8 +916,9 @@ func syncStoreSkuTao(beijin []int) { db := dao.GetDB() switch step { case 0: - globals.SugarLogger.Debugf("===========beijin %s", utils.Format4Output(beijin, false)) - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)) + if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)); err != nil { + globals.SugarLogger.Debugf("SendUserMessage := %s", utils.Format4Output(err, false)) + } _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+5], false, nil, nil, syncFlag, true, true) errList.AddErr(err) case 1: