中午进行特殊某些门店强制同步京西

This commit is contained in:
苏尹岚
2020-04-30 15:50:13 +08:00
parent da6f2d5220
commit ede983793f

View File

@@ -110,6 +110,10 @@ var (
"23:30:00",
}
exSyncList = []string{
"12:00:00",
}
importantTaskMap = &sync.Map{}
cancelPayTimeOutOrderList = localjx.GetHalfHoursList()
@@ -213,6 +217,26 @@ func Init() {
ScheduleTimerFunc("CleanStoreIsBoughtMatter", func() {
cms.CleanStoreIsBoughtMatter(jxcontext.AdminCtx)
}, priceReferTimeList)
ScheduleTimerFunc("exSync", func() {
var (
db = dao.GetDB()
storeList []int
exSyncStoreIDList string
syncFlag = 0
)
syncFlag = model.SyncFlagPriceMask
if (time.Now().Unix()/24*3600)%10 == 0 {
syncFlag |= model.SyncFlagSaleMask
}
if configs, err := dao.QueryConfigs(dao.GetDB(), "exSyncStoreIDList", model.ConfigTypeSys, ""); err == nil {
exSyncStoreIDList = configs[0].Value
}
storeIDList := strings.Split(exSyncStoreIDList, ",")
for _, v := range storeIDList {
storeList = append(storeList, int(utils.Str2Int64(v)))
}
cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, partner.GetMultiStoreVendorIDs(), storeList, false, nil, []int{27379}, syncFlag, true, true)
}, exSyncList)
}
ScheduleTimerFunc("AutoSaleStoreSku", func() {
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)