Package com.freewebsys.sns.pojo

Examples of com.freewebsys.sns.pojo.Feed


    @Override
    public void run() {

      System.out.println("开始记录动态.");
      Feed feed = new Feed();// 动态

      feed.setCreateTime(new Date());// 设置时间
      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);
      }

      // 保存用户的好友
      FeedUser feedUser = new FeedUser();
View Full Code Here

TOP

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

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.