Commit 604ade3d authored by Quxl's avatar Quxl

x

parent 7cbf0db2
......@@ -414,44 +414,46 @@ public class FilmServiceImpl implements FilmService {
}
public static void main(String[] args) {
String sql0 = ""
String sql = ""
+ "select "
+ "mf.id, "
+ "mf.film_no, "
+ "mf.origion_name, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.film_total_time, "
+ "mf.completion_date, "
+ "mf.play_shanghai, "
+ "mf.state, "
+ "mf.apply_state, "
+ "mf.upload_id, "
+ "mf.upload_state, "
+ "mf.film_country, "
+ "mf.enroll_type_name, "
+ "group_concat(fp.playactor_name) director_name "
+ "r.id review_id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state, "
+ "r.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, fc_review r, fc_member_film_playactor fp "
+ "fc_member_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 "
+ "mf.id = r.film_id and mf.id = fp.film_id and fp.playactor_type = 'director'"
+ "r.film_id = mf.id "
+ "group by "
+ "mf.id, "
+ "mf.film_no, "
+ "mf.origion_name, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.film_total_time, "
+ "mf.completion_date, "
+ "mf.play_shanghai, "
+ "mf.state, "
+ "mf.apply_state, "
+ "mf.upload_id, "
+ "mf.upload_state, "
+ "mf.film_country ";
System.out.println(sql0);
+ "mf.film_country, "
+ "r.id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state,"
+ "r.enroll_type_id "
;
System.out.println(sql);
}
@Override
......@@ -545,11 +547,11 @@ public class FilmServiceImpl implements FilmService {
SqlWhere w1 = new SqlWhere()
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id})
.eq("mf.upload_state", 1)
.gt("r.review_round", 0)
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.eq("mf.film_type_name", film_type_name)
.eq("mf.film_type_name_short", film_type_name_short)
.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)
......@@ -566,22 +568,23 @@ public class FilmServiceImpl implements FilmService {
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.upload_state, "
+ "r.id review_id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state,"
+ "r.allot_state, "
+ "r.state, "
+ "r.enroll_type_id, "
+ "group_concat(fp.playactor_name) 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 "
+ "from "
+ "fc_member_film mf, fc_review r, fc_review_record rr, fc_member_film_playactor fp "
+ "fc_member_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 "
+ "mf.id = r.film_id "
+ "and r.id = rr.review_id "
+ "and r.review_round = rr.review_round "
+ "and mf.id = fp.film_id "
+ "and fp.playactor_type = 'director' "
+ StringUtil.join(" and ", " and ", "", "", w1.getStringList())
+ "r.film_id = mf.id "
+ StringUtil.join(" and ", " and ", " ", " ", w1.getStringList())
+ "group by "
+ "mf.id, "
+ "mf.film_no, "
......
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