Пример #1
0
 public Pager<MeetingPost> queryPagerByMeetingId(
     final MeetingPost meetingPost, final int currentPage, final int pageSize)
     throws ServiceException {
   Map<String, Object> properties = new HashMap<String, Object>();
   final String sql =
       "from MeetingPost where meetingId="
           + String.valueOf(meetingPost.getMeetingId())
           + " order by modifyTime desc";
   return meetingPostDao.findPager(sql, currentPage, pageSize, properties);
 }
Пример #2
0
 public User getBussinessCardInfo(final Long meetingId, final Long userId) {
   try {
     final Object result = meetingPostDao.getUserInfo(meetingId, userId);
     if (result == null) {
       return null;
     }
     final Object[] resultArray = (Object[]) result;
     final User user = new User();
     user.setMeetingMember(new MeetingMember());
     user.setId(Long.valueOf((Integer) resultArray[0]));
     user.setName((String) resultArray[1]);
     user.setMobile((String) resultArray[2]);
     user.setModifyTime((Date) resultArray[3]);
     user.setState(Integer.valueOf((Short) resultArray[4]));
     user.setGender(
         Integer.valueOf((Short) (resultArray[5] == null ? (short) 1 : resultArray[5])));
     user.setBirthday((String) resultArray[6]);
     user.getMeetingMember().setJob((String) resultArray[7]);
     user.getMeetingMember().setMemberLevel(Integer.valueOf((Short) resultArray[8]));
     user.getMeetingMember()
         .setSortCode(
             resultArray[9] == null ? null : Integer.valueOf(String.valueOf(resultArray[9])));
     user.getMeetingMember()
         .setMobileIsDisplay(
             Integer.valueOf((Short) (resultArray[10] == null ? (short) 1 : resultArray[10])));
     user.getMeetingMember().setCity((String) resultArray[11]);
     user.getMeetingMember().setMailbox((String) resultArray[12]);
     user.getMeetingMember().setAddress((String) resultArray[13]);
     user.getMeetingMember().setAddInContacts(String.valueOf(resultArray[14]));
     user.getMeetingMember().setRoomNumber(String.valueOf(resultArray[15]));
     user.getMeetingMember()
         .setRoomNumberIsDisplay(
             Integer.valueOf((Short) (resultArray[16] == null ? (short) 1 : resultArray[16])));
     user.getMeetingMember()
         .setJobIsDisplay(
             Integer.valueOf((Short) (resultArray[17] == null ? (short) 1 : resultArray[17])));
     return user;
   } catch (Exception e) {
     e.printStackTrace();
     log.error("Failure to get user information.", e);
     return null;
   }
 }
Пример #3
0
 public void addViewCount(final Long postId) {
   meetingPostDao.addViewCount(postId);
 }
Пример #4
0
 public List<MeetingPost> queryListByMeetingId(final Long meetingId) {
   return meetingPostDao.queryListByMeetingId(meetingId);
 }
Пример #5
0
 public void decreaseCommentCount(final Long postId) {
   meetingPostDao.decreaseCommentCount(postId);
 }
Пример #6
0
 public int checkNewPost(final Long meetingId) throws ServiceException {
   return meetingPostDao.checkNewPost(meetingId);
 }
Пример #7
0
 public void addCommentCount(final Long postId) {
   meetingPostDao.addCommentCount(postId);
 }