Package com.freewebsys.sns.pojo

Examples of com.freewebsys.sns.pojo.Blog


   */
  @Override
  @Transactional
  public void deleteBlogById(Integer id) throws BlogException {
    try {
      Blog blog = (Blog) baseDao.findById(Blog.class, id);
      baseDao.delete(blog);
    } catch (Exception e) {
      throw new BlogException("Blog删除异常");
    }
  }
View Full Code Here


      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);
      }
View Full Code Here

TOP

Related Classes of com.freewebsys.sns.pojo.Blog

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.