This commit is contained in:
苏尹岚
2021-03-23 16:55:41 +08:00
parent 97a9605712
commit 08ddc2308d

View File

@@ -1882,6 +1882,8 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
var ( var (
db = dao.GetDB() 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() result, _ := api.JdAPI.GetJdAppInfo()
if result != nil { if result != nil {
if vocs, _ := dao.GetVendorOrgCode(db, model.VendorIDJD, result.OrgCode, model.VendorOrgTypePlatform); len(vocs) > 0 { if vocs, _ := dao.GetVendorOrgCode(db, model.VendorIDJD, result.OrgCode, model.VendorOrgTypePlatform); len(vocs) > 0 {
@@ -1890,6 +1892,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
dao.UpdateEntity(db, vocs[0], "AppKey", "AppSecret") dao.UpdateEntity(db, vocs[0], "AppKey", "AppSecret")
} }
} }
}
return err return err
} }