Skip to content

企业微信扫码登录后,接口成功,但是模型字段全部为null #3423

Description

@JustryDeng

简要描述

企业微信扫码登录,微信测返回成功的json数据后,weixin-java-cp组件未成功解析该json数据,导致返回全为null

模块版本情况

  • WxJava 模块名: weixin-java-cp
  • WxJava 版本号:4.6.0

详细描述

代码

WxCpOauth2UserInfo qyWchatUserInfo = wxCpService.getOauth2Service()
                    .getAuthUserInfo(code);
log.info("qyWchatUserInfo -> {}", qyWchatUserInfo);

输出的日志

2024-11-27 17:21:41.952 DEBUG demo-sys [ed8079c1e119be092c9758355e1c53ad] http-nio-9999-exec-8 me.chanjar.weixin.cp.api.impl.BaseWxCpServiceImpl:343
【请求地址】: https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?code=-gIW5mK2Cquo1jwW36xK3DdBskeHUCf7-1su3mFC1bw&access_token=m53A1JbK0xL6xRKVhjDRRVr-bRO3BLdQdU_H66QtQOf3f
35GOM9oonqQaZBoSzPffs-0vrspPbertgPA9nb1LSmcOwJVAptdaPZbcdFun7zQ3lxT3bahVoKu7Gze-AQyQckJXo0WH7G4mjhFzYo99c8SJ5xSnNLArkHcMou0UeyeF67kmynw8tDHAjp0hCoi95r0RFJg2nUAi1-sCPi9uw
【请求参数】:null
【响应数据】:{"userid":"qy01c9daec2345ee009b742cd9db","errcode":0,"errmsg":"ok"}

2024-11-27 17:21:41.953 INFO  demo-sys [ed8079c1e119be092c9758355e1c53ad] http-nio-9999-exec-8 c.u.f.i.sys.service.impl.SysLoginServiceImpl:286 qyWchatUserInfo -> WxCpOa
uth2UserInfo(openId=null, deviceId=null, userId=null, userTicket=null, expiresIn=null, externalUserId=null, parentUserId=null, studentUserId=null)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions