public override IResponseMessageBase DefaultResponseMessage(IRequestMessageBase requestMessage) { var ruleMng = new Pasys.Web.WeiXin.RequestRuleManager(); var rules = ruleMng.FindRules("default", RequestRuleMatchType.FullWord); if (rules == null || rules.Count == 0) { return(new ResponseMessageNoResponse()); } if (rules[0].ResponseMessage != null) { return(rules[0].ResponseMessage.ToResponseMessage()); } return(new ResponseMessageNoResponse()); }
public override IResponseMessageBase OnEvent_ClickRequest(RequestMessageEvent_Click requestMessage) { //var responseMessage = base.CreateResponseMessage<ResponseMessageText>(); var ruleMng = new Pasys.Web.WeiXin.RequestRuleManager(); var rules = ruleMng.FindRules(requestMessage.EventKey, RequestRuleMatchType.FullWord); if (rules == null || rules.Count == 0) { return(new ResponseMessageNoResponse()); } if (rules[0].ResponseMessage != null) { return(rules[0].ResponseMessage.ToResponseMessage()); } return(new ResponseMessageNoResponse()); }