aa
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user