diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index b62ac023c..f4495b6cf 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -475,6 +475,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag skus, err = dao.GetStoreSkus(db, vendorID, storeID, skuIDs) } + globals.SugarLogger.Debugf("======sku:= %s", utils.Format4Output(skus, false)) if err != nil || len(skus) == 0 { return err } @@ -698,6 +699,18 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag // } } + if storeID == 668815 { + globals.SugarLogger.Debugf("======createList:= %s", utils.Format4Output(createList, false)) + globals.SugarLogger.Debugf("======updateList:= %s", utils.Format4Output(updateList, false)) + globals.SugarLogger.Debugf("======deleteList:= %s", utils.Format4Output(deleteList, false)) + globals.SugarLogger.Debugf("======stockList:= %s", utils.Format4Output(stockList, false)) + globals.SugarLogger.Debugf("======onlineList:= %s", utils.Format4Output(onlineList, false)) + globals.SugarLogger.Debugf("======offlineList:= %s", utils.Format4Output(offlineList, false)) + globals.SugarLogger.Debugf("======priceList:= %s", utils.Format4Output(priceList, false)) + globals.SugarLogger.Debugf("======updateItems:= %s", utils.Format4Output(updateItems, false)) + globals.SugarLogger.Debugf("======reorderSkuMap:= %s", utils.Format4Output(reorderSkuMap, false)) + } + task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 9f13a3008..a167d88df 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -255,7 +255,7 @@ func Init() { if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuList", func() { syncStoreSkuTiktok() - }, []string{"11:30:00"}) + }, []string{"13:00:00"}) } //刷新抖音门店token @@ -584,6 +584,9 @@ func syncStoreSku() { tasksch.HandleTask(task, nil, true).Run() } +var storeIds = []int{ + 668802, 668787, 668785, 668777, 668769, 668776, 668770, 668760, 668758, 668756, 668748, 668727, 668723, 300372, 668715, 668717, 668707, 668667, 668668, 800306, 668628, 668681, 668673, 668544, 668619, 668614, 668600, 102217, 667405, 100988, 668353, 103022, 668283, 667208, 668266, 102101, 100610, 103201, 103459, 667154, 102691, 666747, 103417, 666744, 666864, 102186, 667271, 101750, 101031, 667452, 666942, 666927, 100068, 668339, 668306, 668310, 667352, 102544, 667014, 102280, 667134, 102945, 103062, 102443, 668218, 666913, 102742, 668360, 102851, 668580, 667252, 666746, 100455, 667037, 667317, 667473, 666816, 103063, 666800, 668210, 103079, 668200, 668176, 667462, 102426, 667116, 668309, 100193, 666828, 666944, 102852, 666900, 668521, 668373, 102596, 668444, 667071, 668264, 668395, 668090, 102172, 102790, 101935, 667480, 102479, 103197, 102703, 668386, 668229, 666948, 101008, 668249, 102374, 667464, 668468, 102490, 666756, 102976, 667467, 666707, 668270, 667429, 103098, 668135, 668523, 666907, 668407, 668358, 668385, 101134, 100887, 668568, 668003, 101763, 100829, 667476, 101078, 668099, 668503, 666807, 100167, 100433, 668107, 667262, 100849, 102771, 667173, 666847, 667485, 102821, 666955, 101107, 667229, 102950, 103435, 102497, 666916, 668163, 668061, 102147, 668248, 667066, 102853, 667944, 100002, 102865, 668219, 100184, 666840, 667057, 668202, 102223, 667101, 667128, 101110, 668511, 103151, 667093, 668154, 666905, 668268, 666929, 102935, 102074, 668174, 668217, 102350, 666940, 102980, 668117, 668384, 100067, 101916, 102987, 667250, 668570, 667466, 101099, 667082, 100229, 667553, 100215, 667991, 100217, 103073, 103074, 103037, 668180, 668583, 668462, 667891, 666811, 666736, 668173, 100267, 102962, 102752, 668284, 667296, 668175, 667806, 103103, 103084, 668453, 102970, 103184, 668548, 101036, 668182, 668157, 668257, 668166, 668543, 668170, 668071, 667744, 102925, 100115, 668093, 667745, 668164, 668156, 667743, 668165, 103408, 103038, 667268, 667094, 667321, 100726, 102333, 666742, 101775, 100028, 668304, 667305, 101942, 668575, 101755, 103425, 102833, 100699, 103190, 666711, 668396, 100334, 102533, 100336, 101995, 102320, 101842, 102519, 101999, 102433, 100920, 102594, 102951, 668506, 666667, 102963, 300034, 667212, 100236, 101909, 668541, 102857, 668417, 102955, 103031, 668545, 666790, 100328} + func syncStoreSkuTiktok() { //syncFlag := 0 | model.SyncFlagSaleMask syncFlag := 0 @@ -597,7 +600,7 @@ func syncStoreSkuTiktok() { if beego.BConfig.RunMode != "jxgy" { errList.AddErr(cms.DeleteSkuNameExPrefixOverdue(db)) errList.AddErr(cms.SetMultiStoreSkuSyncModifyStatus(db, partner.GetMultiStoreVendorIDs())) - _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDDD}, nil, false, nil, nil, syncFlag, true, true) + _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDDD}, storeIds, false, nil, nil, syncFlag, true, true) errList.AddErr(err) } case 1: diff --git a/business/model/dao/store_sku.go b/business/model/dao/store_sku.go index 9e3b5c481..32b8e34f0 100644 --- a/business/model/dao/store_sku.go +++ b/business/model/dao/store_sku.go @@ -689,8 +689,6 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo // } sql = fmt.Sprintf(sql, fmtParams...) sql += " ORDER BY t1.price" - globals.SugarLogger.Debugf("=====parma := %s", sql) - globals.SugarLogger.Debugf("=====parma := %s", utils.Format4Output(sqlParams, false)) if err = GetRows(db, &skus, sql, sqlParams...); err != nil { return nil, err }