This commit is contained in:
邹宗楠
2023-08-02 18:51:15 +08:00
parent c74e373e77
commit 744d4c7711
3 changed files with 389 additions and 478 deletions

View File

@@ -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))
// }
//}
}

View File

@@ -209,18 +209,6 @@ func Init() {
"18:10:00", "18:10:00",
}) })
// 下架所有北京上海门店商品
ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf", func() {
orderman.UpdateTaoSkuUpdateOffShelf()
}, []string{
"16:33:00",
})
ScheduleTimerFunc("UpdateTaoSkuUpdateOffShelf2", func() {
orderman.UpdateTaoSkuUpdateOffShelf2()
}, []string{
"16:34:00",
})
// 每分钟轮询一次,推送骑手信息 // 每分钟轮询一次,推送骑手信息
ScheduleTimerFuncByInterval(func() { ScheduleTimerFuncByInterval(func() {
delivery.UpdateFakeWayBillToTiktok() delivery.UpdateFakeWayBillToTiktok()
@@ -295,6 +283,130 @@ func Init() {
if beego.BConfig.RunMode != "jxgy" { if beego.BConfig.RunMode != "jxgy" {
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() { ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
var hangzhou = []int{ 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, //669073,
//668930, //668930,
@@ -335,270 +447,270 @@ func Init() {
//// 广州 //// 广州
// 668871, 668602, 668575, 668262, 103425, 101755, 101176, 100557, 100369, 100361, 100351, 100350, // 668871, 668602, 668575, 668262, 103425, 101755, 101176, 100557, 100369, 100361, 100351, 100350,
//成都 //成都
669172, //669172,
669171, //669171,
669170, //669170,
669169, //669169,
669168, //669168,
669165, //669165,
669164, //669164,
669163, //669163,
669162, //669162,
669157, //669157,
669156, //669156,
669155, //669155,
669154, //669154,
669153, //669153,
669150, //669150,
669149, //669149,
669148, //669148,
669147, //669147,
669146, //669146,
669144, //669144,
669141, //669141,
669139, //669139,
669138, //669138,
669137, //669137,
669134, //669134,
669132, //669132,
669127, //669127,
669124, //669124,
669122, //669122,
669121, //669121,
669120, //669120,
669119, //669119,
669114, //669114,
669113, //669113,
669111, //669111,
669110, //669110,
669109, //669109,
669108, //669108,
669107, //669107,
669106, //669106,
669103, //669103,
669100, //669100,
669099, //669099,
669098, //669098,
669097, //669097,
669096, //669096,
669095, //669095,
669094, //669094,
669093, //669093,
669092, //669092,
669091, //669091,
669087, //669087,
669086, //669086,
669085, //669085,
669084, //669084,
669083, //669083,
669082, //669082,
669079, //669079,
669078, //669078,
669077, //669077,
669075, //669075,
669074, //669074,
669072, //669072,
669070, //669070,
669067, //669067,
669064, //669064,
669063, //669063,
669062, //669062,
669060, //669060,
669059, //669059,
669056, //669056,
669055, //669055,
669054, //669054,
669050, //669050,
669049, //669049,
669047, //669047,
669046, //669046,
669045, //669045,
669042, //669042,
669041, //669041,
669038, //669038,
669036, //669036,
669035, //669035,
669033, //669033,
669032, //669032,
669031, //669031,
669027, //669027,
669025, //669025,
669024, //669024,
669022, //669022,
669021, //669021,
669020, //669020,
669017, //669017,
669015, //669015,
669014, //669014,
669012, //669012,
669009, //669009,
669007, //669007,
669002, //669002,
669000, //669000,
668999, //668999,
668997, //668997,
668996, //668996,
668993, //668993,
668988, //668988,
668986, //668986,
668984, //668984,
668966, //668966,
668963, //668963,
668961, //668961,
668958, //668958,
668954, //668954,
668950, //668950,
668948, //668948,
668946, //668946,
668943, //668943,
668938, //668938,
668928, //668928,
668910, //668910,
668907, //668907,
668900, //668900,
668897, //668897,
668896, //668896,
668891, //668891,
668889, //668889,
668883, //668883,
668882, //668882,
668868, //668868,
668860, //668860,
668855, //668855,
668853, //668853,
668850, //668850,
668849, //668849,
668843, //668843,
668838, //668838,
668807, //668807,
668802, //668802,
668784, //668784,
668773, //668773,
668771, //668771,
668767, //668767,
668766, //668766,
668755, //668755,
668749, //668749,
668728, //668728,
668724, //668724,
668722, //668722,
668721, //668721,
668716, //668716,
668706, //668706,
668704, //668704,
668699, //668699,
668697, //668697,
668695, //668695,
668693, //668693,
668692, //668692,
668688, //668688,
668686, //668686,
668682, //668682,
668680, //668680,
668679, //668679,
668678, //668678,
668672, //668672,
668666, //668666,
668662, //668662,
668660, //668660,
668659, //668659,
668656, //668656,
668655, //668655,
668654, //668654,
668649, //668649,
668648, //668648,
668643, //668643,
668642, //668642,
668640, //668640,
668636, //668636,
668632, //668632,
668631, //668631,
668629, //668629,
668624, //668624,
668616, //668616,
668613, //668613,
668608, //668608,
668594, //668594,
668548, //668548,
668543, //668543,
668540, //668540,
668537, //668537,
668530, //668530,
668512, //668512,
668258, //668258,
668257, //668257,
668256, //668256,
668254, //668254,
668203, //668203,
668190, //668190,
668186, //668186,
668185, //668185,
668182, //668182,
668170, //668170,
668169, //668169,
668168, //668168,
668166, //668166,
668165, //668165,
668164, //668164,
668157, //668157,
668156, //668156,
668125, //668125,
668121, //668121,
668095, //668095,
668094, //668094,
668071, //668071,
667959, //667959,
667745, //667745,
667744, //667744,
667743, //667743,
667563, //667563,
667562, //667562,
667561, //667561,
667560, //667560,
667559, //667559,
667558, //667558,
667556, //667556,
667420, //667420,
667332, //667332,
667308, //667308,
667305, //667305,
667304, //667304,
667299, //667299,
667292, //667292,
667285, //667285,
667281, //667281,
667278, //667278,
667263, //667263,
667001, //667001,
666975, //666975,
666677, //666677,
666667, //666667,
666666, //666666,
103408, //103408,
103184, //103184,
103174, //103174,
103127, //103127,
103113, //103113,
102925, //102925,
102740, //102740,
102736, //102736,
102630, //102630,
102383, //102383,
102180, //102180,
101942, //101942,
101897, //101897,
101875, //101875,
101036, //101036,
100840, //100840,
100743, //100743,
100654, //100654,
100471, //100471,
100144, //100144,
100135, //100135,
100129, //100129,
100126, //100126,
100123, //100123,
100115, //100115,
} }
syncStoreSkuTao(hangzhou) syncStoreSkuTao(hangzhou)
}, []string{ }, []string{
@@ -621,7 +733,7 @@ func Init() {
"16:30:00", "16:30:00",
"17:30:00", "17:30:00",
"18:30:00", "18:30:00",
"19:30:00", "19:00:00",
"20:30:00", "20:30:00",
"21:30:00", "21:30:00",
"22:30:00", "22:30:00",

View File

@@ -10,8 +10,6 @@ import (
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
domain3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain" domain3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain"
request3156 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/request" 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" domain591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/domain"
request591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/request" request591 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/request"
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util" "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 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 获取门店结算信息 // GetOrderTotalShopMoney 获取门店结算信息
func GetOrderTotalShopMoney(appOrgCode string, vendorStoreID string, start, end time.Time) (map[string]string, error) { func GetOrderTotalShopMoney(appOrgCode string, vendorStoreID string, start, end time.Time) (map[string]string, error) {
if appOrgCode == "" || vendorStoreID == "" { if appOrgCode == "" || vendorStoreID == "" {