From 213c1b902f52c7a718519f57911a96754fd2130b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 29 Mar 2021 09:51:17 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store.go | 4 ++-- business/jxstore/tempop/tempop.go | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index a547db60d..3861568a6 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -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 diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index f76e907c4..f77d32d15 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -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 }