Description
简要描述
接口返回字段类型和企业微信官网api不一致
模块版本情况
- WxJava 模块名: weixin-java-cp 消息推送
- me.chanjar.weixin.cp.bean.message.WxCpMessageSendResult
- WxJava 版本号:4.1.0
详细描述
@SerializedName("invaliduser")
private String invalidUser;
@SerializedName("invalidparty")
private String invalidParty;
@SerializedName("invalidtag")
private String invalidTag;
字段类型不一致,json转换会报错
日志
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)