Commit 0cec4ad5 authored by Quxl's avatar Quxl

x

parent ef4c7371
......@@ -401,7 +401,7 @@ public class FilmServiceImpl implements FilmService {
Integer apply_state,
Integer upload_state,
Integer film_type,
Integer enroll_type,
Integer enroll_type_id,
String film_country,
Integer film_type_short,
String play_shanghai,
......@@ -418,9 +418,13 @@ public class FilmServiceImpl implements FilmService {
.eq("mf.film_type_name_short", film_type_short)
.eq("mf.film_country", film_country)
.eq("mf.play_shanghai", play_shanghai)
.lk("mf.enroll_type_name", enroll_type)
.lk(new String[]{"mf.en_name", "mf.cn_name", "fp.playactor_name"}, keyword);
String sql_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 + ")";
}
String sql = ""
+ "select "
+ "mf.id, "
......@@ -429,6 +433,8 @@ public class FilmServiceImpl implements FilmService {
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.enroll_type_name, "
+ "mf.enroll_type_name_other, "
+ "mf.film_total_time, "
+ "mf.completion_date, "
+ "mf.play_shanghai, "
......@@ -440,13 +446,12 @@ public class FilmServiceImpl implements FilmService {
+ "mf.enroll_type_name, "
+ "fg.group_name, "
+ "r.review_round, "
+ "r.enroll_type_id, "
+ "r.review_state, "
+ "r.allot_state, "
+ "r.opt_state, "
+ "group_concat(fp.playactor_name) director_name "
+ "from "
+ " fc_member_film_playactor fp, fc_member_film mf "
+ " fc_member_film_playactor fp, " + sql_film + " mf "
+ "left join fc_review r on r.film_id = mf.id "
+ "left join fc_film_group fg on fg.id = mf.film_group_id "
+ "where "
......@@ -460,6 +465,8 @@ public class FilmServiceImpl implements FilmService {
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.enroll_type_name, "
+ "mf.enroll_type_name_other, "
+ "mf.film_total_time, "
+ "mf.completion_date, "
+ "mf.play_shanghai, "
......@@ -470,7 +477,6 @@ public class FilmServiceImpl implements FilmService {
+ "mf.film_country, "
+ "fg.group_name, "
+ "r.review_round, "
+ "r.enroll_type_id, "
+ "r.review_state, "
+ "r.allot_state, "
+ "r.opt_state "
......
......@@ -51,10 +51,17 @@ public class ReviewServiceImpl implements ReviewService {
.eq("mf.film_country", film_country)
.gt("r.review_round", 0)
.eq("r.review_round", review_round)
.eq("r.enroll_type_id", enroll_type_id)
.eq("r.review_state", review_state)
.eq("r.allot_state", allot_state)
.eq("r.opt_state", opt_state);
String sql_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 + ")";
}
String sql = ""
+ "select "
+ "mf.id, "
......@@ -65,6 +72,8 @@ public class ReviewServiceImpl implements ReviewService {
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.enroll_type_name, "
+ "mf.enroll_type_name_other, "
+ "mf.upload_state, "
+ "mf.play_shanghai, "
+ "r.id review_id, "
......@@ -72,11 +81,10 @@ public class ReviewServiceImpl implements ReviewService {
+ "r.review_state, "
+ "r.allot_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, "
+ "count(rr.id) user_count "
+ "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 "
+ "where "
+ "r.film_id = mf.id "
......@@ -90,14 +98,15 @@ public class ReviewServiceImpl implements ReviewService {
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.enroll_type_name, "
+ "mf.enroll_type_name_other, "
+ "mf.upload_state, "
+ "mf.play_shanghai, "
+ "r.id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state, "
+ "r.opt_state, "
+ "r.enroll_type_id "
+ "r.opt_state "
;
return jdbcTemplate.limit(sql, page, w1.getObjectList());
......@@ -117,10 +126,15 @@ public class ReviewServiceImpl implements ReviewService {
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.ge("r.push_time", start_date)
.lt("r.push_time", end_date == null ? null : DateUtil.end(end_date))
.eq("r.enroll_type_id", enroll_type_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 = ?)", new Object[]{user_id})
.where(is_review ? "rr.review_state is not null" : "rr.review_state is null", new Object[]{})
;
String sql_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 + ")";
}
String sql = ""
+ "select "
+ "mf.id, "
......@@ -131,9 +145,10 @@ public class ReviewServiceImpl implements ReviewService {
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.enroll_type_name, "
+ "mf.enroll_type_name_other, "
+ "mf.upload_state, "
+ "r.id review_id, "
+ "r.enroll_type_id, "
+ "r.review_round, "
+ "r.allot_state, "
+ "r.review_state, "
......@@ -148,7 +163,7 @@ public class ReviewServiceImpl implements ReviewService {
+ "rr.review_text_3, "
+ "rr.review_text_4 "
+ "from "
+ "fc_member_film mf, fc_review r, fc_review_record rr "
+ sql_film + " mf, fc_review r, fc_review_record rr "
+ "where "
+ "mf.id = r.film_id "
+ "and r.id = rr.review_id "
......
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