aa
This commit is contained in:
@@ -1857,31 +1857,33 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
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)
|
||||||
storeSkus, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, nil)
|
storeSkus, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, nil)
|
||||||
FreeBatchInfo("uuuuu2", func(task tasksch.ITask, batchedStoreSkuList []*model.StoreSkuBind) (result interface{}, successCount int, err error) {
|
result, _ := FreeBatchInfo("uuuuu2", func(task tasksch.ITask, batchedStoreSkuList []*model.StoreSkuBind) (result interface{}, successCount int, err error) {
|
||||||
api := jd.GetAPI("320406")
|
api := jd.GetAPI("320406")
|
||||||
var ids []int64
|
var ids []int64
|
||||||
for _, v := range batchedStoreSkuList {
|
for _, v := range batchedStoreSkuList {
|
||||||
ids = append(ids, utils.Str2Int64(thingIDmap[int64(v.SkuID)]))
|
ids = append(ids, utils.Str2Int64(thingIDmap[int64(v.SkuID)]))
|
||||||
}
|
}
|
||||||
priceInfo, _ := api.GetStationInfoList(storeMap.VendorStoreID, ids)
|
priceInfo, _ := api.GetStationInfoList(storeMap.VendorStoreID, ids)
|
||||||
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: utils.Int2Str(thingIDmap2[utils.Int64ToStr(vv.SkuID)]),
|
// OutSkuId: utils.Int2Str(thingIDmap2[utils.Int64ToStr(vv.SkuID)]),
|
||||||
})
|
//})
|
||||||
|
result = []interface{}{vv.StationNo}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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, storeSkus, 50, true)
|
}, ctx, task, storeSkus, 50, true)
|
||||||
|
retVal = []interface{}{result}
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}, storeMaps)
|
}, storeMaps)
|
||||||
tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
_, err = task.GetResult(0)
|
result, err := task.GetResult(0)
|
||||||
|
fmt.Println("fuck vip", utils.Format4Output(result, true))
|
||||||
//京东账号更新
|
//京东账号更新
|
||||||
// var (
|
// var (
|
||||||
// db = dao.GetDB()
|
// db = dao.GetDB()
|
||||||
|
|||||||
Reference in New Issue
Block a user