mirror of
https://github.com/ttttupup/wxhelper.git
synced 2024-11-05 18:09:24 +08:00
数据判断,避免抛出错误
This commit is contained in:
parent
a3d689d80a
commit
a94dfa9f71
@ -206,7 +206,11 @@ public class WxMsgHandle {
|
|||||||
try {
|
try {
|
||||||
String content = chatMsg.getContent();
|
String content = chatMsg.getContent();
|
||||||
Document document = XmlUtil.parseXml(content);
|
Document document = XmlUtil.parseXml(content);
|
||||||
Node paysubtype = document.getElementsByTagName("paysubtype").item(0);
|
NodeList paysubtype1 = document.getElementsByTagName("paysubtype");
|
||||||
|
if(paysubtype1.getLength()==0){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Node paysubtype = paysubtype1.item(0);
|
||||||
if ("1".equals(paysubtype.getTextContent().trim())) {
|
if ("1".equals(paysubtype.getTextContent().trim())) {
|
||||||
// 手机发出去的
|
// 手机发出去的
|
||||||
String textContent = document.getElementsByTagName("receiver_username").item(0).getTextContent();
|
String textContent = document.getElementsByTagName("receiver_username").item(0).getTextContent();
|
||||||
|
Loading…
Reference in New Issue
Block a user