From cfd14e499083102227d3aaa0d4ad62951d765e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 18 Aug 2020 14:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E8=A5=BF=E6=8A=98=E6=89=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/act/act.go | 10 +++++++++- business/jxstore/misc/misc.go | 18 ++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 12f753e7d..58d242aec 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -1529,7 +1529,15 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { if len(actStoreSkus) == 0 { continue } - for _, actStoreSku := range actStoreSkus { + for _, actStoreSku2 := range actStoreSkus { + actStoreSku := &model.ActStoreSku{ + ActID: actStoreSku2.ActID, + OriginalPrice: actStoreSku2.OriginalPrice, + StoreID: actStoreSku2.StoreID, + SkuID: actStoreSku2.SkuID, + TrendPrcie: actStoreSku2.TrendPrcie, + TrendType: actStoreSku2.TrendType, + } storeSkus, _ := dao.GetStoresSkusInfo(db, []int{actStoreSku.StoreID}, []int{actStoreSku.SkuID}) if len(storeSkus) == 0 { continue diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 5d0f93598..46fe63423 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -259,21 +259,19 @@ func Init() { } cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, partner.GetMultiStoreVendorIDs(), storeList, false, nil, []int{27379}, syncFlag, true, true) }, exSyncList) + ScheduleTimerFunc("CreateOrderByPriceDefend", func() { + localjx.CreateOrderByPriceDefend(jxcontext.AdminCtx) + }, []string{ + "22:00:00", + }) + ScheduleTimerFunc("ChangeJxPriceByDiscountAct", func() { + act.ChangeJxPriceByDiscountAct(jxcontext.AdminCtx) + }, discountActJxList) } ScheduleTimerFunc("AutoSaleStoreSku", func() { cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false) }, autoSaleStoreSkuTimeList) - ScheduleTimerFunc("ChangeJxPriceByDiscountAct", func() { - act.ChangeJxPriceByDiscountAct(jxcontext.AdminCtx) - }, discountActJxList) - - ScheduleTimerFunc("CreateOrderByPriceDefend", func() { - localjx.CreateOrderByPriceDefend(jxcontext.AdminCtx) - }, []string{ - "22:00:00", - }) - if beego.BConfig.RunMode == "jxgy" { ScheduleTimerFunc("SyncMatterC4ToGy", func() { cms.SyncMatterC4ToGy(jxcontext.AdminCtx, true, true)