将微信自带的一些常量修正为不区分大小写匹配

比如框架定义的事件常量为click,但微信传递过来的却是CLICK
This commit is contained in:
liuwj 2015-07-23 11:16:36 +08:00
parent b9923b3ecf
commit bc054d6259

View File

@ -214,11 +214,11 @@ public class WxMpMessageRouterRule {
return
(this.fromUser == null || this.fromUser.equals(wxMessage.getFromUserName()))
&&
(this.msgType == null || this.msgType.toLowerCase().equals(wxMessage.getMsgType()==null?null:wxMessage.getMsgType().toLowerCase()))
(this.msgType == null || this.msgType.toLowerCase().equals((wxMessage.getMsgType()==null?null:wxMessage.getMsgType().toLowerCase())))
&&
(this.event == null || this.event.toLowerCase().equals(wxMessage.getEvent()==null?null:wxMessage.getEvent().toLowerCase()))
(this.event == null || this.event.toLowerCase().equals((wxMessage.getEvent()==null?null:wxMessage.getEvent().toLowerCase())))
&&
(this.eventKey == null || this.eventKey.toLowerCase().equals(wxMessage.getEventKey()==null?null:wxMessage.getEventKey().toLowerCase()))
(this.eventKey == null || this.eventKey.toLowerCase().equals((wxMessage.getEventKey()==null?null:wxMessage.getEventKey().toLowerCase())))
&&
(this.content == null || this.content
.equals(wxMessage.getContent() == null ? null : wxMessage.getContent().trim()))