weixin4j-qy:会话API暴露到WeixinProxy类&重命名NotifyApi#sendNotify为sendNotifyMessage

This commit is contained in:
jinyu
2015-08-09 09:25:22 +08:00
parent 000cfacd6b
commit 23c7960a83
10 changed files with 191 additions and 34 deletions
@@ -30,7 +30,7 @@ public class CruxMessageHandler extends DefaultHandler {
private String toUserName;
private String msgType;
private String eventType;
private boolean agentId;
private boolean hasAgent;
private Set<String> nodeNames;
private String content;
@@ -41,7 +41,7 @@ public class CruxMessageHandler extends DefaultHandler {
toUserName = null;
msgType = null;
eventType = null;
agentId = false;
hasAgent = false;
nodeNames = new HashSet<String>();
}
@@ -57,8 +57,8 @@ public class CruxMessageHandler extends DefaultHandler {
msgType = content.toLowerCase();
} else if (localName.equalsIgnoreCase("event")) {
eventType = content.toLowerCase();
} else if (localName.equalsIgnoreCase("agentId")) {
agentId = true;
} else if (localName.startsWith("agent")) {
hasAgent = true;
}
}
@@ -69,7 +69,7 @@ public class CruxMessageHandler extends DefaultHandler {
}
public AccountType getAccountType() {
if (agentId) {
if (hasAgent) {
return AccountType.QY;
}
if (StringUtil.isBlank(msgType) && StringUtil.isBlank(eventType)) {