aa
This commit is contained in:
@@ -1882,12 +1882,15 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
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")
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user