meituan shuang 111

This commit is contained in:
苏尹岚
2020-11-10 18:44:16 +08:00
parent 0f46f03493
commit efd55100d7
2 changed files with 362 additions and 7 deletions

View File

@@ -6,6 +6,8 @@ import (
"sync"
"time"
"git.rosy.net.cn/jx-callback/business/jxstore/tempop"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jdshop"
"git.rosy.net.cn/baseapi/platformapi/jdapi"
@@ -270,6 +272,11 @@ func Init() {
ScheduleTimerFunc("RefreshUserMemberStatus", func() {
cms.RefreshUserMemberStatus(jxcontext.AdminCtx)
}, updateActStatusTimeList)
ScheduleTimerFunc("mtshaung11", func() {
tempop.UploadJdsImage(jxcontext.AdminCtx)
}, []string{
"23:00:00",
})
}
ScheduleTimerFunc("AutoSaleStoreSku", func() {
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)

View File

@@ -8,8 +8,6 @@ import (
"strings"
"time"
"git.rosy.net.cn/jx-callback/business/authz/autils"
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
"git.rosy.net.cn/jx-callback/business/partner/delivery"
"github.com/360EntSecGroup-Skylar/excelize"
@@ -1712,12 +1710,362 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
// cms.UpdateStoreSkus(ctx, 0, storeDetail.ID, skuBindInfos, true, true)
// }
var (
db = dao.GetDB()
db = dao.GetDB()
storeIDs = []int{
667510,
667501,
667493,
667490,
667485,
667480,
667479,
667463,
667459,
667446,
667445,
667441,
667439,
667431,
667429,
667423,
667421,
667414,
667413,
667412,
667410,
667407,
667401,
667399,
667398,
667394,
667385,
667383,
667377,
667375,
667365,
667363,
667357,
667351,
667349,
667341,
667331,
667329,
667317,
667312,
667308,
667304,
667302,
667296,
667293,
667292,
667284,
667283,
667266,
667234,
667231,
667229,
667214,
667208,
667198,
667182,
667179,
667176,
667158,
667152,
667133,
667128,
667125,
667122,
667116,
667110,
667101,
667094,
667093,
667091,
667067,
667066,
667057,
667047,
667044,
667011,
666987,
666972,
666963,
666942,
666932,
666919,
666918,
666915,
666891,
666888,
666879,
666864,
666839,
666820,
666800,
666793,
666790,
666786,
666767,
666755,
666751,
666746,
666678,
666677,
103459,
103435,
103433,
103408,
103205,
103197,
103194,
103193,
103191,
103189,
103182,
103151,
103119,
103111,
103090,
103089,
103088,
103085,
103084,
103074,
103069,
103062,
103055,
103050,
103037,
103036,
103035,
103033,
103031,
103029,
103027,
103022,
103015,
103009,
103006,
103004,
103002,
102999,
102997,
102996,
102995,
102994,
102992,
102987,
102981,
102980,
102978,
102973,
102969,
102966,
102963,
102962,
102960,
102958,
102956,
102955,
102952,
102945,
102935,
102934,
102933,
102929,
102926,
102924,
102923,
102921,
102920,
102911,
102908,
102907,
102902,
102898,
102896,
102895,
102894,
102893,
102891,
102890,
102888,
102877,
102876,
102875,
102865,
102859,
102858,
102857,
102851,
102844,
102836,
102826,
102824,
102823,
102819,
102818,
102812,
102807,
102795,
102794,
102790,
102789,
102788,
102785,
102784,
102778,
102776,
102767,
102756,
102752,
102751,
102744,
102742,
102736,
102731,
102718,
102713,
102705,
102691,
102686,
102676,
102671,
102630,
102624,
102596,
102594,
102561,
102533,
102530,
102498,
102490,
102488,
102482,
102481,
102479,
102475,
102433,
102426,
102425,
102383,
102379,
102374,
102373,
102371,
102364,
102358,
102357,
102353,
102304,
102303,
102300,
102293,
102280,
102206,
102167,
102147,
102126,
102101,
102075,
102074,
102068,
102063,
102046,
102016,
102014,
101997,
101983,
101979,
101956,
101948,
101909,
101897,
101763,
101750,
101736,
101666,
101176,
101134,
101111,
101110,
101099,
101078,
101062,
101039,
101036,
101013,
101012,
101000,
100988,
100987,
100946,
100937,
100920,
100905,
100887,
100867,
100849,
100829,
100802,
100766,
100720,
100712,
100699,
100681,
100670,
100664,
100658,
100600,
100548,
100477,
100471,
100470,
100463,
100455,
100454,
100449,
100444,
100409,
100396,
100366,
100361,
100324,
100309,
100299,
100292,
100274,
100236,
100215,
100206,
100190,
100175,
100167,
100157,
100135,
100123,
100121,
100115,
100068,
100065,
100056,
100032,
100022,
100002,
}
payload = make(map[string]interface{})
)
stores, _ := dao.GetStoreList(db, nil, nil, nil, nil, "")
for _, v := range stores {
cms.AddUsers4Role(jxcontext.AdminCtx, autils.NewRole("StoreBoss", v.ID), []string{"5CD3666C666711E9B19B525400E86DC0"})
}
payload["pricePercentagePack"] = "美团菜市双1169-25"
task := tasksch.NewParallelTask("美团双11刷新", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
v := batchItemList[0].(int)
cms.UpdateStoreVendorMap(ctx, db, v, model.VendorIDMTWM, payload, ctx.GetUserName())
cms.CurVendorSync.SyncStoresSkus(ctx, nil, 0, db, []int{model.VendorIDMTWM}, []int{v}, nil, false, true, true)
return retVal, err
}, storeIDs)
tasksch.HandleTask(task, nil, true).Run()
task.GetID()
return err
}