From ad88235942c79805a0c9f412108ab944aaf1d14b Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 21 Jun 2021 10:40:16 +0800 Subject: [PATCH] aa --- business/jxstore/misc/misc.go | 77 +++++++++++++++++------------------ 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 356447ea7..9646f9798 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -12,8 +12,6 @@ import ( "git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx" "git.rosy.net.cn/jx-callback/globals/api" - "git.rosy.net.cn/jx-callback/business/jxstore/event" - "git.rosy.net.cn/jx-callback/business/jxstore/report" "git.rosy.net.cn/baseapi/utils" @@ -162,40 +160,6 @@ func IsImportantTaskRunning(taskName string) bool { func Init() { if globals.IsProductEnv() { - ScheduleTimerFunc("doDailyWork", func() { - globals.SugarLogger.Debug("doDailyWork") - - //同步商品额外前缀和水印图(打标记) - cms.SyncSkuExperfixAndWatermark(jxcontext.AdminCtx) - - dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus) - cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), []int{model.VendorIDMTWM, model.VendorIDJD, model.VendorIDEBAI}, nil, true, true) - - if beego.BConfig.RunMode == "prod" { - syncStoreSku() - } - InitEx() - cms.SyncStoresCourierInfo(jxcontext.AdminCtx, nil, false, true) - netprinter.RebindAllPrinters(jxcontext.AdminCtx, false, true) - - //只传toDate默认刷新toDate到5天以前的订单 - orderman.RefreshOrdersWithoutJxStoreID(jxcontext.AdminCtx, "", "", true, true) - //禁用没有绑定的门店 - cms.DisabledStoreWithoutVendor(jxcontext.AdminCtx, true, true) - //刷新物料订单状态 - localjx.RefreshAllMatterOrderStatus(jxcontext.AdminCtx) - //同步美团配送与否状态及美团门店是否存在 - cms.SetMTPSStatus(jxcontext.AdminCtx, 0, 0) - //售后单如果超过12小时没有审核,就自动通过 - RefreshAfsOrderStatusAccess(jxcontext.AdminCtx) - //刷新京东商城订单结算价 - orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, utils.Time2Str(time.Now().AddDate(0, 0, -2)), utils.Time2Str(time.Now())) - //刷新门店分组管理 - cms.RefreshStoreBind(jxcontext.AdminCtx) - //刷新京东会员 - report.RefreshJDMembers(jxcontext.AdminCtx) - }, dailyWorkTimeList) - //ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2) //京东的订单信息解密密钥获取 @@ -237,6 +201,10 @@ func Init() { dao.UpdateActStatusByTime(dao.GetDB(), time.Now()) }, updateActStatusTimeList) ScheduleScoreStore() + ScheduleTimerFunc("RefreshJdShopOrdersEarningPrice", func() { + orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, utils.Time2Str(time.Now().AddDate(0, 0, -2)), utils.Time2Str(time.Now())) + }, updateActStatusTimeList) + //刷新京东商城订单结算价 // ScheduleCheckStoreAlert() ScheduleTimerFunc("ChangeStoreSkuSaleStatus", func() { cms.CurVendorSync.ChangeStoreSkuSaleStatus(jxcontext.AdminCtx, 0, true, true) @@ -250,9 +218,9 @@ func Init() { ScheduleTimerFunc("AutoFocusStoreSkusForTopSkus", func() { cms.AutoFocusStoreSkusForTopSkus(jxcontext.AdminCtx, true, true) }, createStorePriceTimeList) - ScheduleTimerFunc("GetCheckVendorCookie", func() { - event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM, model.VendorIDMTPS, model.VendorIDJDShop}, true) - }, checkCookieList) + //ScheduleTimerFunc("GetCheckVendorCookie", func() { + // event.GetCheckVendorCookie(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM, model.VendorIDMTPS, model.VendorIDJDShop}, true) + //}, checkCookieList) //ScheduleTimerFunc("SendSeckillSkusCountMsg", func() { // cms.SendSeckillSkusCountMsg(jxcontext.AdminCtx, []int{model.VendorIDEBAI, model.VendorIDJD, model.VendorIDMTWM}, false, true) //}, sendSecKillWarnList) @@ -304,6 +272,37 @@ func Init() { ScheduleTimerFunc("SendQywxPeopleCount", func() { cms.SendQywxPeopleCount(jxcontext.AdminCtx) }, dailyHeartbeat) + ScheduleTimerFunc("doDailyWork", func() { + globals.SugarLogger.Debug("doDailyWork") + + //同步商品额外前缀和水印图(打标记) + cms.SyncSkuExperfixAndWatermark(jxcontext.AdminCtx) + + dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus) + cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), []int{model.VendorIDMTWM, model.VendorIDJD, model.VendorIDEBAI}, nil, true, true) + + if beego.BConfig.RunMode == "prod" { + syncStoreSku() + } + InitEx() + cms.SyncStoresCourierInfo(jxcontext.AdminCtx, nil, false, true) + netprinter.RebindAllPrinters(jxcontext.AdminCtx, false, true) + + //只传toDate默认刷新toDate到5天以前的订单 + orderman.RefreshOrdersWithoutJxStoreID(jxcontext.AdminCtx, "", "", true, true) + //禁用没有绑定的门店 + cms.DisabledStoreWithoutVendor(jxcontext.AdminCtx, true, true) + //刷新物料订单状态 + localjx.RefreshAllMatterOrderStatus(jxcontext.AdminCtx) + //同步美团配送与否状态及美团门店是否存在 + cms.SetMTPSStatus(jxcontext.AdminCtx, 0, 0) + //售后单如果超过12小时没有审核,就自动通过 + RefreshAfsOrderStatusAccess(jxcontext.AdminCtx) + //刷新门店分组管理 + cms.RefreshStoreBind(jxcontext.AdminCtx) + //刷新京东会员 + report.RefreshJDMembers(jxcontext.AdminCtx) + }, dailyWorkTimeList) } ScheduleTimerFunc("AutoSaleStoreSku", func() { cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)