This commit is contained in:
邹宗楠
2024-01-12 16:59:09 +08:00
parent fa4a730529
commit e391bbbc83
2 changed files with 6 additions and 7 deletions

View File

@@ -426,6 +426,7 @@ func Init() {
dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus)
cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), []int{model.VendorIDMTWM, model.VendorIDJD, model.VendorIDEBAI, model.VendorIDDD}, nil, true, true)
// 刷新门店平台商品
syncStoreSku()
InitEx()
cms.SyncStoresCourierInfo(jxcontext.AdminCtx, nil, false, true)
@@ -566,12 +567,9 @@ func Init() {
func syncStoreSku() {
syncFlag := 0
if beego.BConfig.RunMode == "jxgy" {
//syncFlag = model.SyncFlagPriceMask
if true {
syncFlag |= model.SyncFlagSaleMask
}
syncFlag |= model.SyncFlagPriceMask // SyncFlagSaleMask
} else {
syncFlag |= model.SyncFlagSaleMask
syncFlag |= model.SyncFlagPriceMask // SyncFlagSaleMask
}
task := tasksch.NewParallelTask("同步京西与平台数据", nil, jxcontext.AdminCtx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
@@ -592,7 +590,7 @@ func syncStoreSku() {
})
errList.AddErr(err)
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{0}, nil, false, nil, []int{27379}, syncFlag, true, true)
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, nil, nil, false, nil, []int{27379}, syncFlag, true, true)
//_, err = cms.CurVendorSync.FullSyncStoresSkus(jxcontext.AdminCtx, db, partner.GetMultiStoreVendorIDs(), nil, false, []int{27379}, true, true)
errList.AddErr(err)
}