aa
This commit is contained in:
@@ -1885,20 +1885,20 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
//tasksch.HandleTask(task, nil, true).Run()
|
||||
//_, err = task.GetResult(0)
|
||||
//京东账号更新
|
||||
// var (
|
||||
// db = dao.GetDB()
|
||||
// )
|
||||
// if configs, err := dao.QueryConfigs(dao.GetDB(), "jdConfigCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
// api.JdAPI.SetCookieWithStr(configs[0].Value)
|
||||
// result, _ := api.JdAPI.GetJdAppInfo()
|
||||
// if result != nil {
|
||||
// if vocs, _ := dao.GetVendorOrgCode(db, model.VendorIDJD, result.OrgCode, model.VendorOrgTypePlatform); len(vocs) > 0 {
|
||||
// vocs[0].AppKey = result.AppKey
|
||||
// vocs[0].AppSecret = result.AppSecret
|
||||
// dao.UpdateEntity(db, vocs[0], "AppKey", "AppSecret")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "jdConfigCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
api.JdAPI.SetCookieWithStr(configs[0].Value)
|
||||
result, _ := api.JdAPI.GetJdAppInfo()
|
||||
if result != nil {
|
||||
if vocs, _ := dao.GetVendorOrgCode(db, model.VendorIDJD, result.OrgCode, model.VendorOrgTypePlatform); len(vocs) > 0 {
|
||||
vocs[0].AppKey = result.AppKey
|
||||
vocs[0].AppSecret = result.AppSecret
|
||||
dao.UpdateEntity(db, vocs[0], "AppKey", "AppSecret")
|
||||
}
|
||||
}
|
||||
}
|
||||
//刷新京东真实订单号
|
||||
//var (
|
||||
// db = dao.GetDB()
|
||||
@@ -1934,20 +1934,6 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//var (
|
||||
// storeID = 100002
|
||||
// data string
|
||||
//)
|
||||
//data = `
|
||||
//{"address":"甬旺农贸市场蔬菜摊","cityName": "苏州市","id": 100002,"name": "斜塘顺达广场店","payeeName": "李川川","status": 1,"tel1": "13812641804","tel2": ""}
|
||||
//`
|
||||
//weixinmsg.SmartMessageTemplateSend("oYN_usv1RPvrSxCvo1WsbwI8lZa0", weixinmsg.WX_NEWORDER_TEMPLATE_ID, "", weixinmsg.WX_MINI_TO_ORDER_PAGE_URL+fmt.Sprintf("?jxStoreId=%v&data=%v", storeID, data), nil)
|
||||
//
|
||||
//storeID = 100118
|
||||
//data = `
|
||||
//{"address":"成都市金牛区抚琴综合市场博力多超市旁边扶手楼梯上","cityName": "成都市","id": 100002,"name": "抚琴店-下单送盐","payeeName": "李川川","status": 1,"tel1": "13812641804","tel2": ""}
|
||||
//`
|
||||
//weixinmsg.SmartMessageTemplateSend("oYN_usv1RPvrSxCvo1WsbwI8lZa0", weixinmsg.WX_NEWORDER_TEMPLATE_ID, "", weixinmsg.WX_MINI_TO_ORDER_PAGE_URL+fmt.Sprintf("?jxStoreId=%v&data=%v", storeID, data), nil)
|
||||
//加门店账号
|
||||
//var (
|
||||
// db = dao.GetDB()
|
||||
@@ -1984,7 +1970,6 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, dao.GetDB(), []int{1, 3}, nil, false, nil, nil, model.SyncFlagSaleMask, true, true)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user