Package org.hamster.weixinmp.dao.entity.msg

Examples of org.hamster.weixinmp.dao.entity.msg.WxMsgTextEntity


  @Autowired(required = false)
  protected WxConfig wxConfig;

  public WxMsgTextEntity saveMsgText(Element ele) throws DocumentException {
    WxMsgTextEntity msgText = WxXmlUtil.getMsgText(ele);
    if (msgTextDao != null) {
      msgTextDao.save(msgText);
    } else {

    }
View Full Code Here


      + "<Content><![CDATA[this is a test]]></Content>"
      + "<MsgId>1234567890123456</MsgId>" + "</xml>";
 
  @Test
  public void testGetMsgText() throws DocumentException {
    WxMsgTextEntity msgText = WxXmlUtil.getMsgText(WxXmlUtil.toXML(MSG_TEXT_XML));
    assertBaseFieldsWithMsgId(msgText);
    Assert.assertEquals("this is a test", msgText.getContent());
  }
View Full Code Here

   * @param xmlstr
   * @return
   * @throws DocumentException
   */
  public static WxMsgTextEntity getMsgText(Element ele) throws DocumentException {
    WxMsgTextEntity result = msgEntityFactory(WxMsgTextEntity.class, ele);
    result.setMsgId(longVal(ele, "MsgId"));
    result.setContent(strVal(ele, "Content"));
    return result;
  }
View Full Code Here

TOP

Related Classes of org.hamster.weixinmp.dao.entity.msg.WxMsgTextEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.