You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2021-06-08 14:55:33.452 [http-nio-8080-exec-2] INFO c.m.a.config.exception.handler.MyExceptionHandler - java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 43 path $.invaliduser
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 43 path $.invaliduser
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.google.gson.Gson.fromJson(Gson.java:817)
at me.chanjar.weixin.cp.bean.message.WxCpMessageSendResult.fromJson(WxCpMessageSendResult.java:30)
at me.chanjar.weixin.cp.api.impl.WxCpMessageServiceImpl.sendLinkedCorpMessage(WxCpMessageServiceImpl.java:49)
at com.mychery.awesomeproject.service.impl.WxCommonServiceImpl.sendLinkedCorpMessage(WxCommonServiceImpl.java:51)
at com.mychery.awesomeproject.service.impl.PushMessageServiceImpl.pushMessage(PushMessageServiceImpl.java:88)
at com.mychery.awesomeproject.service.impl.PushMessageServiceImpl.PCPushMessage(PushMessageServiceImpl.java:55)
at com.mychery.awesomeproject.controller.PushMessageController.messagePush(PushMessageController.java:44)
at com.mychery.awesomeproject.controller.PushMessageController$$FastClassBySpringCGLIB$$98daf70f.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
binarywang commentedon Jun 8, 2021
请发出原始报文,看样子是由于出现了数组
binarywang commentedon Jun 8, 2021
如果我没看错,官方文档是这样写的:
pingtiandasheng commentedon Jun 8, 2021
是的,官网的返回实例现在是这样的
{
"errcode" : 0,
"errmsg" : "ok",
"invaliduser" : ["userid1","userid2","CorpId1/userid1","CorpId2/userid2"], // 不区分大小写,返回的列表都统一转为小写
"invalidparty" : ["partyid1","partyid2","LinkedId1/partyid1","LinkedId2/partyid2"],
"invalidtag":["tagid1","tagid2"]
}
pingtiandasheng commentedon Jun 8, 2021
我看到的官网咋是这样的
{
"errcode" : 0,
"errmsg" : "ok",
"invaliduser" : ["userid1","userid2","CorpId1/userid1","CorpId2/userid2"], // 不区分大小写,返回的列表都统一转为小写
"invalidparty" : ["partyid1","partyid2","LinkedId1/partyid1","LinkedId2/partyid2"],
"invalidtag":["tagid1","tagid2"]
}
api地址
https://work.weixin.qq.com/api/doc/90000/90135/90250
binarywang commentedon Jun 8, 2021
你用的是互联企业的消息推送?看来两种消息返回结构不一致导致的
pingtiandasheng commentedon Jun 8, 2021
嗯嗯是的
pingtiandasheng commentedon Jun 9, 2021
期待大神们丰富一下这一块
binarywang commentedon Jun 9, 2021
期待不如自己马上行动,提交PR,这是目前最快的方法,你如果要等大佬行动,那可要且等了
[-]接口返回字段类型和企业微信官网api不一致[/-][+]互联企业的消息推送接口返回字段类型和企业微信官网api不一致[/+][-]互联企业的消息推送接口返回字段类型和企业微信官网api不一致[/-][+]互联企业的消息推送接口返回字段类型和官网api不一致[/+]互联企业的消息推送接口返回字段类型和官网api不一致 binarywang#2148
互联企业的消息推送接口返回字段类型和官网api不一致 binarywang#2148
🐛 #2148 【企业微信】修复互联企业消息推送接口返回字段问题
Merge branch 'develop' of github.com:Wechat-Group/WxJava into develop
stale commentedon Aug 10, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.