Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,28 @@ public WxCpTpMessageRouterRule async(boolean async) {
return this;
}

/**
* 如果msgType等于某值
*
* @param msgType the msg type
* @return the wx cp tp message router rule
*/
public WxCpTpMessageRouterRule msgType(String msgType) {
this.msgType = msgType;
return this;
}

/**
* 如果event等于某值
*
* @param event the event
* @return the wx cp tp message router rule
*/
public WxCpTpMessageRouterRule event(String event) {
this.event = event;
return this;
}

/**
* 匹配 Message infoType
*
Expand Down Expand Up @@ -192,6 +214,8 @@ protected boolean test(WxCpTpXmlMessage wxMessage) {
&&
(this.msgType == null || this.msgType.equalsIgnoreCase(wxMessage.getMsgType()))
&&
(this.event == null || this.event.equalsIgnoreCase(wxMessage.getEvent()))
&&
(this.infoType == null || this.infoType.equals(wxMessage.getInfoType()))
&&
(this.suiteTicket == null || this.suiteTicket.equalsIgnoreCase(wxMessage.getSuiteTicket()))
Expand Down