intcount=jdbcTemplate.executeUpdate("update fc_member_film set state = 2, apply_state = 1 where id = ? and member_id = ? and state = 1",member_film_id,member_id);
jdbcTemplate.executeUpdate("update fc_member_film set play_shanghai = ?, last_modify_time = ? where id = ?",play_shanghai,last_modify_time,member_film_id);
jdbcTemplate.executeUpdate("delete from fc_member_film_show where film_id = ?",member_film_id);
Integerfilm_no=jdbcTemplate.queryForInt("select ifnull(max(film_no), 0) + 1 from fc_member_film");
Stringsql="update fc_member_film set film_no = ?, apply_state = 2, upload_state = 0, pass_time = ? where id = ? and (film_no is null or film_no = '')";
Fc_member_filmfilm=jdbcTemplate.queryForBean("select enroll_type_name, enroll_type_name_other from fc_member_film where id = ?",Fc_member_film.class,member_film_id);
jdbcTemplate.executeUpdate("update fc_member_film set admin_creator = ?, member_id = ?, create_ip = ?, create_time = ?, last_modify_time = ? where id = ?",admin_id,member_id,create_ip,now,now,id);
}
@Override
@Transactional
publicvoidexchangeFilmNo(Integerid1,Integerid2){
Fc_member_filmf1=jdbcTemplate.queryForBean("select id, film_no from fc_member_film where id = ?",Fc_member_film.class,id1);
Fc_member_filmf2=jdbcTemplate.queryForBean("select id, film_no from fc_member_film where id = ?",Fc_member_film.class,id2);
jdbcTemplate.batchUpdate("update fc_member_film set film_no = ? where id = ?",newObject[][]{{f1.getFilm_no(),id2},{f2.getFilm_no(),id1}});
jdbcTemplate.batchUpdate("update fc_member_film set state = 2, apply_state = ? where id = ?",newObject[][]{{1,id1},{3,id2}});
jdbcTemplate.batchUpdate("delete from fc_review_record_ext where record_id in (select id from fc_review_record where review_id in (select id from fc_review where film_id = ?))",newObject[][]{{id1},{id2}});
jdbcTemplate.batchUpdate("delete from fc_review_record where review_id in (select id from fc_review where film_id = ?)",newObject[][]{{id1},{id2}});
jdbcTemplate.batchUpdate("delete from fc_review_history where review_id in (select id from fc_review where film_id = ?)",newObject[][]{{id1},{id2}});
jdbcTemplate.batchUpdate("delete from fc_review where id = ?",newObject[][]{{id1},{id2}});
intcount=jdbcTemplate.executeUpdate("update fc_member_film set state = 2, apply_state = 1 where id = ? and member_id = ? and state = 1",member_film_id,member_id);
jdbcTemplate.executeUpdate("update fc_member_film set play_shanghai = ?, last_modify_time = ? where id = ?",play_shanghai,last_modify_time,member_film_id);
jdbcTemplate.executeUpdate("delete from fc_member_film_show where film_id = ?",member_film_id);
Integerfilm_no=jdbcTemplate.queryForInt("select ifnull(max(film_no), 0) + 1 from fc_member_film");
Stringsql="update fc_member_film set film_no = ?, apply_state = 2, upload_state = 0, pass_time = ? where id = ? and (film_no is null or film_no = '')";
Fc_member_filmfilm=jdbcTemplate.queryForBean("select enroll_type_name, enroll_type_name_other from fc_member_film where id = ?",Fc_member_film.class,member_film_id);
jdbcTemplate.executeUpdate("update fc_member_film set admin_creator = ?, member_id = ?, create_ip = ?, create_time = ?, last_modify_time = ? where id = ?",admin_id,member_id,create_ip,now,now,id);
}
@Override
@Transactional
publicvoidexchangeFilmNo(Integerid1,Integerid2){
Fc_member_filmf1=jdbcTemplate.queryForBean("select id, film_no from fc_member_film where id = ?",Fc_member_film.class,id1);
Fc_member_filmf2=jdbcTemplate.queryForBean("select id, film_no from fc_member_film where id = ?",Fc_member_film.class,id2);
jdbcTemplate.batchUpdate("update fc_member_film set film_no = ? where id = ?",newObject[][]{{f1.getFilm_no(),id2},{f2.getFilm_no(),id1}});
jdbcTemplate.batchUpdate("update fc_member_film set state = 2, apply_state = ? where id = ?",newObject[][]{{1,id1},{3,id2}});
jdbcTemplate.batchUpdate("delete from fc_review_record_ext where record_id in (select id from fc_review_record where review_id in (select id from fc_review where film_id = ?))",newObject[][]{{id1},{id2}});
jdbcTemplate.batchUpdate("delete from fc_review_record where review_id in (select id from fc_review where film_id = ?)",newObject[][]{{id1},{id2}});
jdbcTemplate.batchUpdate("delete from fc_review_history where review_id in (select id from fc_review where film_id = ?)",newObject[][]{{id1},{id2}});
jdbcTemplate.batchUpdate("delete from fc_review where id = ?",newObject[][]{{id1},{id2}});