aa
This commit is contained in:
@@ -240,9 +240,9 @@ func Init() {
|
|||||||
ScheduleTimerFunc("BackUpStoreSkuBind", func() {
|
ScheduleTimerFunc("BackUpStoreSkuBind", func() {
|
||||||
cms.BackUpStoreSkuBind(jxcontext.AdminCtx, true, true)
|
cms.BackUpStoreSkuBind(jxcontext.AdminCtx, true, true)
|
||||||
}, backUpStoreSkuBindList)
|
}, backUpStoreSkuBindList)
|
||||||
ScheduleTimerFunc("SendNoCatSkusToOperater", func() {
|
// ScheduleTimerFunc("SendNoCatSkusToOperater", func() {
|
||||||
cms.SendNoCatSkusToOperater(jxcontext.AdminCtx)
|
// cms.SendNoCatSkusToOperater(jxcontext.AdminCtx)
|
||||||
}, autoPayForPopluarManList)
|
// }, autoPayForPopluarManList)
|
||||||
ScheduleTimerFunc("CleanStoreIsBoughtMatter", func() {
|
ScheduleTimerFunc("CleanStoreIsBoughtMatter", func() {
|
||||||
cms.CleanStoreIsBoughtMatter(jxcontext.AdminCtx)
|
cms.CleanStoreIsBoughtMatter(jxcontext.AdminCtx)
|
||||||
}, priceReferTimeList)
|
}, priceReferTimeList)
|
||||||
|
|||||||
@@ -1843,8 +1843,9 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
vendorThingIDs []int64
|
vendorThingIDs []int64
|
||||||
|
result3 []int
|
||||||
)
|
)
|
||||||
storeMaps, _ := dao.GetStoresMapList(db, []int{model.VendorIDJD}, []int{103035}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "320406")
|
storeMaps, _ := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "320406")
|
||||||
things, _ := dao.GetThingMapList(db, model.ThingTypeSku, []int{model.VendorIDJD}, nil, []string{"320406"})
|
things, _ := dao.GetThingMapList(db, model.ThingTypeSku, []int{model.VendorIDJD}, nil, []string{"320406"})
|
||||||
thingIDmap := make(map[int64]string)
|
thingIDmap := make(map[int64]string)
|
||||||
|
|
||||||
@@ -1858,26 +1859,38 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
task := tasksch.NewParallelTask("uuuuu", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
storeMap := batchItemList[0].(*model.StoreMap)
|
storeMap := batchItemList[0].(*model.StoreMap)
|
||||||
FreeBatchInfo("uuuuu2", func(task tasksch.ITask, batchedStoreSkuList []int64) (result interface{}, successCount int, err error) {
|
result1, _ := FreeBatchInfo("uuuuu2", func(task tasksch.ITask, batchedStoreSkuList []int64) (result interface{}, successCount int, err error) {
|
||||||
api := jd.GetAPI("320406")
|
api := jd.GetAPI("320406")
|
||||||
priceInfo, _ := api.GetStationInfoList(storeMap.VendorStoreID, batchedStoreSkuList)
|
priceInfo, _ := api.GetStationInfoList(storeMap.VendorStoreID, batchedStoreSkuList)
|
||||||
var list []*jdapi.SkuIdEntity
|
// var list []*jdapi.SkuIdEntity
|
||||||
for _, vv := range priceInfo {
|
for _, vv := range priceInfo {
|
||||||
if vv.VipPrice != 0 {
|
if vv.VipPrice != 0 {
|
||||||
list = append(list, &jdapi.SkuIdEntity{
|
// list = append(list, &jdapi.SkuIdEntity{
|
||||||
OutSkuId: thingIDmap[vv.SkuID],
|
// OutSkuId: thingIDmap[vv.SkuID],
|
||||||
})
|
// })
|
||||||
|
result = []bool{true}
|
||||||
|
return result, 0, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(list) > 0 {
|
// if len(list) > 0 {
|
||||||
err = api.DelVipPrice(utils.Int2Str(storeMap.StoreID), list)
|
// err = api.DelVipPrice(utils.Int2Str(storeMap.StoreID), list)
|
||||||
}
|
// }
|
||||||
return result, 0, err
|
return result, 0, err
|
||||||
}, ctx, task, vendorThingIDs, 50, true)
|
}, ctx, task, vendorThingIDs, 50, true)
|
||||||
|
for _, v := range result1 {
|
||||||
|
if v.(bool) {
|
||||||
|
retVal = []int{storeMap.StoreID}
|
||||||
|
return retVal, err
|
||||||
|
}
|
||||||
|
}
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}, storeMaps)
|
}, storeMaps)
|
||||||
tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
_, err = task.GetResult(0)
|
result2, err := task.GetResult(0)
|
||||||
|
for _, v := range result2 {
|
||||||
|
result3 = append(result3, v.(int))
|
||||||
|
}
|
||||||
|
fmt.Println("result3", result3)
|
||||||
//京东账号更新
|
//京东账号更新
|
||||||
// var (
|
// var (
|
||||||
// db = dao.GetDB()
|
// db = dao.GetDB()
|
||||||
|
|||||||
Reference in New Issue
Block a user