Stringsql="select * from fc_admin_group"+StringUtil.join(" and "," where ","","",argEdit.getStringList());
Stringsql="select ag.*, (select count(adminid) from fc_admin a where a.group_id = ag.group_id) user_count from fc_admin_group ag"+StringUtil.join(" and "," where ","","",argEdit.getStringList());
Stringsql="select u.*, ug.group_name from fc_user u left join fc_user_group ug on ug.group_id = u.group_id"+StringUtil.join(" and "," where ","","",w.getStringList());
Stringsql="select u.*, ug.group_name from fc_user u left join fc_user_group ug on ug.group_id = u.group_id"+StringUtil.join(" and "," where ","","",w.getStringList());
Stringsql="select mf.*, ifnull(rv.review_state, 0) review_state, (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 rv on rv.film_id = mf.id and rv.review_round = mf.review_round"+StringUtil.join(" and "," where ","","",where.getStringList());
Stringsql="select mf.*, ifnull(rv.review_state, 0) review_state, (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 rv on rv.film_id = mf.id"+StringUtil.join(" and "," where ","","",where.getStringList());
Object[]objs=where.getObjectList();
Object[]objs=where.getObjectList();
returnjdbcTemplate.limit(sql,page,objs);
returnjdbcTemplate.limit(sql,page,objs);
}
}
...
@@ -456,44 +456,44 @@ public class FilmServiceImpl implements FilmService {
...
@@ -456,44 +456,44 @@ public class FilmServiceImpl implements FilmService {
Fc_member_filmfilm=this.jdbcTemplate.queryForBean("select * from fc_member_film where id = ?",Fc_member_film.class,member_film_id);
Fc_member_film_enrollenroll=this.jdbcTemplate.queryForBean("select * from fc_member_film_enroll where film_id = ? and enroll_type_id = ?",Fc_member_film_enroll.class,member_film_id,enroll_type_id);
Integerround=film.getReview_round();
Integerround=enroll.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 review_round = ? where id = ?",nextRound,member_film_id);
jdbcTemplate.executeUpdate("update fc_member_film_enroll set review_round = ? where film_id = ? and enroll_type_id = ?",nextRound,member_film_id,enroll_type_id);
Integercount=jdbcTemplate.queryForInt("select count(id) from fc_review where film_id = ? and review_round = ?",member_film_id,nextRound);
Integercount=jdbcTemplate.queryForInt("select count(id) from fc_review where film_id = ? and review_round = ? and enroll_type_id = ?",member_film_id,nextRound,enroll_type_id);
Stringsql="select mf.id, r.review_round, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, 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, fc_review r where r.film_id = mf.id"+StringUtil.join(" and "," and ","","",w1.getStringList());
Stringsql="select mf.id, mf.review_round, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, 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());
if(enroll_type_id!=null){
if(enroll_type_id!=null){
sql="select t.* from ("+sql+") t, fc_member_film_enroll mfe where t.id = mfe.film_id and mfe.enroll_type_id = "+enroll_type_id;
sql="select t.* from ("+sql+") t, fc_member_film_enroll mfe where t.id = mfe.film_id and mfe.enroll_type_id = "+enroll_type_id;
}
}
...
@@ -502,16 +502,21 @@ public class FilmServiceImpl implements FilmService {
...
@@ -502,16 +502,21 @@ public class FilmServiceImpl implements FilmService {
jdbcTemplate.executeUpdate("delete from fc_review_user where film_id = ? and review_round = ?",member_film_id,review_round);
Fc_reviewreview=jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ? and review_round = ?",Fc_review.class,member_film_id,enroll_type_id,review_round);
jdbcTemplate.executeUpdate("delete from fc_review_user where review_id = ?",review.getId());