aa
This commit is contained in:
@@ -4093,8 +4093,8 @@ func RefreshStoreBind(ctx *jxcontext.Context) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
stores, err := dao.GetStoreList(db, nil, nil, []int{model.StoreStatusClosed, model.StoreStatusHaveRest, model.StoreStatusOpened}, nil, nil, "")
|
||||
task := tasksch.NewParallelTask("RefreshStoreBind", tasksch.NewParallelConfig().SetParallelCount(5).SetIsContinueWhenError(true), ctx,
|
||||
stores, err := dao.GetStoreList(db, []int{668074}, nil, []int{model.StoreStatusClosed, model.StoreStatusHaveRest, model.StoreStatusOpened}, nil, nil, "")
|
||||
task := tasksch.NewParallelTask("RefreshStoreBind", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
store := batchItemList[0].(*model.Store)
|
||||
var userIDs []string
|
||||
|
||||
@@ -1879,20 +1879,21 @@ 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")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
cms.RefreshStoreBind(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user