From 574016199e50e111b208c7f6359b85d0dc088cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Aug 2023 14:04:28 +0800 Subject: [PATCH 01/45] 1 --- business/jxcallback/orderman/order.go | 84 ++++++++++++++++--------- business/jxstore/misc/misc.go | 3 +- business/partner/purchase/mtwm/order.go | 5 +- 3 files changed, 59 insertions(+), 33 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index b93c7b53b..9a9984bd9 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -2781,36 +2781,36 @@ var storeList = []int64{ //668476, //668462, //100309, - 100299, - 100292, - 668276, - 668180, - 667320, - 667237, - 667036, - 668691, - 668673, - 668282, - 667447, - 667354, - 667335, - 667319, - 667316, - 667269, - 667268, - 667267, - 667260, - 667132, - 667030, - 666965, - 666714, - 666708, - 666705, - 103437, - 103349, - 103123, - 103121, - 103106, + //100299, + //100292, + //668276, + //668180, + //667320, + //667237, + //667036, + //668691, + //668673, + //668282, + //667447, + //667354, + //667335, + //667319, + //667316, + //667269, + //667268, + //667267, + //667260, + //667132, + //667030, + //666965, + //666714, + //666708, + //666705, + //103437, + //103349, + //103123, + //103121, + //103106, 103038, 103028, 103019, @@ -2849,6 +2849,9 @@ var storeList = []int64{ 100103, 100102, 100100, +} + +var storeList2 = []int64{ 100097, 100096, 100095, @@ -2885,3 +2888,24 @@ func UpdateTaoSkuUpdateOffShelf() { // } //} } + +func UpdateTaoSkuUpdateOffShelf2() { + // 标准模板店 + //skuCodeList := dao.GetStoreSkuBindList(dao.GetDB(), 100102) + + for _, storeId := range storeList2 { + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "开始下架:", utils.Int64ToStr(storeId)) + storeSkuMap := dao.GetStoreSkuBindList(dao.GetDB(), storeId) + resultErr := tao.UpdateStoreSku(storeId, storeSkuMap) + if len(resultErr) > 0 { + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "下架商品错误消息:", utils.Format4Output(resultErr, false)) + } + } + + //for _,storeId := range storeList { + // resultErr := tao.UpdateStoreSkuGrounding(storeId, skuCodeList) + // if len(resultErr) > 0 { + // ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "上架架商品错误消息:", utils.Format4Output(resultErr, false)) + // } + //} +} diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 7524ed4fc..41ad559c6 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -212,8 +212,9 @@ func Init() { // 下架所有北京上海门店商品 ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf", func() { orderman.UpdateTaoSkuUpdateOffShelf() + orderman.UpdateTaoSkuUpdateOffShelf2() }, []string{ - "09:13:00", + "14:08:00", }) // 每分钟轮询一次,推送骑手信息 diff --git a/business/partner/purchase/mtwm/order.go b/business/partner/purchase/mtwm/order.go index 7606501d9..b49e20007 100644 --- a/business/partner/purchase/mtwm/order.go +++ b/business/partner/purchase/mtwm/order.go @@ -515,13 +515,14 @@ func (c *PurchaseHandler) AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptI func (c *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error) { isSelfDelivery = model.IsOrderDeliveryByStore(order) || model.IsOrderDeliveryBySelf(order) - if !isSelfDelivery { + if isSelfDelivery { if globals.EnableMtwmStoreWrite { err = getAPI(order.VendorOrgCode, jxutils.GetSaleStoreIDFromOrder(order), "").PreparationMealComplete(utils.Str2Int64(order.VendorOrderID)) } } - if err == nil { + if err == nil || strings.Contains(err.Error(), "808") { // 配送类型只能为美团配送或美团企客配送 level:0, code:808 c.postFakeMsg(order.VendorOrderID, FakeMsgType, fakeFinishedPickup) + return nil } return err } From 2fe47f1480a10dfec7660fff3ecade6d9f1de663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Aug 2023 14:12:48 +0800 Subject: [PATCH 02/45] 1 --- business/jxstore/misc/misc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 41ad559c6..222850134 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -212,9 +212,13 @@ func Init() { // 下架所有北京上海门店商品 ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf", func() { orderman.UpdateTaoSkuUpdateOffShelf() + }, []string{ + "14:18:00", + }) + ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf2", func() { orderman.UpdateTaoSkuUpdateOffShelf2() }, []string{ - "14:08:00", + "14:18:00", }) // 每分钟轮询一次,推送骑手信息 From 5b80549bbec0f3a711123e72e7237c0b0a2c1126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Aug 2023 15:40:02 +0800 Subject: [PATCH 03/45] 1 --- business/jxcallback/orderman/order.go | 52 +++++++++++++-------------- business/jxstore/misc/misc.go | 4 +-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 9a9984bd9..7a5c67b6e 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -2811,15 +2811,15 @@ var storeList = []int64{ //103123, //103121, //103106, - 103038, - 103028, - 103019, - 102831, - 102751, - 102683, - 102542, - 102514, - 102382, + //103038, + //103028, + //103019, + //102831, + //102751, + //102683, + //102542, + //102514, + //102382, 102182, 102178, 102173, @@ -2837,6 +2837,23 @@ var storeList = []int64{ 100956, 100930, 100871, +} + +var storeList2 = []int64{ + //100097, + //100096, + //100095, + //100093, + //100092, + //100089, + //100087, + //100086, + //100085, + //100083, + 100082, + 100081, + 100079, + 100078, 100786, 100746, 100744, @@ -2851,23 +2868,6 @@ var storeList = []int64{ 100100, } -var storeList2 = []int64{ - 100097, - 100096, - 100095, - 100093, - 100092, - 100089, - 100087, - 100086, - 100085, - 100083, - 100082, - 100081, - 100079, - 100078, -} - func UpdateTaoSkuUpdateOffShelf() { // 标准模板店 //skuCodeList := dao.GetStoreSkuBindList(dao.GetDB(), 100102) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 222850134..673c73123 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -213,12 +213,12 @@ func Init() { ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf", func() { orderman.UpdateTaoSkuUpdateOffShelf() }, []string{ - "14:18:00", + "15:42:00", }) ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf2", func() { orderman.UpdateTaoSkuUpdateOffShelf2() }, []string{ - "14:18:00", + "15:43:00", }) // 每分钟轮询一次,推送骑手信息 From c74e373e77c2983f13d578f3d748576d19487a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Aug 2023 16:29:38 +0800 Subject: [PATCH 04/45] 1 --- business/jxcallback/orderman/order.go | 44 +++++++++---------- .../jxcallback/scheduler/defsch/defsch.go | 1 - business/jxstore/misc/misc.go | 4 +- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 7a5c67b6e..01ece1927 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -2820,12 +2820,28 @@ var storeList = []int64{ //102542, //102514, //102382, - 102182, - 102178, - 102173, - 102098, - 102094, - 102080, + //102182, + //102178, + //102173, + //102098, + //102094, + //102080, + //100097, + //100096, + //100095, + //100093, + //100092, + //100089, + //100087, + //100086, + //100085, + //100083, + //100082, + //100081, + //100079, + //100078, + //100786, + //100746, 102072, 102069, 101870, @@ -2840,22 +2856,6 @@ var storeList = []int64{ } var storeList2 = []int64{ - //100097, - //100096, - //100095, - //100093, - //100092, - //100089, - //100087, - //100086, - //100085, - //100083, - 100082, - 100081, - 100079, - 100078, - 100786, - 100746, 100744, 100705, 100400, diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index b4801a298..29a745423 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -982,7 +982,6 @@ func (s *DefScheduler) createWaybillOn3rdProviders(savedOrderInfo *WatchOrderInf break } } - partner.CurOrderManager.OnOrderMsg(order, fmt.Sprintf("发起自动创建三方运单,目标创建运单平台[%s],排除平台[%s]", jxutils.GetVendorName(vendorID), utils.Format4Output(excludeVendorIDs, false)), "") if _, err = s.CreateWaybillOnProviders4SavedOrder(jxcontext.AdminCtx, savedOrderInfo, nil, excludeVendorIDs, false, maxDeliveryFee); err == nil { savedOrderInfo.retryCount++ } else { diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 673c73123..7668b8ba9 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -213,12 +213,12 @@ func Init() { ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf", func() { orderman.UpdateTaoSkuUpdateOffShelf() }, []string{ - "15:42:00", + "16:33:00", }) ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf2", func() { orderman.UpdateTaoSkuUpdateOffShelf2() }, []string{ - "15:43:00", + "16:34:00", }) // 每分钟轮询一次,推送骑手信息 From 744d4c77111b69084ce5dcbc59a9bfd15513fd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Aug 2023 18:51:15 +0800 Subject: [PATCH 05/45] 1 --- business/jxcallback/orderman/order.go | 174 ----- business/jxstore/misc/misc.go | 666 ++++++++++-------- .../partner/purchase/tao_vegetable/order.go | 27 - 3 files changed, 389 insertions(+), 478 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 01ece1927..679172eec 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -2735,177 +2735,3 @@ func UpdateTaoSettleInfo() { } } } - -var storeList = []int64{ - //669053, - //103074, - //668985, - //103065, - //668960, - //668959, - //668953, - //103029, - //668949, - //103002, - //102999, - //668932, - //668931, - //668917, - //102969, - //102966, - //668909, - //668908, - //668905, - //668901, - //102946, - //102939, - //102938, - //668894, - //102934, - //102933, - //102930, - //668884, - //668878, - //102903, - //668757, - //102293, - //668622, - //668618, - //668592, - //100945, - //668583, - //100943, - //100935, - //100905, - //668498, - //668476, - //668462, - //100309, - //100299, - //100292, - //668276, - //668180, - //667320, - //667237, - //667036, - //668691, - //668673, - //668282, - //667447, - //667354, - //667335, - //667319, - //667316, - //667269, - //667268, - //667267, - //667260, - //667132, - //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, - //100097, - //100096, - //100095, - //100093, - //100092, - //100089, - //100087, - //100086, - //100085, - //100083, - //100082, - //100081, - //100079, - //100078, - //100786, - //100746, - 102072, - 102069, - 101870, - 101869, - 101868, - 101867, - 101866, - 101865, - 100956, - 100930, - 100871, -} - -var storeList2 = []int64{ - 100744, - 100705, - 100400, - 100111, - 100108, - 100106, - 100104, - 100103, - 100102, - 100100, -} - -func UpdateTaoSkuUpdateOffShelf() { - // 标准模板店 - //skuCodeList := dao.GetStoreSkuBindList(dao.GetDB(), 100102) - - for _, storeId := range storeList { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "开始下架:", utils.Int64ToStr(storeId)) - storeSkuMap := dao.GetStoreSkuBindList(dao.GetDB(), storeId) - resultErr := tao.UpdateStoreSku(storeId, storeSkuMap) - if len(resultErr) > 0 { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "下架商品错误消息:", utils.Format4Output(resultErr, false)) - } - } - - //for _,storeId := range storeList { - // resultErr := tao.UpdateStoreSkuGrounding(storeId, skuCodeList) - // if len(resultErr) > 0 { - // ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "上架架商品错误消息:", utils.Format4Output(resultErr, false)) - // } - //} -} - -func UpdateTaoSkuUpdateOffShelf2() { - // 标准模板店 - //skuCodeList := dao.GetStoreSkuBindList(dao.GetDB(), 100102) - - for _, storeId := range storeList2 { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "开始下架:", utils.Int64ToStr(storeId)) - storeSkuMap := dao.GetStoreSkuBindList(dao.GetDB(), storeId) - resultErr := tao.UpdateStoreSku(storeId, storeSkuMap) - if len(resultErr) > 0 { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "下架商品错误消息:", utils.Format4Output(resultErr, false)) - } - } - - //for _,storeId := range storeList { - // resultErr := tao.UpdateStoreSkuGrounding(storeId, skuCodeList) - // if len(resultErr) > 0 { - // ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "上架架商品错误消息:", utils.Format4Output(resultErr, false)) - // } - //} -} diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 7668b8ba9..9e00a7375 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -209,18 +209,6 @@ func Init() { "18:10:00", }) - // 下架所有北京上海门店商品 - ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf", func() { - orderman.UpdateTaoSkuUpdateOffShelf() - }, []string{ - "16:33:00", - }) - ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf2", func() { - orderman.UpdateTaoSkuUpdateOffShelf2() - }, []string{ - "16:34:00", - }) - // 每分钟轮询一次,推送骑手信息 ScheduleTimerFuncByInterval(func() { delivery.UpdateFakeWayBillToTiktok() @@ -295,6 +283,130 @@ func Init() { if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuList_tao", func() { var hangzhou = []int{ + 669053, + 103074, + 668985, + 103065, + 668960, + 668959, + 668953, + 103029, + 668949, + 103002, + 102999, + 668932, + 668931, + 668917, + 102969, + 102966, + 668909, + 668908, + 668905, + 668901, + 102946, + 102939, + 102938, + 668894, + 102934, + 102933, + 102930, + 668884, + 668878, + 102903, + 668757, + 102293, + 668622, + 668618, + 668592, + 100945, + 668583, + 100943, + 100905, + 668498, + 668476, + 668462, + 100309, + 100299, + 100292, + 668276, + 668180, + 667320, + 667237, + 667036, + 668691, + 668673, + 668282, + 667447, + 667354, + 667335, + 667319, + 667269, + 667268, + 667267, + 667260, + 667132, + 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, + 100097, + 100096, + 100095, + 100093, + 100092, + 100089, + 100087, + 100086, + 100085, + 100083, + 100082, + 100081, + 100079, + 100078, + 100786, + 100746, + 102072, + 102069, + 101870, + 101869, + 101868, + 100744, + 100705, + 100400, + 100111, + 100108, + 100106, + 100104, + 100103, + 100100, + 101867, + 101866, + 101865, + 100956, + 100930, + 100871, + // 杭州 //669073, //668930, @@ -335,270 +447,270 @@ func Init() { //// 广州 // 668871, 668602, 668575, 668262, 103425, 101755, 101176, 100557, 100369, 100361, 100351, 100350, //成都 - 669172, - 669171, - 669170, - 669169, - 669168, - 669165, - 669164, - 669163, - 669162, - 669157, - 669156, - 669155, - 669154, - 669153, - 669150, - 669149, - 669148, - 669147, - 669146, - 669144, - 669141, - 669139, - 669138, - 669137, - 669134, - 669132, - 669127, - 669124, - 669122, - 669121, - 669120, - 669119, - 669114, - 669113, - 669111, - 669110, - 669109, - 669108, - 669107, - 669106, - 669103, - 669100, - 669099, - 669098, - 669097, - 669096, - 669095, - 669094, - 669093, - 669092, - 669091, - 669087, - 669086, - 669085, - 669084, - 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, - 669031, - 669027, - 669025, - 669024, - 669022, - 669021, - 669020, - 669017, - 669015, - 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, + //669172, + //669171, + //669170, + //669169, + //669168, + //669165, + //669164, + //669163, + //669162, + //669157, + //669156, + //669155, + //669154, + //669153, + //669150, + //669149, + //669148, + //669147, + //669146, + //669144, + //669141, + //669139, + //669138, + //669137, + //669134, + //669132, + //669127, + //669124, + //669122, + //669121, + //669120, + //669119, + //669114, + //669113, + //669111, + //669110, + //669109, + //669108, + //669107, + //669106, + //669103, + //669100, + //669099, + //669098, + //669097, + //669096, + //669095, + //669094, + //669093, + //669092, + //669091, + //669087, + //669086, + //669085, + //669084, + //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, + //669031, + //669027, + //669025, + //669024, + //669022, + //669021, + //669020, + //669017, + //669015, + //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(hangzhou) }, []string{ @@ -621,7 +733,7 @@ func Init() { "16:30:00", "17:30:00", "18:30:00", - "19:30:00", + "19:00:00", "20:30:00", "21:30:00", "22:30:00", diff --git a/business/partner/purchase/tao_vegetable/order.go b/business/partner/purchase/tao_vegetable/order.go index b9757e4db..27fa9e57b 100644 --- a/business/partner/purchase/tao_vegetable/order.go +++ b/business/partner/purchase/tao_vegetable/order.go @@ -10,8 +10,6 @@ import ( "git.rosy.net.cn/baseapi/platformapi/tao_vegetable" domain3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain" request3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/request" - domain587 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/domain" - request587 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/request" domain591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/domain" request591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/request" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util" @@ -845,31 +843,6 @@ func (c *PurchaseHandler) GetOrderSettleAccounts(order *model.GoodsOrder) (int64 return 0, nil } -// 下架 -func UpdateStoreSku(storeId int64, skuCode []string) []string { - api := getAPI("34402634", 0, "") - return api.StoreSkuUpdateOffShelfList(storeId, skuCode) -} - -// 上架 -func UpdateStoreSkuGrounding(storeId int64, skuCode []string) []string { - api := getAPI("34402634", 0, "") - - result := make([]string, 0, 0) - for _, v := range skuCode { - param := &request587.AlibabaAxChannelSkuStatusUpdateRequest{ChannelSkuUpdateStatusReq: &domain587.AlibabaAxChannelSkuStatusUpdateChannelSkuUpdateStatusReq{ - SkuCode: utils.String2Pointer(v), - StoreId: utils.String2Pointer(fmt.Sprintf("JX%d", storeId)), - ChannelCode: utils.String2Pointer("31"), - OnlineSaleFlag: utils.Int64ToPointer(1), - }} - if err := api.StoreSkuUpdateOffShelf(param); err != nil { - result = append(result, fmt.Sprintf(" [storeId:%d,skuCode:%s]"+err.Error(), storeId, v)) - } - } - return result -} - // GetOrderTotalShopMoney 获取门店结算信息 func GetOrderTotalShopMoney(appOrgCode string, vendorStoreID string, start, end time.Time) (map[string]string, error) { if appOrgCode == "" || vendorStoreID == "" { From 60c86f2d5b37bb6fbf81c021207a0537c2f1e498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 2 Aug 2023 20:16:20 +0800 Subject: [PATCH 06/45] 1 --- business/jxstore/misc/misc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 9e00a7375..dd488676f 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -1105,8 +1105,8 @@ func syncStoreSkuTao(beijin []int) { switch step { case 0: if beego.BConfig.RunMode != "jxgy" { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+3], false)) - _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+3], false, nil, nil, syncFlag, true, true) + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+10], false)) + _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+10], false, nil, nil, syncFlag, true, true) errList.AddErr(err) } case 1: @@ -1117,7 +1117,7 @@ func syncStoreSkuTao(beijin []int) { return retVal, err }, []int{0, 1}) tasksch.HandleTask(task, nil, true).Run() - syncLen += 3 + syncLen += 10 } func doDailyWork2() { From 75babb59202dba4d4bc15fca739d6b3bab322181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 09:02:07 +0800 Subject: [PATCH 07/45] 1 --- business/jxstore/misc/misc.go | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index dd488676f..9ccbf2dc4 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -723,21 +723,14 @@ func Init() { "06:30:00", "07:30:00", "08:30:00", - "09:35:00", - "10:30:00", - "11:30:00", - "12:30:00", - "13:30:00", - "14:30:00", - "15:30:00", - "16:30:00", - "17:30:00", - "18:30:00", - "19:00:00", - "20:30:00", - "21:30:00", - "22:30:00", - "23:30:00", + "09:10:00", + "09:40:00", + "10:10:00", + "10:40:00", + "11:10:00", + "11:40:00", + "12:10:00", + "12:40:00", }) } From afba6af10c953558e552a99797a8229d6ccfd8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 10:25:32 +0800 Subject: [PATCH 08/45] 1 --- business/jxstore/misc/misc.go | 133 ++-------------------------------- 1 file changed, 5 insertions(+), 128 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 9ccbf2dc4..a892c7d04 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -283,130 +283,7 @@ func Init() { if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuList_tao", func() { var hangzhou = []int{ - 669053, - 103074, - 668985, - 103065, - 668960, - 668959, - 668953, - 103029, - 668949, - 103002, - 102999, - 668932, - 668931, - 668917, - 102969, - 102966, - 668909, - 668908, - 668905, - 668901, - 102946, - 102939, - 102938, - 668894, - 102934, - 102933, - 102930, - 668884, - 668878, - 102903, - 668757, - 102293, - 668622, - 668618, - 668592, - 100945, - 668583, - 100943, - 100905, - 668498, - 668476, - 668462, - 100309, - 100299, - 100292, - 668276, - 668180, - 667320, - 667237, - 667036, - 668691, - 668673, - 668282, - 667447, - 667354, - 667335, - 667319, - 667269, - 667268, - 667267, - 667260, - 667132, - 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, - 100097, - 100096, - 100095, - 100093, - 100092, - 100089, - 100087, - 100086, - 100085, - 100083, - 100082, - 100081, - 100079, - 100078, - 100786, - 100746, - 102072, - 102069, - 101870, - 101869, - 101868, - 100744, - 100705, - 100400, - 100111, - 100108, - 100106, - 100104, - 100103, - 100100, - 101867, - 101866, - 101865, - 100956, - 100930, - 100871, - + 669053, 103074, 668985, 103065, 668960, 668959, 668953, 103029, 668949, 103002, 102999, 668932, 668931, 668917, 102969, 102966, 668909, 668908, 668905, 668901, 102946, 102939, 102938, 668894, 102934, 102933, 102930, 668884, 668878, 102903, 668757, 102293, 668622, 668618, 668592, 100945, 668583, 100943, 100905, 668498, 668476, 668462, 100309, 100299, 100292, 668276, 668180, 667320, 667237, 667036, 668691, 668673, 668282, 667447, 667354, 667319, 667269, 667268, 667267, 667260, 667132, 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, 100097, 100096, 100095, 100093, 100092, 100089, 100087, 100086, 100085, 100083, 100082, 100079, 100078, 100786, 100746, 102072, 102069, 101870, 101869, 101868, 100744, 100705, 100400, 100111, 100108, 100106, 100104, 100103, 100102, 100100, 101867, 101866, 101865, 100956, 100930, 100871, // 杭州 //669073, //668930, @@ -726,7 +603,7 @@ func Init() { "09:10:00", "09:40:00", "10:10:00", - "10:40:00", + "10:30:00", "11:10:00", "11:40:00", "12:10:00", @@ -1098,8 +975,8 @@ func syncStoreSkuTao(beijin []int) { switch step { case 0: if beego.BConfig.RunMode != "jxgy" { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+10], false)) - _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+10], false, nil, nil, syncFlag, true, true) + 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: @@ -1110,7 +987,7 @@ func syncStoreSkuTao(beijin []int) { return retVal, err }, []int{0, 1}) tasksch.HandleTask(task, nil, true).Run() - syncLen += 10 + syncLen += 5 } func doDailyWork2() { From 2762f106499295aadbebe936e827a8e8e120ff00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 11:18:17 +0800 Subject: [PATCH 09/45] 1 --- business/jxstore/misc/misc.go | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index a892c7d04..61d27a929 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -591,22 +591,7 @@ func Init() { } syncStoreSkuTao(hangzhou) }, []string{ - "00:30:00", - "01:30:00", - "02:30:00", - "03:30:00", - "04:30:00", - "05:30:00", - "06:30:00", - "07:30:00", - "08:30:00", - "09:10:00", - "09:40:00", - "10:10:00", - "10:30:00", - "11:10:00", - "11:40:00", - "12:10:00", + "11:22:00", "12:40:00", }) } @@ -975,8 +960,8 @@ func syncStoreSkuTao(beijin []int) { 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) + ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+20], false)) + _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+20], false, nil, nil, syncFlag, true, true) errList.AddErr(err) } case 1: @@ -987,7 +972,7 @@ func syncStoreSkuTao(beijin []int) { return retVal, err }, []int{0, 1}) tasksch.HandleTask(task, nil, true).Run() - syncLen += 5 + syncLen += 20 } func doDailyWork2() { From 052905bd6f45c3da79c38b2f86bead7b93a977d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 15:42:11 +0800 Subject: [PATCH 10/45] 1 --- business/jxstore/misc/misc.go | 549 +++++++++++++++++----------------- 1 file changed, 279 insertions(+), 270 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 61d27a929..37ff0f3b5 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -283,7 +283,6 @@ func Init() { if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuList_tao", func() { var hangzhou = []int{ - 669053, 103074, 668985, 103065, 668960, 668959, 668953, 103029, 668949, 103002, 102999, 668932, 668931, 668917, 102969, 102966, 668909, 668908, 668905, 668901, 102946, 102939, 102938, 668894, 102934, 102933, 102930, 668884, 668878, 102903, 668757, 102293, 668622, 668618, 668592, 100945, 668583, 100943, 100905, 668498, 668476, 668462, 100309, 100299, 100292, 668276, 668180, 667320, 667237, 667036, 668691, 668673, 668282, 667447, 667354, 667319, 667269, 667268, 667267, 667260, 667132, 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, 100097, 100096, 100095, 100093, 100092, 100089, 100087, 100086, 100085, 100083, 100082, 100079, 100078, 100786, 100746, 102072, 102069, 101870, 101869, 101868, 100744, 100705, 100400, 100111, 100108, 100106, 100104, 100103, 100102, 100100, 101867, 101866, 101865, 100956, 100930, 100871, // 杭州 //669073, //668930, @@ -324,275 +323,285 @@ func Init() { //// 广州 // 668871, 668602, 668575, 668262, 103425, 101755, 101176, 100557, 100369, 100361, 100351, 100350, //成都 - //669172, - //669171, - //669170, - //669169, - //669168, - //669165, - //669164, - //669163, - //669162, - //669157, - //669156, - //669155, - //669154, - //669153, - //669150, - //669149, - //669148, - //669147, - //669146, - //669144, - //669141, - //669139, - //669138, - //669137, - //669134, - //669132, - //669127, - //669124, - //669122, - //669121, - //669120, - //669119, - //669114, - //669113, - //669111, - //669110, - //669109, - //669108, - //669107, - //669106, - //669103, - //669100, - //669099, - //669098, - //669097, - //669096, - //669095, - //669094, - //669093, - //669092, - //669091, - //669087, - //669086, - //669085, - //669084, - //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, - //669031, - //669027, - //669025, - //669024, - //669022, - //669021, - //669020, - //669017, - //669015, - //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, + 669172, + 669171, + 669170, + 669169, + 669168, + 669165, + 669164, + 669163, + 669162, + 669157, + 669156, + 669155, + 669154, + 669153, + 669150, + 669149, + 669148, + 669147, + 669146, + 669144, + 669141, + 669139, + 669138, + 669137, + 669134, + 669132, + 669127, + 669124, + 669122, + 669121, + 669120, + 669119, + 669114, + 669113, + 669111, + 669110, + 669109, + 669108, + 669107, + 669106, + 669103, + 669100, + 669099, + 669098, + 669097, + 669096, + 669095, + 669094, + 669093, + 669092, + 669091, + 669087, + 669086, + 669085, + 669084, + 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, + 669031, + 669027, + 669025, + 669024, + 669022, + 669021, + 669020, + 669017, + 669015, + 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(hangzhou) }, []string{ - "11:22:00", - "12:40:00", + "11:30:00", + "13:30:00", + "15:46:00", + "17:30:00", + "19:30:00", + "21:30:00", + "23:30:00", + "01:30:00", + "03:30:00", + "05:30:00", + "07:30:00", + "09:30:00", }) } @@ -960,8 +969,8 @@ func syncStoreSkuTao(beijin []int) { switch step { case 0: if beego.BConfig.RunMode != "jxgy" { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+20], false)) - _, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+20], false, nil, nil, syncFlag, true, true) + 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: @@ -972,7 +981,7 @@ func syncStoreSkuTao(beijin []int) { return retVal, err }, []int{0, 1}) tasksch.HandleTask(task, nil, true).Run() - syncLen += 20 + syncLen += 5 } func doDailyWork2() { From 4780d3cc50453a561a1782c46a8d8ebf433bf7d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 16:09:22 +0800 Subject: [PATCH 11/45] 1 --- business/jxstore/misc/misc.go | 68 +++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 37ff0f3b5..f8c75fda4 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -323,39 +323,39 @@ func Init() { //// 广州 // 668871, 668602, 668575, 668262, 103425, 101755, 101176, 100557, 100369, 100361, 100351, 100350, //成都 - 669172, - 669171, - 669170, - 669169, - 669168, - 669165, - 669164, - 669163, - 669162, - 669157, - 669156, - 669155, - 669154, - 669153, - 669150, - 669149, - 669148, - 669147, - 669146, - 669144, - 669141, - 669139, - 669138, - 669137, - 669134, - 669132, - 669127, - 669124, - 669122, - 669121, - 669120, - 669119, - 669114, + //669172, + //669171, + //669170, + //669169, + //669168, + //669165, + //669164, + //669163, + //669162, + //669157, + //669156, + //669155, + //669154, + //669153, + //669150, + //669149, + //669148, + //669147, + //669146, + //669144, + //669141, + //669139, + //669138, + //669137, + //669134, + //669132, + //669127, + //669124, + //669122, + //669121, + //669120, + //669119, + //669114, 669113, 669111, 669110, @@ -592,7 +592,7 @@ func Init() { }, []string{ "11:30:00", "13:30:00", - "15:46:00", + "16:15:00", "17:30:00", "19:30:00", "21:30:00", From acbf6fafb2f6861e84d8eb3b4d146f0972cf3fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 16:36:57 +0800 Subject: [PATCH 12/45] 1 --- business/jxstore/misc/misc.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index f8c75fda4..09dea7868 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -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) From 7bfbc34d8dc606dfc349c7fb3653f55977330237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 17:35:12 +0800 Subject: [PATCH 13/45] 1 --- business/jxstore/misc/misc.go | 87 +++-------------------------------- 1 file changed, 7 insertions(+), 80 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 09dea7868..18a2c868b 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -274,88 +274,15 @@ func Init() { }, 5*time.Second, 10*time.Minute) // 抖音更新门店商品 ,接口收费暂不使用 - //if beego.BConfig.RunMode != "jxgy" { - // ScheduleTimerFunc("RefreshSyncSkuList", func() { - // syncStoreSkuTiktok() - // }, []string{"13:00:00"}) - //} + if beego.BConfig.RunMode != "jxgy" { + ScheduleTimerFunc("RefreshSyncSkuList", func() { + syncStoreSkuTiktok() + }, []string{"13:00:00"}) + } // 淘鲜达更新门店商品 ,接口收费暂不使用 if beego.BConfig.RunMode != "jxgy" { - ScheduleTimerFunc("RefreshSyncSkuList_tao", func() { + ScheduleTimerFunc("RefreshSyncSkuListTao", func() { var hangzhou = []int{ - // 杭州 - //669073, - //668930, - //668922, - //668916, - //668915, - //668756, - //668705, - //668702, - //668681, - //668422, - //668417, - //668191, - //667996, - //667991, - //667985, - //667553, - //667044, - //103083, - //103073, - //103033, - //103032, - //102963, - //102923, - //102785, - //102594, - //102578, - //102329, - //101734, - //100229, - //100224, - //100217, - //100215, - //100210, - //100206, - //// 武汉 - //668352, 103200, 102958, 100887, 100236, - //// 广州 - // 668871, 668602, 668575, 668262, 103425, 101755, 101176, 100557, 100369, 100361, 100351, 100350, - //成都 - //669172, - //669171, - //669170, - //669169, - //669168, - //669165, - //669164, - //669163, - //669162, - //669157, - //669156, - //669155, - //669154, - //669153, - //669150, - //669149, - //669148, - //669147, - //669146, - //669144, - //669141, - //669139, - //669138, - //669137, - //669134, - //669132, - //669127, - //669124, - //669122, - //669121, - //669120, - //669119, - //669114, 669113, 669111, 669110, @@ -592,7 +519,7 @@ func Init() { }, []string{ "11:30:00", "13:30:00", - "16:45:00", + "17:38:00", "17:30:00", "19:30:00", "21:30:00", From 4c2badb260366ba40b8874525968ec8a9315c7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:12:24 +0800 Subject: [PATCH 14/45] 1 --- business/jxstore/cms/store_sku.go | 1 - business/jxstore/misc/misc.go | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 595c650f5..19ecd8e22 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -1744,7 +1744,6 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku } } else { flag, _ := doStoreSkuAudit(ctx, storeIDs, skuBindInfos) - globals.SugarLogger.Debugf("========falg := %s", utils.Format4Output(flag, false)) if !flag { var num int64 db := dao.GetDB() diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 18a2c868b..7acde8004 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -274,11 +274,11 @@ func Init() { }, 5*time.Second, 10*time.Minute) // 抖音更新门店商品 ,接口收费暂不使用 - if beego.BConfig.RunMode != "jxgy" { - ScheduleTimerFunc("RefreshSyncSkuList", func() { - syncStoreSkuTiktok() - }, []string{"13:00:00"}) - } + //if beego.BConfig.RunMode != "jxgy" { + // ScheduleTimerFunc("RefreshSyncSkuList", func() { + // syncStoreSkuTiktok() + // }, []string{"13:00:00"}) + //} // 淘鲜达更新门店商品 ,接口收费暂不使用 if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuListTao", func() { @@ -515,11 +515,11 @@ func Init() { 100123, 100115, } + globals.SugarLogger.Debugf("==================================1") syncStoreSkuTao(hangzhou) }, []string{ "11:30:00", "13:30:00", - "17:38:00", "17:30:00", "19:30:00", "21:30:00", @@ -888,6 +888,7 @@ var syncLen = 0 // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao(beijin []int) { ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", "开始了:"+utils.Format4Output(beijin[syncLen:syncLen+5], false)) + globals.SugarLogger.Debugf("==================================2") syncFlag := 0 task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { @@ -897,6 +898,7 @@ func syncStoreSkuTao(beijin []int) { switch step { case 0: ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)) + globals.SugarLogger.Debugf("==================================1 := %s", 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: From 80804b476a7b6e9ce15b13d128bf28672716c8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:12:55 +0800 Subject: [PATCH 15/45] 1 --- business/jxstore/misc/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 7acde8004..eb8a87bed 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -520,7 +520,7 @@ func Init() { }, []string{ "11:30:00", "13:30:00", - "17:30:00", + "18:16:00", "19:30:00", "21:30:00", "23:30:00", From 97e8a63d68720dd0dbcac970f218f11885f29667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:20:56 +0800 Subject: [PATCH 16/45] 1 --- business/jxstore/misc/misc.go | 501 +++++++++++++++++----------------- main.go | 3 + 2 files changed, 253 insertions(+), 251 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index eb8a87bed..a6be2df54 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -165,6 +165,7 @@ func IsImportantTaskRunning(taskName string) bool { } func Init() { + globals.SugarLogger.Debugf("==================2") if globals.IsProductEnv() { //ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2) @@ -280,257 +281,255 @@ func Init() { // }, []string{"13:00:00"}) //} // 淘鲜达更新门店商品 ,接口收费暂不使用 - if beego.BConfig.RunMode != "jxgy" { - ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - var hangzhou = []int{ - 669113, - 669111, - 669110, - 669109, - 669108, - 669107, - 669106, - 669103, - 669100, - 669099, - 669098, - 669097, - 669096, - 669095, - 669094, - 669093, - 669092, - 669091, - 669087, - 669086, - 669085, - 669084, - 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, - 669031, - 669027, - 669025, - 669024, - 669022, - 669021, - 669020, - 669017, - 669015, - 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, - } - globals.SugarLogger.Debugf("==================================1") - syncStoreSkuTao(hangzhou) - }, []string{ - "11:30:00", - "13:30:00", - "18:16:00", - "19:30:00", - "21:30:00", - "23:30:00", - "01:30:00", - "03:30:00", - "05:30:00", - "07:30:00", - "09:30:00", - }) - } + ScheduleTimerFunc("RefreshSyncSkuListTao", func() { + var hangzhou = []int{ + 669113, + 669111, + 669110, + 669109, + 669108, + 669107, + 669106, + 669103, + 669100, + 669099, + 669098, + 669097, + 669096, + 669095, + 669094, + 669093, + 669092, + 669091, + 669087, + 669086, + 669085, + 669084, + 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, + 669031, + 669027, + 669025, + 669024, + 669022, + 669021, + 669020, + 669017, + 669015, + 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, + } + globals.SugarLogger.Debugf("==================================1") + syncStoreSkuTao(hangzhou) + }, []string{ + "11:30:00", + "13:30:00", + "18:22:00", + "19:30:00", + "21:30:00", + "23:30:00", + "01:30:00", + "03:30:00", + "05:30:00", + "07:30:00", + "09:30:00", + }) // 刷新抖音门店token if beego.BConfig.RunMode != "jxgy" { diff --git a/main.go b/main.go index c48dcc0d0..6dd958b69 100644 --- a/main.go +++ b/main.go @@ -88,6 +88,7 @@ func Init() { yb.CurPurchaseHandler.StartRefreshComment() jdshop.CurPurchaseHandler.StartRefreshComment() } + globals.SugarLogger.Debugf("==================3") misc.Init() enterprise.Init() // 初始化enterprise key @@ -135,7 +136,9 @@ func checkCmdFlags() bool { } func main() { + globals.SugarLogger.Debugf("==================-1") if !checkCmdFlags() { + globals.SugarLogger.Debugf("==================0") Init() if err := tasks.RefreshWeixinToken(); err != nil { globals.SugarLogger.Errorf("RefreshWeixinToken failed with error:%s", err) From 1a98736d1de39b48b3a529c6148b5bff3eafde48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:21:23 +0800 Subject: [PATCH 17/45] 1 --- business/jxstore/misc/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index a6be2df54..e63abf194 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -520,7 +520,7 @@ func Init() { }, []string{ "11:30:00", "13:30:00", - "18:22:00", + "18:25:00", "19:30:00", "21:30:00", "23:30:00", From 891cc71b146fb95710d5fbc7a946c273fec1d590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:28:12 +0800 Subject: [PATCH 18/45] 1 --- business/jxstore/misc/misc.go | 7 +++++-- main.go | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index e63abf194..8ead3055f 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -165,8 +165,9 @@ func IsImportantTaskRunning(taskName string) bool { } func Init() { - globals.SugarLogger.Debugf("==================2") + globals.SugarLogger.Debugf("========= %s", utils.Format4Output(globals.IsProductEnv(), false)) if globals.IsProductEnv() { + globals.SugarLogger.Debugf("=========2 %s", utils.Format4Output(globals.IsProductEnv(), false)) //ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2) //京东的订单信息解密密钥获取 @@ -281,6 +282,8 @@ func Init() { // }, []string{"13:00:00"}) //} // 淘鲜达更新门店商品 ,接口收费暂不使用 + globals.SugarLogger.Debugf("========= %s", utils.Format4Output(beego.BConfig.RunMode, false)) + ScheduleTimerFunc("RefreshSyncSkuListTao", func() { var hangzhou = []int{ 669113, @@ -520,7 +523,7 @@ func Init() { }, []string{ "11:30:00", "13:30:00", - "18:25:00", + "18:30:00", "19:30:00", "21:30:00", "23:30:00", diff --git a/main.go b/main.go index 6dd958b69..c48dcc0d0 100644 --- a/main.go +++ b/main.go @@ -88,7 +88,6 @@ func Init() { yb.CurPurchaseHandler.StartRefreshComment() jdshop.CurPurchaseHandler.StartRefreshComment() } - globals.SugarLogger.Debugf("==================3") misc.Init() enterprise.Init() // 初始化enterprise key @@ -136,9 +135,7 @@ func checkCmdFlags() bool { } func main() { - globals.SugarLogger.Debugf("==================-1") if !checkCmdFlags() { - globals.SugarLogger.Debugf("==================0") Init() if err := tasks.RefreshWeixinToken(); err != nil { globals.SugarLogger.Errorf("RefreshWeixinToken failed with error:%s", err) From a13e3cfb824218451dba9099f4dbbf34040bc4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:34:18 +0800 Subject: [PATCH 19/45] 1 --- business/jxstore/misc/misc.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 8ead3055f..0430a6410 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -165,9 +165,7 @@ func IsImportantTaskRunning(taskName string) bool { } func Init() { - globals.SugarLogger.Debugf("========= %s", utils.Format4Output(globals.IsProductEnv(), false)) if globals.IsProductEnv() { - globals.SugarLogger.Debugf("=========2 %s", utils.Format4Output(globals.IsProductEnv(), false)) //ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2) //京东的订单信息解密密钥获取 @@ -281,9 +279,8 @@ func Init() { // syncStoreSkuTiktok() // }, []string{"13:00:00"}) //} - // 淘鲜达更新门店商品 ,接口收费暂不使用 - globals.SugarLogger.Debugf("========= %s", utils.Format4Output(beego.BConfig.RunMode, false)) + // 淘鲜达更新门店商品 ,接口收费暂不使用 ScheduleTimerFunc("RefreshSyncSkuListTao", func() { var hangzhou = []int{ 669113, @@ -521,17 +518,7 @@ func Init() { globals.SugarLogger.Debugf("==================================1") syncStoreSkuTao(hangzhou) }, []string{ - "11:30:00", - "13:30:00", - "18:30:00", - "19:30:00", - "21:30:00", - "23:30:00", - "01:30:00", - "03:30:00", - "05:30:00", - "07:30:00", - "09:30:00", + "18:37:00", }) // 刷新抖音门店token From e561f3622fb87e887c0564b9afd36f4755f1422a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 18:40:14 +0800 Subject: [PATCH 20/45] 1 --- business/jxstore/misc/misc.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 0430a6410..656c6483b 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -515,10 +515,20 @@ func Init() { 100123, 100115, } - globals.SugarLogger.Debugf("==================================1") syncStoreSkuTao(hangzhou) }, []string{ - "18:37:00", + "18:50:00", + "20:50:00", + "22:50:00", + "00:50:00", + "02:50:00", + "04:50:00", + "06:50:00", + "08:50:00", + "10:50:00", + "12:50:00", + "14:50:00", + "16:50:00", }) // 刷新抖音门店token @@ -876,8 +886,6 @@ var syncLen = 0 // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao(beijin []int) { - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", "开始了:"+utils.Format4Output(beijin[syncLen:syncLen+5], false)) - globals.SugarLogger.Debugf("==================================2") syncFlag := 0 task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { @@ -887,7 +895,6 @@ func syncStoreSkuTao(beijin []int) { switch step { case 0: ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)) - globals.SugarLogger.Debugf("==================================1 := %s", 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: From 570b0925435c13bd6251643433b3a7378c1f3b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:00:51 +0800 Subject: [PATCH 21/45] 1 --- business/jxstore/misc/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 656c6483b..c8a5c6353 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -519,7 +519,7 @@ func Init() { }, []string{ "18:50:00", "20:50:00", - "22:50:00", + "22:10:00", "00:50:00", "02:50:00", "04:50:00", From 14e6cd92b40a1b392f969e5384f43f5eb710034a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:13:48 +0800 Subject: [PATCH 22/45] 1 --- business/jxstore/cms/sync.go | 3 +++ business/jxstore/misc/misc.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index 5ca595ff7..d7ee63754 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -486,6 +486,9 @@ 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) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index c8a5c6353..012694a32 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -519,7 +519,7 @@ func Init() { }, []string{ "18:50:00", "20:50:00", - "22:10:00", + "22:18:00", "00:50:00", "02:50:00", "04:50:00", From ec2be036e78115f860f59e1256e6e76a14f24800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:24:32 +0800 Subject: [PATCH 23/45] 1 --- business/jxstore/misc/misc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 012694a32..6544ab4e8 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -519,7 +519,7 @@ func Init() { }, []string{ "18:50:00", "20:50:00", - "22:18:00", + "22:22:00", "00:50:00", "02:50:00", "04:50:00", @@ -887,6 +887,7 @@ var syncLen = 0 // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao(beijin []int) { syncFlag := 0 + globals.SugarLogger.Debugf("===========beijin %s", utils.Format4Output(beijin, false)) task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) @@ -894,6 +895,7 @@ func syncStoreSkuTao(beijin []int) { db := dao.GetDB() switch step { case 0: + globals.SugarLogger.Debugf("===========beijin %s", utils.Format4Output(beijin, false)) 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) From 7d1bf776dcbbcfeec24fd21198a9c9e7bcaf4e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:24:40 +0800 Subject: [PATCH 24/45] 1 --- business/jxstore/misc/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 6544ab4e8..82bc88dea 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -519,7 +519,7 @@ func Init() { }, []string{ "18:50:00", "20:50:00", - "22:22:00", + "22:28:00", "00:50:00", "02:50:00", "04:50:00", From f7d8836d6dffea1ccd5ba91e18f367a83b232876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:40:52 +0800 Subject: [PATCH 25/45] 1 --- business/jxstore/misc/misc.go | 469 +++++++++++++++++----------------- 1 file changed, 235 insertions(+), 234 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 82bc88dea..75b59e7c7 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -164,6 +164,240 @@ func IsImportantTaskRunning(taskName string) bool { return tasksch.IsTaskRunning(taskID) } +var hangzhou = []int{ + 669113, + 669111, + 669110, + 669109, + 669108, + 669107, + 669106, + 669103, + 669100, + 669099, + 669098, + 669097, + 669096, + 669095, + 669094, + 669093, + 669092, + 669091, + 669087, + 669086, + 669085, + 669084, + 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, + 669031, + 669027, + 669025, + 669024, + 669022, + 669021, + 669020, + 669017, + 669015, + 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, +} + func Init() { if globals.IsProductEnv() { //ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2) @@ -282,244 +516,11 @@ func Init() { // 淘鲜达更新门店商品 ,接口收费暂不使用 ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - var hangzhou = []int{ - 669113, - 669111, - 669110, - 669109, - 669108, - 669107, - 669106, - 669103, - 669100, - 669099, - 669098, - 669097, - 669096, - 669095, - 669094, - 669093, - 669092, - 669091, - 669087, - 669086, - 669085, - 669084, - 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, - 669031, - 669027, - 669025, - 669024, - 669022, - 669021, - 669020, - 669017, - 669015, - 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(hangzhou) }, []string{ "18:50:00", "20:50:00", - "22:28:00", + "22:43:00", "00:50:00", "02:50:00", "04:50:00", From e1d662143b21fb8718abf770c0af45416629efa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:47:57 +0800 Subject: [PATCH 26/45] 1 --- business/jxstore/misc/misc.go | 40 +++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 75b59e7c7..f634866b0 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -514,23 +514,31 @@ func Init() { // }, []string{"13:00:00"}) //} + if beego.BConfig.RunMode != "jxgy" { + ScheduleTimerFunc("RefreshSyncSkuListTao", func() { + syncStoreSkuTao(hangzhou[0:20]) + }, []string{ + "22:50:00", + }) + } + // 淘鲜达更新门店商品 ,接口收费暂不使用 - ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - syncStoreSkuTao(hangzhou) - }, []string{ - "18:50:00", - "20:50:00", - "22:43:00", - "00:50:00", - "02:50:00", - "04:50:00", - "06:50:00", - "08:50:00", - "10:50:00", - "12:50:00", - "14:50:00", - "16:50:00", - }) + //ScheduleTimerFunc("RefreshSyncSkuListTao", func() { + // syncStoreSkuTao(hangzhou) + //}, []string{ + // "18:50:00", + // "20:50:00", + // "22:43:00", + // "00:50:00", + // "02:50:00", + // "04:50:00", + // "06:50:00", + // "08:50:00", + // "10:50:00", + // "12:50:00", + // "14:50:00", + // "16:50:00", + //}) // 刷新抖音门店token if beego.BConfig.RunMode != "jxgy" { From 1e1f1495700daa457360e568f08698e928c6c874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 3 Aug 2023 22:49:12 +0800 Subject: [PATCH 27/45] 1 --- business/jxstore/misc/misc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index f634866b0..afda7929f 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -514,11 +514,13 @@ func Init() { // }, []string{"13:00:00"}) //} + globals.SugarLogger.Debugf("======== : %s", utils.Format4Output(hangzhou[0:20], false)) if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - syncStoreSkuTao(hangzhou[0:20]) + globals.SugarLogger.Debugf("========2 : %s", utils.Format4Output(hangzhou[0:20], false)) + syncStoreSkuTao(hangzhou[0:50]) }, []string{ - "22:50:00", + "22:51:00", }) } From 3d7c3e99df31a414ce8688636411bf4e1b495bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 09:55:02 +0800 Subject: [PATCH 28/45] 1 --- business/jxstore/misc/misc.go | 43 ++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index afda7929f..c5b2d6166 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -165,16 +165,16 @@ func IsImportantTaskRunning(taskName string) bool { } var hangzhou = []int{ - 669113, - 669111, - 669110, - 669109, - 669108, - 669107, - 669106, - 669103, - 669100, - 669099, + //669113, + //669111, + //669110, + //669109, + //669108, + //669107, + //669106, + //669103, + //669100, + //669099, 669098, 669097, 669096, @@ -514,13 +514,24 @@ func Init() { // }, []string{"13:00:00"}) //} - globals.SugarLogger.Debugf("======== : %s", utils.Format4Output(hangzhou[0:20], false)) if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - globals.SugarLogger.Debugf("========2 : %s", utils.Format4Output(hangzhou[0:20], false)) syncStoreSkuTao(hangzhou[0:50]) }, []string{ - "22:51:00", + "10:05:00", + "12:05:00", + "14:05:00", + "16:05:00", + "18:05:00", + "20:05:00", + "22:05:00", + "00:05:00", + "01:05:00", + "02:05:00", + "04:05:00", + "06:05:00", + "07:05:00", + "0:05:00", }) } @@ -898,7 +909,6 @@ var syncLen = 0 // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao(beijin []int) { syncFlag := 0 - globals.SugarLogger.Debugf("===========beijin %s", utils.Format4Output(beijin, false)) task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) @@ -906,8 +916,9 @@ func syncStoreSkuTao(beijin []int) { db := dao.GetDB() switch step { case 0: - globals.SugarLogger.Debugf("===========beijin %s", utils.Format4Output(beijin, false)) - ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)) + if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], false)); err != nil { + globals.SugarLogger.Debugf("SendUserMessage := %s", utils.Format4Output(err, 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: From 669b13b609d32123e72bfc76af2bac3b0d08db80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 09:56:53 +0800 Subject: [PATCH 29/45] 1 --- business/jxstore/misc/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index c5b2d6166..e9fc15077 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -531,7 +531,7 @@ func Init() { "04:05:00", "06:05:00", "07:05:00", - "0:05:00", + "00:05:00", }) } From 3797a132f55cd8582bef5d8b5d6729267ef8d4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 09:57:10 +0800 Subject: [PATCH 30/45] 1 --- business/jxstore/misc/misc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index e9fc15077..67f114900 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -531,7 +531,7 @@ func Init() { "04:05:00", "06:05:00", "07:05:00", - "00:05:00", + "08:05:00", }) } From d45626a64a588469a2f5896b5576b726859a9036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 12:49:46 +0800 Subject: [PATCH 31/45] 1 --- .../jxcallback/scheduler/defsch/defsch_afs.go | 16 +++++++++++--- business/jxstore/misc/misc.go | 22 +++---------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch_afs.go b/business/jxcallback/scheduler/defsch/defsch_afs.go index a762a2935..4a7e855b3 100644 --- a/business/jxcallback/scheduler/defsch/defsch_afs.go +++ b/business/jxcallback/scheduler/defsch/defsch_afs.go @@ -32,9 +32,19 @@ func (s *DefScheduler) OnAfsOrderNew(order *model.AfsOrder, isPending bool) (err } } } - msghub.OnNewWait4ApproveAfsOrder(order) - weixinmsg.NotifyAfsOrderStatus(order) - push.NotifyAfsOrder(order) + + if order != nil && order.VendorID == model.VendorIDTaoVegetable { + result, _ := dao.GetAfsOrders(dao.GetDB(), model.VendorIDTaoVegetable, order.VendorOrderID, "") + if len(result) <= model.YES { + msghub.OnNewWait4ApproveAfsOrder(order) + weixinmsg.NotifyAfsOrderStatus(order) + push.NotifyAfsOrder(order) + } + } else { + msghub.OnNewWait4ApproveAfsOrder(order) + weixinmsg.NotifyAfsOrderStatus(order) + push.NotifyAfsOrder(order) + } // 京西云打印机打印数据-如果门店使用京西打印机才使用如下代码块 store, err := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 67f114900..7a84496eb 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -2,6 +2,7 @@ package misc import ( "fmt" + "git.rosy.net.cn/jx-callback/business/jxutils/enterprise_msg" "sync" "time" @@ -519,7 +520,7 @@ func Init() { syncStoreSkuTao(hangzhou[0:50]) }, []string{ "10:05:00", - "12:05:00", + "12:55:00", "14:05:00", "16:05:00", "18:05:00", @@ -535,24 +536,6 @@ func Init() { }) } - // 淘鲜达更新门店商品 ,接口收费暂不使用 - //ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - // syncStoreSkuTao(hangzhou) - //}, []string{ - // "18:50:00", - // "20:50:00", - // "22:43:00", - // "00:50:00", - // "02:50:00", - // "04:50:00", - // "06:50:00", - // "08:50:00", - // "10:50:00", - // "12:50:00", - // "14:50:00", - // "16:50:00", - //}) - // 刷新抖音门店token if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFuncByInterval(func() { @@ -919,6 +902,7 @@ func syncStoreSkuTao(beijin []int) { if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], 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) errList.AddErr(err) case 1: From 28372ed7526ebfda35753ff90ffc3abf8d0dbe5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 13:51:30 +0800 Subject: [PATCH 32/45] 1 --- business/jxstore/misc/misc.go | 479 +++++++++++++++++----------------- 1 file changed, 241 insertions(+), 238 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 7a84496eb..a3bab591f 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -165,240 +165,6 @@ func IsImportantTaskRunning(taskName string) bool { return tasksch.IsTaskRunning(taskID) } -var hangzhou = []int{ - //669113, - //669111, - //669110, - //669109, - //669108, - //669107, - //669106, - //669103, - //669100, - //669099, - 669098, - 669097, - 669096, - 669095, - 669094, - 669093, - 669092, - 669091, - 669087, - 669086, - 669085, - 669084, - 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, - 669031, - 669027, - 669025, - 669024, - 669022, - 669021, - 669020, - 669017, - 669015, - 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, -} - func Init() { if globals.IsProductEnv() { //ScheduleTimerFunc("doDailyWork2", doDailyWork2, dailyWorkTimeList2) @@ -515,13 +281,15 @@ func Init() { // }, []string{"13:00:00"}) //} + globals.SugarLogger.Debugf("===============1") if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - syncStoreSkuTao(hangzhou[0:50]) + globals.SugarLogger.Debugf("===============2") + syncStoreSkuTao() }, []string{ "10:05:00", "12:55:00", - "14:05:00", + "13:55:00", "16:05:00", "18:05:00", "20:05:00", @@ -888,11 +656,245 @@ func syncStoreSkuTiktok() { } 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, + 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, + 669031, + 669027, + 669025, + 669024, + 669022, + 669021, + 669020, + 669017, + 669015, + 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(beijin []int) { +func syncStoreSkuTao() { syncFlag := 0 - task := tasksch.NewParallelTask("同步京西商品到淘鲜达平台,方案二使用", nil, jxcontext.AdminCtx, + globals.SugarLogger.Debugf("=====================================3 %s", utils.Format4Output(beijin, false)) + task := tasksch.NewParallelTask("syncStoreSkuTao ", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) errList := errlist.New() @@ -903,6 +905,7 @@ func syncStoreSkuTao(beijin []int) { 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)) + globals.SugarLogger.Debugf("===============4") _, 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: From 1ab610a281d8fa90d0bec63df93d8b9927e7f73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 14:09:13 +0800 Subject: [PATCH 33/45] 1 --- business/jxstore/misc/misc.go | 34 +++++++++++++---------------- business/jxstore/misc/misc2_test.go | 2 +- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index a3bab591f..369ccca2b 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -287,20 +287,14 @@ func Init() { globals.SugarLogger.Debugf("===============2") syncStoreSkuTao() }, []string{ - "10:05:00", - "12:55:00", - "13:55:00", - "16:05:00", - "18:05:00", - "20:05:00", - "22:05:00", - "00:05:00", - "01:05:00", - "02:05:00", - "04:05:00", - "06:05:00", - "07:05:00", - "08:05:00", + "14:12:00", + "14:15:00", + "14:17:00", + "14:19:00", + "14:21:00", + "14:23:00", + "14:25:00", + "14:28:00", }) } @@ -892,23 +886,25 @@ var beijin = []int{ // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao() { - syncFlag := 0 + //syncFlag := 0 globals.SugarLogger.Debugf("=====================================3 %s", utils.Format4Output(beijin, false)) task := tasksch.NewParallelTask("syncStoreSkuTao ", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) errList := errlist.New() - db := dao.GetDB() + //db := dao.GetDB() switch step { case 0: + fmt.Println("111111111111111111111111111") if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], 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)) - globals.SugarLogger.Debugf("===============4") - _, 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) + //globals.SugarLogger.Debugf("===============4") + //_, 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: + fmt.Println("222222222222222222222222") errList.AddErr(err) SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID) } diff --git a/business/jxstore/misc/misc2_test.go b/business/jxstore/misc/misc2_test.go index 685ebaf00..d853217ff 100644 --- a/business/jxstore/misc/misc2_test.go +++ b/business/jxstore/misc/misc2_test.go @@ -15,4 +15,4 @@ func TestStartOrEndOpStore(t *testing.T) { func TestIssny(t *testing.T) { cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), []int{model.VendorIDMTWM, model.VendorIDJD, model.VendorIDEBAI}, nil, true, true) -} \ No newline at end of file +} From a9b60adfb1b74a61f5631fb894a5c6986ffa205a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 14:19:15 +0800 Subject: [PATCH 34/45] 1 --- business/jxstore/misc/misc.go | 39 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 369ccca2b..9d24c1d98 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -281,20 +281,29 @@ func Init() { // }, []string{"13:00:00"}) //} - globals.SugarLogger.Debugf("===============1") if beego.BConfig.RunMode != "jxgy" { ScheduleTimerFunc("RefreshSyncSkuListTao", func() { - globals.SugarLogger.Debugf("===============2") syncStoreSkuTao() }, []string{ - "14:12:00", - "14:15:00", - "14:17:00", - "14:19:00", - "14:21:00", - "14:23:00", "14:25:00", - "14:28:00", + "16:25:00", + "18:25:00", + "19:25: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", }) } @@ -886,25 +895,21 @@ var beijin = []int{ // syncStoreSkuTao 同步商品到淘鲜达 func syncStoreSkuTao() { - //syncFlag := 0 - globals.SugarLogger.Debugf("=====================================3 %s", utils.Format4Output(beijin, false)) + syncFlag := 0 task := tasksch.NewParallelTask("syncStoreSkuTao ", nil, jxcontext.AdminCtx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) errList := errlist.New() - //db := dao.GetDB() + db := dao.GetDB() switch step { case 0: - fmt.Println("111111111111111111111111111") if err := ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达消息:", utils.Format4Output(beijin[syncLen:syncLen+5], 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)) - //globals.SugarLogger.Debugf("===============4") - //_, 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) + _, 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: - fmt.Println("222222222222222222222222") errList.AddErr(err) SaveImportantTaskID(TaskNameSyncStoreSku, SpecialTaskID) } From 381b2208bf7081bd3ea2243f6ec8459eabff0162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 16:35:30 +0800 Subject: [PATCH 35/45] 1 --- business/jxstore/misc/misc.go | 7 +++---- business/partner/purchase/tao_vegetable/store_sku2.go | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 9d24c1d98..d095273eb 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -674,9 +674,9 @@ var beijin = []int{ //669097, //669096, //669095, - 669094, - 669093, - 669092, + //669094, + //669093, + //669092, 669091, 669087, 669086, @@ -910,7 +910,6 @@ func syncStoreSkuTao() { _, 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) } err = errList.GetErrListAsOne() diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 184b1f9a1..4aa9f8c7a 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -253,7 +253,10 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync updateSku.PurchaseQuantity = utils.Int64ToPointer(int64(v.MinOrderCount)) // 起购单位 } // 修改暂时不修改图片,保持效率 - //updateSku.SkuPicUrls = uploadImg(api, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg}) + updateSku.SkuPicUrls = uploadImg(api, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg}) + if updateSku.SkuPicUrls == nil { + continue + } updateSkuList = append(updateSkuList, updateSku) } From f1199a54d7033b0f54c1543abfa76fbad15306ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 4 Aug 2023 18:46:11 +0800 Subject: [PATCH 36/45] 1 --- business/jxstore/misc/misc.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index d095273eb..997649bca 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -287,8 +287,7 @@ func Init() { }, []string{ "14:25:00", "16:25:00", - "18:25:00", - "19:25:00", + "18:52:00", "20:25:00", "21:25:00", "22:25:00", @@ -681,7 +680,7 @@ var beijin = []int{ 669087, 669086, 669085, - 669084, + 669084, // zheer 669083, 669082, 669079, From 0c4a8ac8287fdf08cb2152aa2ab2409dab5034ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 7 Aug 2023 16:45:40 +0800 Subject: [PATCH 37/45] 1 --- business/jxcallback/orderman/order.go | 11 +- business/jxstore/misc/misc.go | 144 +++++++++--------- business/model/dao/tao_sku_img.go | 16 ++ business/model/sku.go | 18 +-- business/model/tao_sku_img.go | 18 +++ .../purchase/tao_vegetable/store_sku2.go | 97 +++++++++--- globals/beegodb/beegodb.go | 1 + 7 files changed, 193 insertions(+), 112 deletions(-) create mode 100644 business/model/dao/tao_sku_img.go create mode 100644 business/model/tao_sku_img.go diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 679172eec..e25da2483 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -2686,17 +2686,16 @@ func UpdateTiktokShopTotalMoney() { func UpdateTaoSettleInfo() { db := dao.GetDB() - storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDTaoVegetable}, []int{667321}, nil, -9, -1, "", "", "") + storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDTaoVegetable}, nil, nil, -9, -1, "", "", "") if err != nil { return } - globals.SugarLogger.Debugf("GetStoresMapList ========== %s", utils.Format4Output(storeMaps, false)) - timeStart := time.Now().Add(-72 * time.Hour) + timeStart := time.Now().Add(-24 * 90 * time.Hour) startTime := time.Date(timeStart.Year(), timeStart.Month(), timeStart.Day(), 0, 0, 0, 0, timeStart.Location()) + timeEnd := time.Now() endTiem := time.Date(timeEnd.Year(), timeEnd.Month(), timeEnd.Day()-1, 23, 59, 59, 0, timeStart.Location()) for _, v := range storeMaps { - globals.SugarLogger.Debugf("=============UpdateTaoSettleInfo := %s", utils.Format4Output(v, false)) settleInfo, err := tao.GetOrderTotalShopMoney(v.VendorOrgCode, v.VendorStoreID, startTime, endTiem) if err != nil { globals.SugarLogger.Errorf("获取淘鲜达结算信息异常 := %v", err) @@ -2708,7 +2707,6 @@ func UpdateTaoSettleInfo() { } for orderId2, settle := range settleInfo { - globals.SugarLogger.Debugf("=============settleInfo := %s,%s", utils.Format4Output(orderId2, false), settle) goodsOrder, err := partner.CurOrderManager.LoadOrder2(orderId2, model.VendorIDTaoVegetable) if err != nil || goodsOrder == nil { globals.SugarLogger.Debugf("门店[%d:%s],订单查询异常[%s:%v]", v.StoreID, v.StoreName, orderId2, err) @@ -2728,7 +2726,8 @@ func UpdateTaoSettleInfo() { } } } - if _, err := dao.UpdateEntity(db, v, "TotalShopMoney", "NewEarningPrice"); err != nil { + globals.SugarLogger.Debugf("更新本地订单结算信息 := %s,%d", goodsOrder.VendorOrderID, goodsOrder.TotalShopMoney) + if _, err := dao.UpdateEntity(db, goodsOrder, "TotalShopMoney", "NewEarningPrice"); err != nil { globals.SugarLogger.Errorf("更新本地订单结算信息错误 : %s", err) continue } diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 997649bca..327ba08b1 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -676,78 +676,78 @@ var beijin = []int{ //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, - 669031, - 669027, - 669025, - 669024, - 669022, - 669021, - 669020, - 669017, - 669015, - 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, + //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, diff --git a/business/model/dao/tao_sku_img.go b/business/model/dao/tao_sku_img.go new file mode 100644 index 000000000..6d206a49e --- /dev/null +++ b/business/model/dao/tao_sku_img.go @@ -0,0 +1,16 @@ +package dao + +import "git.rosy.net.cn/jx-callback/business/model" + +func GetVendorImg(skuId, vendorId int) (*model.TaoSkuImg, error) { + result := &model.TaoSkuImg{} + + sql := ` SELECT * FROM tao_sku_img WHERE sku_id = ? AND vendor_id = ?` + parma := []interface{}{skuId, vendorId} + + if err := GetRow(GetDB(), result, sql, parma); err != nil { + return nil, err + } + + return result, nil +} diff --git a/business/model/sku.go b/business/model/sku.go index e083b4254..248ebdf52 100644 --- a/business/model/sku.go +++ b/business/model/sku.go @@ -162,15 +162,15 @@ type SkuName struct { ExPrefixBegin *time.Time `orm:"null" json:"exPrefixBegin"` ExPrefixEnd *time.Time `orm:"null" json:"exPrefixEnd"` ExVendorID int `orm:"column(ex_vendor_id)" json:"exVendorID"` - BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // todo,此属性暂时没有使用,且有问题,应该是不同平台都有一个brandid - CategoryID int `orm:"column(category_id);index" json:"categoryID"` // 标准类别 - JdCategoryID int64 `orm:"column(jd_category_id)" json:"jdCategoryID"` // 这个是指对应的京东商品类别 - IsGlobal int8 `orm:"default(1)" json:"isGlobal"` // 是否是全部(全国)可见,如果否的话,可见性由SkuPlace决定 - Unit string `orm:"size(8)" json:"unit"` - SpecQuality float32 `json:"-"` // 为份必然为500,这个主要作用只是用于确保SkuName的唯一性 - SpecUnit string `orm:"size(8)" json:"-"` // 为份必然为克,这个主要作用只是用于确保SkuName的唯一性 - Price int `json:"price"` // 单位为分,标准价,不为份的就为实际标准价,为份的为每市斤价,实际还要乘质量。todo 为份的确定必须有质量 - Img string `orm:"size(512)" json:"img"` + BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // todo,此属性暂时没有使用,且有问题,应该是不同平台都有一个brandid + CategoryID int `orm:"column(category_id);index" json:"categoryID"` // 标准类别 + JdCategoryID int64 `orm:"column(jd_category_id)" json:"jdCategoryID"` // 这个是指对应的京东商品类别 + IsGlobal int8 `orm:"default(1)" json:"isGlobal"` // 是否是全部(全国)可见,如果否的话,可见性由SkuPlace决定 + Unit string `orm:"size(8)" json:"unit"` // + SpecQuality float32 `json:"-"` // 为份必然为500,这个主要作用只是用于确保SkuName的唯一性 + SpecUnit string `orm:"size(8)" json:"-"` // 为份必然为克,这个主要作用只是用于确保SkuName的唯一性 + Price int `json:"price"` // 单位为分,标准价,不为份的就为实际标准价,为份的为每市斤价,实际还要乘质量。todo 为份的确定必须有质量 + Img string `orm:"size(512)" json:"img"` // Img2 string `orm:"size(512)" json:"img2"` // 第二张图片 Img3 string `orm:"size(512)" json:"img3"` //第三张图片 Img4 string `orm:"size(512)" json:"img4"` //第三张图片 diff --git a/business/model/tao_sku_img.go b/business/model/tao_sku_img.go new file mode 100644 index 000000000..a3224a371 --- /dev/null +++ b/business/model/tao_sku_img.go @@ -0,0 +1,18 @@ +package model + +type TaoSkuImg struct { + SkuID int `orm:"column(sku_id)"` + VendorID int `orm:"column(vendor_id)" json:"vendorID"` + Img string `orm:"size(512)" json:"img"` + Img2 string `orm:"size(512)" json:"img2"` // 第二张图片 + Img3 string `orm:"size(512)" json:"img3"` //第三张图片 + Img4 string `orm:"size(512)" json:"img4"` //第三张图片 + Img5 string `orm:"size(512)" json:"img5"` //第三张图片 + DescImg string `orm:"size(512)" json:"descImg"` // 商品详情图片描述 +} + +func (*TaoSkuImg) TableUnique() [][]string { + return [][]string{ + []string{"SkuID", "VendorID"}, + } +} diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 4aa9f8c7a..fef92296b 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -253,7 +253,7 @@ func UpdateTaoVegetable(api *tao_vegetable.API, storeSkuList []*dao.StoreSkuSync updateSku.PurchaseQuantity = utils.Int64ToPointer(int64(v.MinOrderCount)) // 起购单位 } // 修改暂时不修改图片,保持效率 - updateSku.SkuPicUrls = uploadImg(api, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg}) + updateSku.SkuPicUrls = uploadImg(api, v.SkuID, model.VendorIDTaoVegetable, []string{v.Img, v.Img2, v.Img3, v.Img4, v.Img5, v.DescImg}) if updateSku.SkuPicUrls == nil { continue } @@ -323,7 +323,7 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku RichText: utils.String2Pointer(storeSku.Name), AllowAppSale: utils.Int64ToPointer(tao_vegetable.IsAllowAppSale), } - sku.SkuPicUrls = uploadImg(api, []string{storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5, storeSku.DescImg}) + sku.SkuPicUrls = uploadImg(api, storeSku.SkuID, model.VendorIDTaoVegetable, []string{storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5, storeSku.DescImg}) if sku.SkuPicUrls == nil { continue } @@ -441,34 +441,81 @@ func checkNameLength(name string, weight int, uint string) string { return lastName[0:60] } -func uploadImg(api *tao_vegetable.API, imgs []string) *string { +func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *string { + vendorImg, _ := dao.GetVendorImg(skuId, vendorId) result := make([]string, 0, 0) - for _, v := range imgs { - if v == "" { - continue - } - inputTitle := strings.LastIndex(v, "/") - title := strings.LastIndex(v, ".") - resp, err := http.Get(v) - if err != nil { - continue - } - body, _ := ioutil.ReadAll(resp.Body) - // 图片失效 - if strings.Contains(string(body), "Document not found") || len(body) == 0 { - continue - } + isCreate := false + if vendorImg == nil || (vendorImg.Img == "" && vendorImg.Img2 == "" && vendorImg.Img3 == "" && vendorImg.Img4 == "" && vendorImg.Img5 == "" && vendorImg.DescImg == "") { + isCreate = true + for i := 0; i < len(imgs); i++ { + if imgs[i] == "" { + continue + } - if newImg, _ := api.UploadImg(&request1475.AlibabaWdkPictureUploadRequest{ - PictureCategoryId: utils.Int64ToPointer(0), - Img: &body, - ImgInputTitle: utils.String2Pointer(v[inputTitle:]), - Title: utils.String2Pointer(v[inputTitle:title]), - }); newImg != "" { - result = append(result, newImg) + inputTitle := strings.LastIndex(imgs[i], "/") + title := strings.LastIndex(imgs[i], ".") + resp, err := http.Get(imgs[i]) + if err != nil { + continue + } + body, _ := ioutil.ReadAll(resp.Body) + // 图片失效 + if strings.Contains(string(body), "Document not found") || len(body) == 0 { + continue + } + newImg, _ := api.UploadImg(&request1475.AlibabaWdkPictureUploadRequest{ + PictureCategoryId: utils.Int64ToPointer(0), + Img: &body, + ImgInputTitle: utils.String2Pointer(imgs[i][inputTitle:]), + Title: utils.String2Pointer(imgs[i][inputTitle:title]), + }) + if newImg != "" { + result = append(result, newImg) + } + + switch i { + case 0: + vendorImg.Img = newImg + case 1: + vendorImg.Img2 = newImg + case 2: + vendorImg.Img3 = newImg + case 3: + vendorImg.Img4 = newImg + case 4: + vendorImg.Img5 = newImg + case 5: + vendorImg.DescImg = newImg + } + } + } else { + if vendorImg.Img != "" { + result = append(result, vendorImg.Img) + } + if vendorImg.Img2 != "" { + result = append(result, vendorImg.Img2) + } + if vendorImg.Img3 != "" { + result = append(result, vendorImg.Img3) + } + if vendorImg.Img4 != "" { + result = append(result, vendorImg.Img4) + } + if vendorImg.Img5 != "" { + result = append(result, vendorImg.Img5) + } + if vendorImg.DescImg != "" { + result = append(result, vendorImg.DescImg) } } + + if isCreate { + vendorImg.SkuID = skuId + vendorImg.VendorID = vendorId + dao.CreateEntity(dao.GetDB(), &vendorImg) + } + // 商品图片最多五张 if len(result) > 5 { return utils.String2Pointer(strings.Join(result[1:], ",")) diff --git a/globals/beegodb/beegodb.go b/globals/beegodb/beegodb.go index b2b3d56a8..7844d3a7a 100644 --- a/globals/beegodb/beegodb.go +++ b/globals/beegodb/beegodb.go @@ -67,6 +67,7 @@ func Init() { orm.RegisterModel(&model.Brand{}, &model.BrandCategoryMap{}) orm.RegisterModel(&model.BrandStore{}) orm.RegisterModel(&model.BrandBill{}, &model.BrandOrder{}, &model.BrandUser{}) + orm.RegisterModel(&model.TaoSkuImg{}) orm.RegisterModel(&model.AuthBind{}, &model.User{}) From 3d49ed1bd68a2586554addf8e0e83126b16bbda0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 7 Aug 2023 16:49:37 +0800 Subject: [PATCH 38/45] 1 --- business/model/tao_sku_img.go | 1 + .../purchase/tao_vegetable/store_sku2.go | 29 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/business/model/tao_sku_img.go b/business/model/tao_sku_img.go index a3224a371..c2148bd3d 100644 --- a/business/model/tao_sku_img.go +++ b/business/model/tao_sku_img.go @@ -1,6 +1,7 @@ package model type TaoSkuImg struct { + ID int64 `orm:"column(id)" json:"id"` SkuID int `orm:"column(sku_id)"` VendorID int `orm:"column(vendor_id)" json:"vendorID"` Img string `orm:"size(512)" json:"img"` diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index fef92296b..b5122070e 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -472,21 +472,20 @@ func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *stri }) if newImg != "" { result = append(result, newImg) - } - - switch i { - case 0: - vendorImg.Img = newImg - case 1: - vendorImg.Img2 = newImg - case 2: - vendorImg.Img3 = newImg - case 3: - vendorImg.Img4 = newImg - case 4: - vendorImg.Img5 = newImg - case 5: - vendorImg.DescImg = newImg + switch i { + case 0: + vendorImg.Img = newImg + case 1: + vendorImg.Img2 = newImg + case 2: + vendorImg.Img3 = newImg + case 3: + vendorImg.Img4 = newImg + case 4: + vendorImg.Img5 = newImg + case 5: + vendorImg.DescImg = newImg + } } } } else { From 95775f92fd5e67eba59ebba95e571d6bc0db40c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 7 Aug 2023 17:02:58 +0800 Subject: [PATCH 39/45] 1 --- business/partner/purchase/tao_vegetable/store_sku2.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index b5122070e..2df4f8c46 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -442,7 +442,9 @@ func checkNameLength(name string, weight int, uint string) string { } func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *string { - vendorImg, _ := dao.GetVendorImg(skuId, vendorId) + vendorImg, err := dao.GetVendorImg(skuId, vendorId) + globals.SugarLogger.Debugf("========vendorImg := %s", utils.Format4Output(vendorImg, false)) + globals.SugarLogger.Debugf("========vendorImg := %s", utils.Format4Output(err, false)) result := make([]string, 0, 0) isCreate := false From 3fbae4ff2d8095bdf2b7957f411716da85355e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 7 Aug 2023 17:06:37 +0800 Subject: [PATCH 40/45] 1 --- .../purchase/tao_vegetable/store_sku2.go | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 2df4f8c46..e7bb53a04 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -442,11 +442,9 @@ func checkNameLength(name string, weight int, uint string) string { } func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *string { - vendorImg, err := dao.GetVendorImg(skuId, vendorId) - globals.SugarLogger.Debugf("========vendorImg := %s", utils.Format4Output(vendorImg, false)) - globals.SugarLogger.Debugf("========vendorImg := %s", utils.Format4Output(err, false)) + vendorImg, _ := dao.GetVendorImg(skuId, vendorId) result := make([]string, 0, 0) - + taoImgs := &model.TaoSkuImg{} isCreate := false if vendorImg == nil || (vendorImg.Img == "" && vendorImg.Img2 == "" && vendorImg.Img3 == "" && vendorImg.Img4 == "" && vendorImg.Img5 == "" && vendorImg.DescImg == "") { isCreate = true @@ -476,17 +474,17 @@ func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *stri result = append(result, newImg) switch i { case 0: - vendorImg.Img = newImg + taoImgs.Img = newImg case 1: - vendorImg.Img2 = newImg + taoImgs.Img2 = newImg case 2: - vendorImg.Img3 = newImg + taoImgs.Img3 = newImg case 3: - vendorImg.Img4 = newImg + taoImgs.Img4 = newImg case 4: - vendorImg.Img5 = newImg + taoImgs.Img5 = newImg case 5: - vendorImg.DescImg = newImg + taoImgs.DescImg = newImg } } } @@ -512,9 +510,9 @@ func uploadImg(api *tao_vegetable.API, skuId, vendorId int, imgs []string) *stri } if isCreate { - vendorImg.SkuID = skuId - vendorImg.VendorID = vendorId - dao.CreateEntity(dao.GetDB(), &vendorImg) + taoImgs.SkuID = skuId + taoImgs.VendorID = vendorId + dao.CreateEntity(dao.GetDB(), taoImgs) } // 商品图片最多五张 From b44df2ad00f4fc106b33014021b24bbb7a2bb1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 8 Aug 2023 09:07:19 +0800 Subject: [PATCH 41/45] 1 --- .../partner/purchase/tao_vegetable/store_sku2.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index e7bb53a04..4acbcd5e2 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -41,19 +41,19 @@ var ( func (p *PurchaseHandler) GetStoreSkusBatchSize(funcID int) (batchSize int) { switch funcID { case partner.FuncUpdateStoreSkusStock, partner.FuncUpdateStoreSkusStatus, partner.FuncUpdateStoreSkusPrice: - batchSize = 5 + batchSize = 20 case partner.FuncDeleteStoreSkus: - batchSize = 5 + batchSize = 20 case partner.FuncCreateStoreSkus: - batchSize = 5 // 可考虑用批量操作 + batchSize = 20 // 可考虑用批量操作 case partner.FuncUpdateStoreSkus: - batchSize = 5 // mtwmapi.MaxStoreSkuBatchSize + batchSize = 20 // mtwmapi.MaxStoreSkuBatchSize case partner.FuncGetStoreSkusFullInfo: - batchSize = 5 + batchSize = 20 case partner.FuncCreateActs: - batchSize = 5 + batchSize = 20 case partner.FuncCancelActs: - batchSize = 5 + batchSize = 20 } return batchSize } From 827b50341cea7eeef1414138d2c45068377d5bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 8 Aug 2023 09:23:07 +0800 Subject: [PATCH 42/45] 1 --- controllers/jd_callback.go | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/jd_callback.go b/controllers/jd_callback.go index 616babe6d..ff0d6d7e1 100644 --- a/controllers/jd_callback.go +++ b/controllers/jd_callback.go @@ -111,6 +111,7 @@ func (c *DjswController) OrderCommentPush() { func (c *DjswController) Token() { urlValues, err := utils.HTTPBody2Values(c.Ctx.Input.RequestBody, false) globals.SugarLogger.Info(utils.Format4Output(utils.Format4Output(err, false), false)) + globals.SugarLogger.Info(utils.Format4Output(utils.Format4Output(urlValues, false), false)) jd.OnTokenChange(urlValues) c.Data["json"] = c.transferResponse("Token", nil) c.ServeJSON() From deab92be8d1ffc5a281f9c046bd9d5c1daf29b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 8 Aug 2023 09:58:48 +0800 Subject: [PATCH 43/45] 1 --- business/partner/purchase/tao_vegetable/store_sku2.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/business/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 4acbcd5e2..455720840 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -323,6 +323,10 @@ func createTaoVegetable(ctx *jxcontext.Context, api *tao_vegetable.API, storeSku RichText: utils.String2Pointer(storeSku.Name), AllowAppSale: utils.Int64ToPointer(tao_vegetable.IsAllowAppSale), } + // 赠品专区 + if storeSku.VendorCatID == "175" { + sku.MerchantCatCode = utils.String2Pointer("1751") + } sku.SkuPicUrls = uploadImg(api, storeSku.SkuID, model.VendorIDTaoVegetable, []string{storeSku.Img, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5, storeSku.DescImg}) if sku.SkuPicUrls == nil { continue From f1cfe3dcd723cdbcce26c5d3ec546cd556f9b48d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 8 Aug 2023 10:37:18 +0800 Subject: [PATCH 44/45] 1 --- business/jxstore/cms/sync_store_sku.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 7e3f38376..ed824e347 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -711,6 +711,15 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } } + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(deleteList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(updateList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(stockList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(createList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(onlineList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(offlineList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(priceList, false)) + globals.SugarLogger.Debugf("====================%s", utils.Format4Output(updateItems, false)) + globals.SugarLogger.Debugf("====================%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) From d32a8cd1983f605bf984876dd24b531f66b8ede1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 8 Aug 2023 10:45:58 +0800 Subject: [PATCH 45/45] 1 --- business/jxstore/cms/sync_store_sku.go | 9 --------- business/partner/purchase/tao_vegetable/store_sku2.go | 2 ++ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index ed824e347..7e3f38376 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -711,15 +711,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } } - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(deleteList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(updateList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(stockList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(createList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(onlineList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(offlineList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(priceList, false)) - globals.SugarLogger.Debugf("====================%s", utils.Format4Output(updateItems, false)) - globals.SugarLogger.Debugf("====================%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/partner/purchase/tao_vegetable/store_sku2.go b/business/partner/purchase/tao_vegetable/store_sku2.go index 455720840..4be767488 100644 --- a/business/partner/purchase/tao_vegetable/store_sku2.go +++ b/business/partner/purchase/tao_vegetable/store_sku2.go @@ -592,6 +592,8 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg CleanSkuMemberPrice: utils.Int64ToPointer(model.YES), SubTitle: utils.String2Pointer("小时达"), } + // 临时更新上传图片错误的,或图片上传失败的商品 + updateSku.SkuPicUrls = uploadImg(api, v.SkuID, model.VendorIDTaoVegetable, nil) updateSkuList = append(updateSkuList, updateSku) } param.ParamList = &updateSkuList