Commit 39941b1c authored by Quxl's avatar Quxl

x

parent 93a335fb
......@@ -458,8 +458,11 @@ public class FilmServiceImpl implements FilmService {
@Override
@Transactional
public void toNextRound(Long member_film_id, Integer enroll_type_id) {
Integer count = jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1 where film_id = ? and enroll_type_id = ?", member_film_id, enroll_type_id);
if(count == 0) {
try {
Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ?", Fc_review.class, member_film_id, enroll_type_id);
Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review.getId());
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ? where review_id = ?", count > 0 ? 1 : 0, review.getId());
} catch (Exception e) {
Fc_review review = new Fc_review();
review.setEnroll_type_id(enroll_type_id);
review.setFilm_id(member_film_id.intValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment