Exemple #1
0
 /**
  * 功能描述:为formBean赋初值
  *
  * @param dataCount
  * @param formBean
  */
 public void setFormBean(DataCount dataCount, DefaultForm formBean)
     throws DBException, LogicException {
   if (dataCount != null) {
     formBean.setNewFriend(dataCount.getNewFriend().toString());
     formBean.setNewSalutation(dataCount.getNewSalutation().toString());
     formBean.setNewShortMessage(dataCount.getNewShortMessage().toString());
     formBean.setNewTeacherAppraise(dataCount.getNewTeacherAppraise().toString());
   }
 }
Exemple #2
0
 /**
  * 功能描述:用户进入打招呼页面后,把统计表的新招呼字段清零
  *
  * @param userId
  * @return
  * @throws DBException
  */
 public boolean clearNewSalutation(Long userId) throws DBException {
   DataCount dataCount = findDataCountByUserId(userId);
   // 判断是否存在这样的用户统计实体
   if (dataCount != null) {
     Long newSalutation = dataCount.getNewSalutation();
     if (newSalutation != null) {
       dataCount.setNewSalutation(new Long(0));
       dataCountDao.update(dataCount);
       return true;
     }
   }
   return false;
 }