//事件 else if(msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_EVENT)){ //事件类型 String eventType=requestMap.get("Event"); //关注事件 if(eventType.equals(MessageUtil.EVENT_TYPE_SUBSCRIBE)){ tm.setContent("欢迎关注电计学院作品展示平台!"); } else if(eventType.equals(MessageUtil.EVENT_TYPE_UNSUBSCRIBE)){ } //菜单点击事件 else if(eventType.equals(MessageUtil.EVENT_TYPE_CLICK)){ //Key String EventKey=requestMap.get("EventKey"); } //单图文消息(无图) else if(eventType.equals(MessageUtil.EVENT_TYPE_CLICK)){ //Key String EventKey=requestMap.get("EventKey"); if(EventKey.equals("KEY_11")){ Article article = new Article(); article.setTitle("作品演示视频"); article.setDescription("以下是历届电计学生的优秀作品演示视频"); article.setPicUrl(""); article.setUrl("http://www.baidu.com"); List<Article>articleList = new ArrayList<Article>(); articleList.add(article); NewsMessage newsMessage = new NewsMessage(); newsMessage.setFromUserName(toUserName); newsMessage.setToUserName(fromUserName); newsMessage.setCreateTime(new Date().getTime()); newsMessage.setMsgType(MessageUtil.RESP_MESSAGE_TYPE_NEWS); newsMessage.setArticleCount(articleList.size()); newsMessage.setArticles(articleList); respXML = MessageUtil.messageToXML(newsMessage); } }
添加回答
举报
0/150
提交
取消