1
This commit is contained in:
@@ -486,9 +486,6 @@ func (v *VendorSync) SyncStoresCategory(ctx *jxcontext.Context, db *dao.DaoDB, v
|
||||
|
||||
//
|
||||
func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, db *dao.DaoDB, vendorIDs []int, storeIDs []int, syncDisabled bool, skuIDs, excludeSkuIDs []int, setSyncStatus int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
if len(vendorIDs) > 0 && vendorIDs[0] == model.VendorIDTaoVegetable {
|
||||
globals.SugarLogger.Debugf("=====================storeIDs: %s", utils.Format4Output(storeIDs, false))
|
||||
}
|
||||
isManageIt := len(storeIDs) != 1 || len(skuIDs) == 0 || len(skuIDs) > 8
|
||||
funcParam := func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
|
||||
@@ -285,24 +285,7 @@ func Init() {
|
||||
ScheduleTimerFunc("RefreshSyncSkuListTao", func() {
|
||||
syncStoreSkuTao()
|
||||
}, []string{
|
||||
"14:25:00",
|
||||
"16:25:00",
|
||||
"18:52:00",
|
||||
"20:25:00",
|
||||
"21:25:00",
|
||||
"22:25:00",
|
||||
"23:25:00",
|
||||
"00:25:00",
|
||||
"01:25:00",
|
||||
"02:25:00",
|
||||
"03:25:00",
|
||||
"04:25:00",
|
||||
"05:25:00",
|
||||
"06:25:00",
|
||||
"07:25:00",
|
||||
"08:25:00",
|
||||
"10:25:00",
|
||||
"12:25:00",
|
||||
"16:50:00",
|
||||
})
|
||||
}
|
||||
|
||||
@@ -657,244 +640,9 @@ func syncStoreSkuTiktok() {
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
}
|
||||
|
||||
var syncLen = 0
|
||||
var beijin = []int{
|
||||
//669113,
|
||||
//669111,
|
||||
//669110,
|
||||
//669109,
|
||||
//669108,
|
||||
//669107,
|
||||
//669106,
|
||||
//669103,
|
||||
//669100,
|
||||
//669099,
|
||||
//669098,
|
||||
//669097,
|
||||
//669096,
|
||||
//669095,
|
||||
//669094,
|
||||
//669093,
|
||||
//669092,
|
||||
//669091,
|
||||
//669087,
|
||||
//669086,
|
||||
//669085,
|
||||
//669084, // zheer
|
||||
//669083,
|
||||
//669082,
|
||||
//669079,
|
||||
//669078,
|
||||
//669077,
|
||||
//669075,
|
||||
//669074,
|
||||
//669072,
|
||||
//669070,
|
||||
//669067,
|
||||
//669064,
|
||||
//669063,
|
||||
//669062,
|
||||
//669060,
|
||||
//669059,
|
||||
//669056,
|
||||
//669055,
|
||||
//669054,
|
||||
//669050,
|
||||
//669049,
|
||||
//669047, //
|
||||
//669046,
|
||||
//669045,
|
||||
//669042,
|
||||
//669041,
|
||||
//669038,
|
||||
//669036,
|
||||
//669035,
|
||||
//669033,
|
||||
//669032, // zher
|
||||
//669031,
|
||||
//669027,
|
||||
//669025,
|
||||
//669024,
|
||||
//669022,
|
||||
//669021,
|
||||
//669020,
|
||||
//669017,
|
||||
//669015, /// zher
|
||||
//669014,
|
||||
//669012,
|
||||
//669009,
|
||||
//669007,
|
||||
//669002,
|
||||
//669000,
|
||||
//668999,
|
||||
//668997,
|
||||
//668996,
|
||||
//668993, //
|
||||
//668988,
|
||||
//668986,
|
||||
//668984,
|
||||
//668966,
|
||||
//668963,
|
||||
//668961,
|
||||
//668958,
|
||||
//668954,
|
||||
//668950,
|
||||
//668948,
|
||||
//668946,
|
||||
//668943, ///
|
||||
//668938,
|
||||
//668928,
|
||||
//668910,
|
||||
//668907,
|
||||
//668900,
|
||||
//668897,
|
||||
668896,
|
||||
668891,
|
||||
668889,
|
||||
668883,
|
||||
668882,
|
||||
668868,
|
||||
668860,
|
||||
668855,
|
||||
668853,
|
||||
668850,
|
||||
668849,
|
||||
668843,
|
||||
668838,
|
||||
668807,
|
||||
668802,
|
||||
668784,
|
||||
668773,
|
||||
668771,
|
||||
668767,
|
||||
668766,
|
||||
668755,
|
||||
668749,
|
||||
668728,
|
||||
668724,
|
||||
668722,
|
||||
668721,
|
||||
668716,
|
||||
668706,
|
||||
668704,
|
||||
668699,
|
||||
668697,
|
||||
668695,
|
||||
668693,
|
||||
668692,
|
||||
668688,
|
||||
668686,
|
||||
668682,
|
||||
668680,
|
||||
668679,
|
||||
668678,
|
||||
668672,
|
||||
668666,
|
||||
668662,
|
||||
668660,
|
||||
668659,
|
||||
668656,
|
||||
668655,
|
||||
668654,
|
||||
668649,
|
||||
668648,
|
||||
668643,
|
||||
668642,
|
||||
668640,
|
||||
668636,
|
||||
668632,
|
||||
668631,
|
||||
668629,
|
||||
668624,
|
||||
668616,
|
||||
668613,
|
||||
668608,
|
||||
668594,
|
||||
668548,
|
||||
668543,
|
||||
668540,
|
||||
668537,
|
||||
668530,
|
||||
668512,
|
||||
668258,
|
||||
668257,
|
||||
668256,
|
||||
668254,
|
||||
668203,
|
||||
668190,
|
||||
668186,
|
||||
668185,
|
||||
668182,
|
||||
668170,
|
||||
668169,
|
||||
668168,
|
||||
668166,
|
||||
668165,
|
||||
668164,
|
||||
668157,
|
||||
668156,
|
||||
668125,
|
||||
668121,
|
||||
668095,
|
||||
668094,
|
||||
668071,
|
||||
667959,
|
||||
667745,
|
||||
667744,
|
||||
667743,
|
||||
667563,
|
||||
667562,
|
||||
667561,
|
||||
667560,
|
||||
667559,
|
||||
667558,
|
||||
667556,
|
||||
667420,
|
||||
667332,
|
||||
667308,
|
||||
667305,
|
||||
667304,
|
||||
667299,
|
||||
667292,
|
||||
667285,
|
||||
667281,
|
||||
667278,
|
||||
667263,
|
||||
667001,
|
||||
666975,
|
||||
666677,
|
||||
666667,
|
||||
666666,
|
||||
103408,
|
||||
103184,
|
||||
103174,
|
||||
103127,
|
||||
103113,
|
||||
102925,
|
||||
102740,
|
||||
102736,
|
||||
102630,
|
||||
102383,
|
||||
102180,
|
||||
101942,
|
||||
101897,
|
||||
101875,
|
||||
101036,
|
||||
100840,
|
||||
100743,
|
||||
100654,
|
||||
100471,
|
||||
100144,
|
||||
100135,
|
||||
100129,
|
||||
100126,
|
||||
100123,
|
||||
100115,
|
||||
}
|
||||
|
||||
// syncStoreSkuTao 同步商品到淘鲜达
|
||||
func syncStoreSkuTao() {
|
||||
syncFlag := 0
|
||||
syncFlag := 57
|
||||
task := tasksch.NewParallelTask("syncStoreSkuTao ", nil, jxcontext.AdminCtx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
step := batchItemList[0].(int)
|
||||
@@ -902,11 +650,12 @@ func syncStoreSkuTao() {
|
||||
db := dao.GetDB()
|
||||
switch step {
|
||||
case 0:
|
||||
if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)); err != nil {
|
||||
|
||||
if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output("开始同步", false)); err != nil {
|
||||
globals.SugarLogger.Debugf("SendUserMessage := %s", utils.Format4Output(err, false))
|
||||
}
|
||||
enterprise_msg.SendUserMessage("18981810340", "淘鲜达同步消息", utils.Format4Output(beijin[syncLen:syncLen+5], false), 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)
|
||||
enterprise_msg.SendUserMessage("18981810340", "淘鲜达同步消息", utils.Format4Output("开始同步", false), utils.Format4Output("开始同步", false))
|
||||
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, nil, false, nil, nil, syncFlag, true, true)
|
||||
errList.AddErr(err)
|
||||
case 1:
|
||||
SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID)
|
||||
@@ -915,7 +664,6 @@ func syncStoreSkuTao() {
|
||||
return retVal, err
|
||||
}, []int{0, 1})
|
||||
tasksch.HandleTask(task, nil, true).Run()
|
||||
syncLen += 5
|
||||
}
|
||||
|
||||
func doDailyWork2() {
|
||||
|
||||
@@ -537,6 +537,7 @@ func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *stri
|
||||
taoImgs.VendorID = vendorId
|
||||
dao.CreateEntity(dao.GetDB(), taoImgs)
|
||||
}
|
||||
|
||||
// 商品图片最多五张
|
||||
if len(result) > 5 {
|
||||
return utils.String2Pointer(strings.Join(result[1:], ","))
|
||||
|
||||
Reference in New Issue
Block a user