Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop

This commit is contained in:
richboo111
2023-07-31 17:36:48 +08:00
14 changed files with 577 additions and 425 deletions

View File

@@ -3653,9 +3653,9 @@ func GetStoreCategoryMap(ctx *jxcontext.Context, parentID, level int, storeID in
if err != nil {
return nil, err
}
if ctx.GetLoginType() != auth2.AuthTypePassword && ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != weixin.AuthTypeWxAppCaishi && ctx.GetLoginType() != auth2.AuthTypeMobile {
return storeCatMaps, err
}
//if ctx.GetLoginType() != auth2.AuthTypePassword && ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != weixin.AuthTypeWxAppCaishi && ctx.GetLoginType() != auth2.AuthTypeMobile {
// return storeCatMaps, err
//}
//表示没有门店分类
if len(storeCatMaps) == 0 {
storeCatMaps, err = dao.GetCategoriesForStore(db, parentID, 0, nil)

View File

@@ -1744,6 +1744,7 @@ 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()
@@ -5941,6 +5942,7 @@ func doStoreSkuAudit(ctx *jxcontext.Context, storeIDs []int, skuBindInfos []*Sto
return false, err
}
}
storeSkuAudit := &model.StoreSkuAudit{
StoreID: storeID,
NameID: skuBindInfo.NameID,

View File

@@ -203,10 +203,10 @@ func Init() {
"09:35:00",
})
/// 更新淘鲜达结算信息
ScheduleTimerFunc("UpdateTiktokShopTotalMoney", func() {
ScheduleTimerFunc("UpdateTaoTotalMoney", func() {
orderman.UpdateTaoSettleInfo()
}, []string{
"23:20:00",
"17:35:00",
})
// 每分钟轮询一次,推送骑手信息
@@ -282,149 +282,338 @@ func Init() {
// 淘鲜达更新门店商品 ,接口收费暂不使用
if beego.BConfig.RunMode != "jxgy" {
ScheduleTimerFunc("RefreshSyncSkuList_tao", func() {
var beijin = []int{
//102683,
//102542,
//102514,
//102382,
//102182,
//102178,
//102173,
//102098,
//102094,
//102080,
//102072,
//102069,
//101870,
//101869,
//101868,
//101867,
//101866,
//101865,
//100956,
//100930,
//100871,
//100786,
//100746,
//100744,
//100726,
//100705,
//100400,
//100111,
//100108,
//100106,
//100104,
//100103,
//100102,
//100100,
//100097,
//100096,
//100095,
//100093,
//100092,
//100089,
//100087,
//100086,
//100085,
//100082,
//100079,
//100078,
//669158,
//668691,
//668673,
//668282,
//667447,
//667354,
//667321,
//667319,
//667316,
//667269,
//667268,
//667267,
//667260,
//667132,
//667094,
//667030,
//666965,
//666714,
//666708,
//666705,
//103437,
//103349,
//103123,
//103121,
//103106,
//103038,
//103028,
//103019,
//102831,
//102751,
//上海
668462,
668276,
668180,
667320,
667237,
667231,
667068,
667036,
666678,
103191,
103074,
103065,
103051,
103050,
103037,
103029,
103018,
103002,
102999,
102969,
102966,
102951,
102946,
102939,
102938,
102934,
102933,
102930,
102924,
102920,
102908,
102903,
102561,
102293,
100946,
100945,
100943,
100935,
100905,
100720,
100325,
100324,
100309,
100299,
100296,
100292,
100290,
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,
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(beijin)
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",
"09:00:00",
"10:40:00",
"12:55: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:40:00",
"18:30:00",
"19:30:00",
"20:30:00",
"21:30:00",
"22:30:00",
"23:30:00",
})
}
@@ -754,9 +943,6 @@ func syncStoreSku() {
tasksch.HandleTask(task, nil, true).Run()
}
//var storeIds = []int{
// 668802, 668787, 668785, 668777, 668769, 668776, 668770, 668760, 668758, 668756, 668748, 668727, 668723, 300372, 668715, 668717, 668707, 668667, 668668, 800306, 668628, 668681, 668673, 668544, 668619, 668614, 668600, 102217, 667405, 100988, 668353, 103022, 668283, 667208, 668266, 102101, 100610, 103201, 103459, 667154, 102691, 666747, 103417, 666744, 666864, 102186, 667271, 101750, 101031, 667452, 666942, 666927, 100068, 668339, 668306, 668310, 667352, 102544, 667014, 102280, 667134, 102945, 103062, 102443, 668218, 666913, 102742, 668360, 102851, 668580, 667252, 666746, 100455, 667037, 667317, 667473, 666816, 103063, 666800, 668210, 103079, 668200, 668176, 667462, 102426, 667116, 668309, 100193, 666828, 666944, 102852, 666900, 668521, 668373, 102596, 668444, 667071, 668264, 668395, 668090, 102172, 102790, 101935, 667480, 102479, 103197, 102703, 668386, 668229, 666948, 101008, 668249, 102374, 667464, 668468, 102490, 666756, 102976, 667467, 666707, 668270, 667429, 103098, 668135, 668523, 666907, 668407, 668358, 668385, 101134, 100887, 668568, 668003, 101763, 100829, 667476, 101078, 668099, 668503, 666807, 100167, 100433, 668107, 667262, 100849, 102771, 667173, 666847, 667485, 102821, 666955, 101107, 667229, 102950, 103435, 102497, 666916, 668163, 668061, 102147, 668248, 667066, 102853, 667944, 100002, 102865, 668219, 100184, 666840, 667057, 668202, 102223, 667101, 667128, 101110, 668511, 103151, 667093, 668154, 666905, 668268, 666929, 102935, 102074, 668174, 668217, 102350, 666940, 102980, 668117, 668384, 100067, 101916, 102987, 667250, 668570, 667466, 101099, 667082, 100229, 667553, 100215, 667991, 100217, 103073, 103074, 103037, 668180, 668583, 668462, 667891, 666811, 666736, 668173, 100267, 102962, 102752, 668284, 667296, 668175, 667806, 103103, 103084, 668453, 102970, 103184, 668548, 101036, 668182, 668157, 668257, 668166, 668543, 668170, 668071, 667744, 102925, 100115, 668093, 667745, 668164, 668156, 667743, 668165, 103408, 103038, 667268, 667094, 667321, 100726, 102333, 666742, 101775, 100028, 668304, 667305, 101942, 668575, 101755, 103425, 102833, 100699, 103190, 666711, 668396, 100334, 102533, 100336, 101995, 102320, 101842, 102519, 101999, 102433, 100920, 102594, 102951, 668506, 666667, 102963, 300034, 667212, 100236, 101909, 668541, 102857, 668417, 102955, 103031, 668545, 666790, 100328}
func syncStoreSkuTiktok() {
//syncFlag := 0 | model.SyncFlagSaleMask
syncFlag := 0
@@ -795,8 +981,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+3], false))
_, err = cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, []int{model.VendorIDTaoVegetable}, beijin[syncLen:syncLen+3], false, nil, nil, syncFlag, true, true)
errList.AddErr(err)
}
case 1:
@@ -807,7 +993,7 @@ func syncStoreSkuTao(beijin []int) {
return retVal, err
}, []int{0, 1})
tasksch.HandleTask(task, nil, true).Run()
syncLen += 5
syncLen += 3
}
func doDailyWork2() {