Exemplo n.º 1
0
 /**
  * Function: 根据用户ID加发帖数</br>
  *
  * <p>Produce describe:
  *
  * @param userId
  * @throws DBException
  * @author: You 2008-4-17
  */
 public void addCircleTopicTotalByUserId(long userId) throws DBException {
   // TODO Auto-generated method stub
   DataCount dc = this.findDataCountByUserId(userId);
   if (dc != null) {
     // 加1
     if (dc.getCircleTopicTopTotal() == null) {
       dc.setCircleTopicTotal(new Long(1));
     } else {
       dc.setCircleTopicTotal(dc.getCircleTopicTotal() + 1);
     }
     this.update(dc);
   } else {
     DataCount tt = new DataCount();
     tt.setUserId(userId);
     tt.setCircleTopicTopTotal(new Long(1));
     this.save(tt);
   }
 }