aa
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -1841,48 +1840,48 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
// tasksch.HandleTask(task, nil, true).Run()
|
// tasksch.HandleTask(task, nil, true).Run()
|
||||||
// task.GetID()
|
// task.GetID()
|
||||||
//删京东会员价
|
//删京东会员价
|
||||||
//var (
|
var (
|
||||||
// db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
//)
|
)
|
||||||
//storeMaps, _ := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, 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}, []int{6092260, 27007, 6043692, 27008, 27009}, []string{"320406"})
|
||||||
//thingIDmap := make(map[int64]string)
|
thingIDmap := make(map[int64]string)
|
||||||
//thingIDmap2 := make(map[string]int)
|
thingIDmap2 := make(map[string]int)
|
||||||
//for _, v := range things {
|
for _, v := range things {
|
||||||
// if v.VendorThingID != "" {
|
if v.VendorThingID != "" {
|
||||||
// thingIDmap[v.ThingID] = v.VendorThingID
|
thingIDmap[v.ThingID] = v.VendorThingID
|
||||||
// thingIDmap2[v.VendorThingID] = int(v.ThingID)
|
thingIDmap2[v.VendorThingID] = int(v.ThingID)
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
//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)
|
||||||
// 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) {
|
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)]),
|
||||||
// })
|
})
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// 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)
|
||||||
// return retVal, err
|
return retVal, err
|
||||||
// }, storeMaps)
|
}, storeMaps)
|
||||||
//tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
//_, err = task.GetResult(0)
|
_, err = task.GetResult(0)
|
||||||
//京东账号更新
|
//京东账号更新
|
||||||
// var (
|
// var (
|
||||||
// db = dao.GetDB()
|
// db = dao.GetDB()
|
||||||
@@ -1929,12 +1928,12 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//report.RefreshJDMembers(ctx)
|
//report.RefreshJDMembers(ctx)
|
||||||
weixinmsg.SmartMessageTemplateSend("oYN_uskdlApt6sv5Y4m_t62iO0f4", weixinmsg.WX_AFS_ORDER_WAIT4APPROVE_TEMPLATE_ID,
|
//weixinmsg.SmartMessageTemplateSend("oYN_uskdlApt6sv5Y4m_t62iO0f4", weixinmsg.WX_AFS_ORDER_WAIT4APPROVE_TEMPLATE_ID,
|
||||||
globals.WxBackstageHost+fmt.Sprintf("%s%d", weixinmsg.WX_TO_ORDER_PAGE_URL, 667092),
|
// globals.WxBackstageHost+fmt.Sprintf("%s%d", weixinmsg.WX_TO_ORDER_PAGE_URL, 667092),
|
||||||
weixinmsg.WX_MINI_TO_ORDER_PAGE_URL+fmt.Sprintf("?data=%v", `{
|
// weixinmsg.WX_MINI_TO_ORDER_PAGE_URL+fmt.Sprintf("?data=%v", `{
|
||||||
"address": "甬旺农贸市场蔬菜摊","cityName":"苏州市","id":100002,"name":"斜塘顺达广场店","payeeName":"李川川","status":1,"tel1":"13812641804","tel2":""
|
// "address": "甬旺农贸市场蔬菜摊","cityName":"苏州市","id":100002,"name":"斜塘顺达广场店","payeeName":"李川川","status":1,"tel1":"13812641804","tel2":""
|
||||||
}`),
|
// }`),
|
||||||
map[string]interface{}{"1123": 1})
|
// map[string]interface{}{"1123": 1})
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user