From 66fcd42fc6106c8194f9d2161970f8ee4c8d1a13 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 1 Aug 2019 15:11:33 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=89=80=E6=9C=89=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E8=B5=B7=E7=94=A8AutoSaleStoreSku?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/misc/misc.go | 9 ++++----- main.go | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 03075dad9..63c4be009 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -66,7 +66,7 @@ var ( ) func Init() { - if globals.ReallyCallPlatformAPI { + if globals.IsProductEnv() { ScheduleTimerFunc(doDailyWork, dailyWorkTimeList) ScheduleTimerFuncByInterval(func() { @@ -89,11 +89,10 @@ func Init() { ScheduleTimerFunc(func() { dao.UpdateActStatusByTime(dao.GetDB(), time.Now().Add(-48*time.Hour)) }, updateActStatusTimeList) - - ScheduleTimerFunc(func() { - cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil) - }, autoEnableStoreSkuTimeList) } + ScheduleTimerFunc(func() { + cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil) + }, autoEnableStoreSkuTimeList) } func doDailyWork() { diff --git a/main.go b/main.go index 81aa12ff6..b0e563a2a 100644 --- a/main.go +++ b/main.go @@ -56,9 +56,9 @@ func Init() { if globals.IsProductEnv() { ebai.CurPurchaseHandler.StartRefreshComment() - misc.Init() misc.InitEx() } + misc.Init() } // 返回true表示非运行服务