1
This commit is contained in:
@@ -502,10 +502,6 @@ func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, parentTask tasksch.
|
|||||||
if setSyncStatus != 0 {
|
if setSyncStatus != 0 {
|
||||||
dao.SetStoreSkuSyncStatus(db, storeMap.VendorID, []int{storeMap.StoreID}, skuIDs, setSyncStatus)
|
dao.SetStoreSkuSyncStatus(db, storeMap.VendorID, []int{storeMap.StoreID}, skuIDs, setSyncStatus)
|
||||||
}
|
}
|
||||||
if storeMap.VendorID == model.VendorIDTaoVegetable {
|
|
||||||
globals.SugarLogger.Debugf("定时任务同步:user[%s],storeId[%d]", ctx.GetUserName(), storeMap.StoreID)
|
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘宝同步商品", utils.Format4Output(storeMap.StoreID, false))
|
|
||||||
}
|
|
||||||
if _, err = SyncStoreSkuNew(ctx, task, causeFlag, storeMap.VendorID, storeMap.StoreID, storeMap.VendorStoreID, storeMap.VendorOrgCode, nil, skuIDs, excludeSkuIDs, false, isContinueWhenError); err != nil {
|
if _, err = SyncStoreSkuNew(ctx, task, causeFlag, storeMap.VendorID, storeMap.StoreID, storeMap.VendorStoreID, storeMap.VendorOrgCode, nil, skuIDs, excludeSkuIDs, false, isContinueWhenError); err != nil {
|
||||||
globals.SugarLogger.Debugf("SyncStoresSkus2 failed2 store:%d failed with error:%v", storeMap.StoreID, err)
|
globals.SugarLogger.Debugf("SyncStoresSkus2 failed2 store:%d failed with error:%v", storeMap.StoreID, err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,18 +282,97 @@ func Init() {
|
|||||||
// 淘鲜达更新门店商品 ,接口收费暂不使用
|
// 淘鲜达更新门店商品 ,接口收费暂不使用
|
||||||
if beego.BConfig.RunMode != "jxgy" {
|
if beego.BConfig.RunMode != "jxgy" {
|
||||||
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
|
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
|
||||||
syncStoreSkuTao()
|
var beijin = []int{
|
||||||
|
669158,
|
||||||
|
668691,
|
||||||
|
668673,
|
||||||
|
668282,
|
||||||
|
667447,
|
||||||
|
667354,
|
||||||
|
667321,
|
||||||
|
667319,
|
||||||
|
//667316,
|
||||||
|
//667269,
|
||||||
|
//667268,
|
||||||
|
//667267,
|
||||||
|
//667260,
|
||||||
|
//667132,
|
||||||
|
//667094,
|
||||||
|
//667030,
|
||||||
|
//666965,
|
||||||
|
//666714,
|
||||||
|
//666708,
|
||||||
|
//666705,
|
||||||
|
//103437,
|
||||||
|
//103349,
|
||||||
|
//103123,
|
||||||
|
//103121,
|
||||||
|
//103106,
|
||||||
|
//103038,
|
||||||
|
//103028,
|
||||||
|
//103019,
|
||||||
|
//102831,
|
||||||
|
//102751,
|
||||||
|
//102683,
|
||||||
|
//102542,
|
||||||
|
//102514,
|
||||||
|
//102382,
|
||||||
|
//102182,
|
||||||
|
//102178,
|
||||||
|
//102173,
|
||||||
|
//102098,
|
||||||
|
//102094,
|
||||||
|
//102080,
|
||||||
|
//102072,
|
||||||
|
//102069,
|
||||||
|
//101870,
|
||||||
|
//101869,
|
||||||
|
//101868,
|
||||||
|
//101867,
|
||||||
|
//101866,
|
||||||
|
//101865,
|
||||||
|
//100956,
|
||||||
|
//100930,
|
||||||
|
//100871,
|
||||||
|
//100786,
|
||||||
|
//100746,
|
||||||
|
//100744,
|
||||||
|
//100726,
|
||||||
|
//100705,
|
||||||
|
//100400,
|
||||||
|
//100111,
|
||||||
|
//100108,
|
||||||
|
//100106,
|
||||||
|
//100104,
|
||||||
|
//100103,
|
||||||
|
//100102,
|
||||||
|
//100100,
|
||||||
|
//100097,
|
||||||
|
//100096,
|
||||||
|
//100095,
|
||||||
|
//100093,
|
||||||
|
//100092,
|
||||||
|
//100089,
|
||||||
|
//100087,
|
||||||
|
//100086,
|
||||||
|
//100085,
|
||||||
|
//100082,
|
||||||
|
//100079,
|
||||||
|
//100078,
|
||||||
|
|
||||||
|
}
|
||||||
|
syncStoreSkuTao(beijin)
|
||||||
}, []string{
|
}, []string{
|
||||||
"13:00:00",
|
"13:00:00",
|
||||||
"15:00:00",
|
"15:00:00",
|
||||||
"17:00:00",
|
"17:20:00",
|
||||||
"18:35:00",
|
"18:35:00",
|
||||||
"20:40:00",
|
"20:40:00",
|
||||||
"22:40:00",
|
"22:40:00",
|
||||||
"23:40:00",
|
"23:40:00",
|
||||||
"01:40:00",
|
"01:40:00",
|
||||||
"03:40:00",
|
"03:40:00",
|
||||||
"05:40:00",
|
"05:20:00",
|
||||||
"07:40:00",
|
"07:40:00",
|
||||||
"08:40:00",
|
"08:40:00",
|
||||||
"10:40:00",
|
"10:40:00",
|
||||||
@@ -655,88 +734,8 @@ func syncStoreSkuTiktok() {
|
|||||||
tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
var beijin = []int{
|
|
||||||
669158,
|
|
||||||
668691,
|
|
||||||
668673,
|
|
||||||
668282,
|
|
||||||
667447,
|
|
||||||
667354,
|
|
||||||
667321,
|
|
||||||
667319,
|
|
||||||
//667316,
|
|
||||||
//667269,
|
|
||||||
//667268,
|
|
||||||
//667267,
|
|
||||||
//667260,
|
|
||||||
//667132,
|
|
||||||
//667094,
|
|
||||||
//667030,
|
|
||||||
//666965,
|
|
||||||
//666714,
|
|
||||||
//666708,
|
|
||||||
//666705,
|
|
||||||
//103437,
|
|
||||||
//103349,
|
|
||||||
//103123,
|
|
||||||
//103121,
|
|
||||||
//103106,
|
|
||||||
//103038,
|
|
||||||
//103028,
|
|
||||||
//103019,
|
|
||||||
//102831,
|
|
||||||
//102751,
|
|
||||||
//102683,
|
|
||||||
//102542,
|
|
||||||
//102514,
|
|
||||||
//102382,
|
|
||||||
//102182,
|
|
||||||
//102178,
|
|
||||||
//102173,
|
|
||||||
//102098,
|
|
||||||
//102094,
|
|
||||||
//102080,
|
|
||||||
//102072,
|
|
||||||
//102069,
|
|
||||||
//101870,
|
|
||||||
//101869,
|
|
||||||
//101868,
|
|
||||||
//101867,
|
|
||||||
//101866,
|
|
||||||
//101865,
|
|
||||||
//100956,
|
|
||||||
//100930,
|
|
||||||
//100871,
|
|
||||||
//100786,
|
|
||||||
//100746,
|
|
||||||
//100744,
|
|
||||||
//100726,
|
|
||||||
//100705,
|
|
||||||
//100400,
|
|
||||||
//100111,
|
|
||||||
//100108,
|
|
||||||
//100106,
|
|
||||||
//100104,
|
|
||||||
//100103,
|
|
||||||
//100102,
|
|
||||||
//100100,
|
|
||||||
//100097,
|
|
||||||
//100096,
|
|
||||||
//100095,
|
|
||||||
//100093,
|
|
||||||
//100092,
|
|
||||||
//100089,
|
|
||||||
//100087,
|
|
||||||
//100086,
|
|
||||||
//100085,
|
|
||||||
//100082,
|
|
||||||
//100079,
|
|
||||||
//100078,
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// syncStoreSkuTao 同步商品到淘鲜达
|
// syncStoreSkuTao 同步商品到淘鲜达
|
||||||
func syncStoreSkuTao() {
|
func syncStoreSkuTao(beijin []int) {
|
||||||
syncFlag := 0
|
syncFlag := 0
|
||||||
task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx,
|
task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
@@ -746,6 +745,7 @@ func syncStoreSkuTao() {
|
|||||||
switch step {
|
switch step {
|
||||||
case 0:
|
case 0:
|
||||||
if beego.BConfig.RunMode != "jxgy" {
|
if beego.BConfig.RunMode != "jxgy" {
|
||||||
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达自动同步商品数据", utils.Format4Output(beijin, false))
|
||||||
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin, false, nil, nil, syncFlag, true, true)
|
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin, false, nil, nil, syncFlag, true, true)
|
||||||
errList.AddErr(err)
|
errList.AddErr(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user