Esempio n. 1
0
  // 更新评论
  @Override
  public int updateComment(long id, String content) {

    int code = 13024;

    try {
      Comment comment = commentDao.getComment(id);
      comment.setContent(content);
      if (commentDao.update(comment)) {
        code = 13021;
      } else {
        code = 13023;
      }

    } catch (Exception e) {
      e.printStackTrace();
    }

    return code;
  }