feed.setUserId(this.userInfo.getId());// 用户Id
feed.setUserName(this.userInfo.getName());// 用户名
if (this.obj instanceof Blog) {// 当类型是日志
feed.setFeedType("blog");
Blog blog = (Blog) this.obj;
feed.setTitleData(blog.getTitle());
String html = "";
if (blog.getContent() != null
&& blog.getContent().length() > 200) {
// 取前200 个字符
html = blog.getContent().substring(0, 200);
} else if (blog.getContent() != null) {
html = blog.getContent();
}
feed.setContentData(html);
baseDao.save(feed);
}