Ejemplo n.º 1
0
  @Action(
      value = "myfirstPage",
      results = {
        @Result(name = SUCCESS, type = Constants.RESULT_NAME_TILES, location = ".myGoGoWise")
      })
  public String showUserCenter() {
    //        ActionContext.getContext().getSession().put("WW_TRANS_I18N_LOCALE", Locale.US);
    latestCourse =
        courseDao.findMyCourseOfForcastClassForUserCenter(
            new Pagination(3), this.getSessionUserId());

    todayCourse = courseDao.findTodayCourse(this.getSessionUserId());
    tomorrowCourse = courseDao.findTomorrowCourse(this.getSessionUserId());
    yesterdayCourse = courseDao.findYesterdayCourse(this.getSessionUserId());
    if (moreRequire.equals(Constants.MY_FIRST_PAGE_INTERVIEW_MORE)) {
      interviews = interviewDao.findByUser(this.getSessionUserId(), null);
    } else {
      interviews = interviewDao.findByUser(this.getSessionUserId(), new Pagination(3));
    }
    if (moreRequire.equals(Constants.MY_FIRST_PAGE_MEETING_MORE)) {
      orgMeetings = orgMeetingDao.findForUserCenter(null, this.getSessionUserId());
    } else {
      orgMeetings = orgMeetingDao.findForUserCenter(new Pagination(3), this.getSessionUserId());
    }
    myShows = myShowDao.findByUser(this.getSessionUserId(), new Pagination(3));
    liveChannels = liveChannelDao.findByUserID(this.getSessionUserId(), new Pagination(5));
    for (LiveChannel lc : liveChannels) {
      lc.setUserType(1);
      for (OnliveFollower onf : lc.getOnliveFollowers()) {
        if (onf.getFollower().getId().equals(this.getSessionUserId())) {
          lc.setUserType(Constants.MEMBER_TYPE_OF_FANS);
          break;
        }
      }
    }
    hotCourse = courseDao.findLatest4Course(new Pagination(8));
    userLikeCourse = courseDao.findlatestCourses(new Pagination(4));

    this.baseUser = baseUserDao.findById(this.getSessionUserId());
    this.browsedCourses = browsedCourseDao.findByUserId(this.getSessionUserId());

    Pagination userFansPage = new Pagination(6);
    userFanses = userFansDao.findUsersAsFans(this.getSessionUserId(), userFansPage);
    this.setCurrentPageSize(userFanses.size());
    if (userFansPage.getTotalSize() >= userFanses.size()) {
      this.setNumOverFlow(true);
    }

    matterCount = matterDao.getMatterCount(this.getSessionUserEmail());
    return SUCCESS;
  }
Ejemplo n.º 2
0
 @Action(
     value = "getMoreConcernUserFans",
     results = {
       @Result(name = SUCCESS, type = Constants.RESULT_NAME_TILES, location = ".moreUserFans")
     })
 public String getMoreConcernUserFans() {
   Pagination userFansPage = new Pagination(this.getCurrentPageSize() + 6);
   userFanses = userFansDao.findUsersAsFans(this.getSessionUserId(), pagination);
   this.setCurrentPageSize(userFanses.size());
   if (userFansPage.getTotalSize() == userFanses.size()) {
     this.setNumOverFlow(true);
   }
   return SUCCESS;
 }