Fc_reviewreview=jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ?",Fc_review.class,member_film_id,enroll_type_id);
review.setEnroll_type_id(enroll_type_id);
Integercount=jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?",review.getId());
review.setFilm_id(member_film_id.intValue());
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ?, push_time = ? where review_id = ?",count>0?1:0,now,review.getId());
review.setReview_round(1);
}catch(Exceptione){
review.setReview_state(0);
Fc_reviewreview=newFc_review();
review.setPush_time(now);
review.setEnroll_type_id(enroll_type_id);
review.setCreate_time(now);
review.setFilm_id(member_film_id.intValue());
jdbcTemplate.save(review);
review.setReview_round(1);
}
review.setReview_state(0);
review.setPush_time(now);
@Override
review.setCreate_time(now);
@Transactional
jdbcTemplate.save(review);
publicvoidtoNextRound(Integerreview_id){
Integercount=jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?",review_id);
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ?, push_time = ? where id = ?",count>0?1:0,newDate(),review_id);