ParseErrorException {
if (StringUtils.isEmpty(content)) {
throw new ParseErrorException("输入内容为空");
}
StringWriter writer = new StringWriter();
JCMSVelocityContext context = JCMSVelocityContext.getInstance();
//插入对象
context.put("doc", doc);
context.put("pushRecord", pushRecord);
context.put("tool", tool);
if (pushRecord != null && StringUtils.isNotBlank(pushRecord.getTopicid())) {
Topic topic = topicDao.queryTopicById(pushRecord.getTopicid());
context.put("topic", topic);
}
try {
Velocity.evaluate(context, writer, "VMMessage", content);
writer.flush();