This commit is contained in:
邹宗楠
2023-08-03 16:36:57 +08:00
parent 4780d3cc50
commit acbf6fafb2

View File

@@ -592,7 +592,7 @@ func Init() {
}, []string{
"11:30:00",
"13:30:00",
"16:15:00",
"16:45:00",
"17:30:00",
"19:30:00",
"21:30:00",
@@ -960,6 +960,7 @@ var syncLen = 0
// syncStoreSkuTao 同步商品到淘鲜达
func syncStoreSkuTao(beijin []int) {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", "开始了:"+utils.Format4Output(beijin[syncLen:syncLen+5], false))
syncFlag := 0
task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
@@ -968,11 +969,9 @@ func syncStoreSkuTao(beijin []int) {
db := dao.GetDB()
switch step {
case 0:
if beego.BConfig.RunMode != "jxgy" {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false))
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+5], false, nil, nil, syncFlag, true, true)
errList.AddErr(err)
}
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false))
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+5], false, nil, nil, syncFlag, true, true)
errList.AddErr(err)
case 1:
errList.AddErr(err)
SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID)