料青山看我应如是
ublic int save(Notices notice) throws SQLException{String sql = "insert into noticeinfo(notice_title,notice_type,notice_content,notice_add_time,user_id,user_table_id,class_table_id,notice_state,is_important)"+"values(?,?,?,?,?,?,?,?,?)";PreparedStatement pstmt = super.getConnection().prepareStatement(sql);pstmt.setString(1, notice.getNotice_title());pstmt.setInt(2, notice.getNotice_type());pstmt.setString(3, notice.getNotice_content());pstmt.setTimestamp(4, new Timestamp(System.currentTimeMillis()));pstmt.setString(5, notice.getUser_id());pstmt.setInt(6, notice.getUser_table_id());pstmt.setInt(7, notice.getClass_table_id());pstmt.setInt(8, notice.getNotice_state());pstmt.setInt(9, notice.getIs_important());int i = pstmt.executeUpdate();return i;}