@@ -492,17 +492,18 @@ public class FilmServiceImpl implements FilmService {
...
@@ -492,17 +492,18 @@ public class FilmServiceImpl implements FilmService {
}
}
@Override
@Override
@Transactional
publicvoidtoNextRound(Longmember_film_id){
publicvoidtoNextRound(Longmember_film_id){
Fc_member_filmfilm=this.jdbcTemplate.queryForBean("select * from fc_member_film where id = ?",Fc_member_film.class,member_film_id);
Fc_member_filmfilm=this.jdbcTemplate.queryForBean("select * from fc_member_film where id = ?",Fc_member_film.class,member_film_id);
Integerround=film.getRound();
Integerround=film.getReview_round();
IntegernextRound=null;
IntegernextRound=null;
if(round==null||round==0){
if(round==null||round==0){
nextRound=1;
nextRound=1;
}else{
}else{
nextRound=round+1;
nextRound=round+1;
}
}
jdbcTemplate.executeUpdate("update fc_member_film set round = ? where id = ?",nextRound,member_film_id);
jdbcTemplate.executeUpdate("update fc_member_film set review_round = ? where id = ?",nextRound,member_film_id);
List<Fc_review>reviews=jdbcTemplate.queryForBeans("select * from fc_review where film_id = ? and round = ?",Fc_review.class,member_film_id,nextRound);
List<Fc_review>reviews=jdbcTemplate.queryForBeans("select * from fc_review where film_id = ? and review_round = ?",Fc_review.class,member_film_id,nextRound);
if(reviews==null||reviews.size()==0){
if(reviews==null||reviews.size()==0){
Fc_reviewreview=newFc_review();
Fc_reviewreview=newFc_review();
review.setFilm_id(member_film_id.intValue());
review.setFilm_id(member_film_id.intValue());
...
@@ -512,4 +513,23 @@ public class FilmServiceImpl implements FilmService {
...
@@ -512,4 +513,23 @@ public class FilmServiceImpl implements FilmService {
Stringsql="select mf.*, r.review_state, r.result_text, (select GROUP_CONCAT(mfd.playactor_name) from fc_member_film_playactor mfd where mfd.film_id = mf.id and mfd.playactor_type = 'director') director_name from fc_member_film mf left join fc_review r on r.film_id = mf.id and r.review_round = mf.review_round"+StringUtil.join(" and "," where ","","",w1.getStringList());