@@ -51,10 +51,17 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -51,10 +51,17 @@ public class ReviewServiceImpl implements ReviewService {
.eq("mf.film_country",film_country)
.eq("mf.film_country",film_country)
.gt("r.review_round",0)
.gt("r.review_round",0)
.eq("r.review_round",review_round)
.eq("r.review_round",review_round)
.eq("r.enroll_type_id",enroll_type_id)
.eq("r.review_state",review_state)
.eq("r.review_state",review_state)
.eq("r.allot_state",allot_state)
.eq("r.allot_state",allot_state)
.eq("r.opt_state",opt_state);
.eq("r.opt_state",opt_state);
Stringsql_film="fc_member_film";
if(StringUtil.isNotBlank(enroll_type_id)){
sql_film="(select mf0.* from fc_member_film mf0, fc_member_film_enroll mfe where mf0.id = mfe.film_id and mfe.enroll_type_id = "+enroll_type_id+")";
}
Stringsql=""
Stringsql=""
+"select "
+"select "
+"mf.id, "
+"mf.id, "
...
@@ -65,6 +72,8 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -65,6 +72,8 @@ public class ReviewServiceImpl implements ReviewService {
+"mf.film_country, "
+"mf.film_country, "
+"mf.film_type_name, "
+"mf.film_type_name, "
+"mf.film_type_name_short, "
+"mf.film_type_name_short, "
+"mf.enroll_type_name, "
+"mf.enroll_type_name_other, "
+"mf.upload_state, "
+"mf.upload_state, "
+"mf.play_shanghai, "
+"mf.play_shanghai, "
+"r.id review_id, "
+"r.id review_id, "
...
@@ -72,11 +81,10 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -72,11 +81,10 @@ public class ReviewServiceImpl implements ReviewService {
+"r.review_state, "
+"r.review_state, "
+"r.allot_state, "
+"r.allot_state, "
+"r.opt_state, "
+"r.opt_state, "
+"r.enroll_type_id, "
+"(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director' group by fp.film_id, fp.playactor_type) director_name, "
+"(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director' group by fp.film_id, fp.playactor_type) director_name, "
+"count(rr.id) user_count "
+"count(rr.id) user_count "
+"from "
+"from "
+"fc_member_film mf, "
+sql_film+" mf, "
+"fc_review r left join fc_review_record rr on rr.review_id = r.id and rr.review_round = r.review_round "
+"fc_review r left join fc_review_record rr on rr.review_id = r.id and rr.review_round = r.review_round "
+"where "
+"where "
+"r.film_id = mf.id "
+"r.film_id = mf.id "
...
@@ -90,14 +98,15 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -90,14 +98,15 @@ public class ReviewServiceImpl implements ReviewService {
.where("r.review_round in (select ugf.fun_id from fc_user_group_fun ugf, fc_user u where ugf.group_id = u.group_id and u.uid = ?)",newObject[]{user_id})
.where("r.review_round in (select ugf.fun_id from fc_user_group_fun ugf, fc_user u where ugf.group_id = u.group_id and u.uid = ?)",newObject[]{user_id})
.where(is_review?"rr.review_state is not null":"rr.review_state is null",newObject[]{})
.where(is_review?"rr.review_state is not null":"rr.review_state is null",newObject[]{})
;
;
Stringsql_film="fc_member_film";
if(StringUtil.isNotBlank(enroll_type_id)){
sql_film="(select mf0.* from fc_member_film mf0, fc_member_film_enroll mfe where mf0.id = mfe.film_id and mfe.enroll_type_id = "+enroll_type_id+")";
}
Stringsql=""
Stringsql=""
+"select "
+"select "
+"mf.id, "
+"mf.id, "
...
@@ -131,9 +145,10 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -131,9 +145,10 @@ public class ReviewServiceImpl implements ReviewService {
+"mf.film_country, "
+"mf.film_country, "
+"mf.film_type_name, "
+"mf.film_type_name, "
+"mf.film_type_name_short, "
+"mf.film_type_name_short, "
+"mf.enroll_type_name, "
+"mf.enroll_type_name_other, "
+"mf.upload_state, "
+"mf.upload_state, "
+"r.id review_id, "
+"r.id review_id, "
+"r.enroll_type_id, "
+"r.review_round, "
+"r.review_round, "
+"r.allot_state, "
+"r.allot_state, "
+"r.review_state, "
+"r.review_state, "
...
@@ -148,7 +163,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -148,7 +163,7 @@ public class ReviewServiceImpl implements ReviewService {