Commit 112085c2 authored by Quxl's avatar Quxl

x

parent d9578c52
...@@ -746,29 +746,20 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -746,29 +746,20 @@ public class ReviewServiceImpl implements ReviewService {
+ "mf.film_total_time, " + "mf.film_total_time, "
+ "mf.completion_date, " + "mf.completion_date, "
+ "mf.play_shanghai, " + "mf.play_shanghai, "
+ "rh.review_round state_3_round, "
+ "(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 "
+ "from " + "from "
+ "fc_review r " + "fc_review r "
+ "left join fc_member_film mf on mf.id = r.film_id " + "left join fc_member_film mf on mf.id = r.film_id "
+ "left join fc_review_history rh on rh.enroll_type_id != 4 and rh.review_state = 5 and rh.review_id = r.id "
+ (enroll_type_id == null ? "" : (", fc_member_film_enroll mfe where mfe.film_id = r.film_id and mfe.enroll_type_id = " + enroll_type_id)) + (enroll_type_id == null ? "" : (", fc_member_film_enroll mfe where mfe.film_id = r.film_id and mfe.enroll_type_id = " + enroll_type_id))
; ;
SqlWhere where = new SqlWhere() SqlWhere where = new SqlWhere()
.lk(new String[] {"cn_name", "en_name", "director_name"}, keyword) .lk(new String[] {"t.cn_name", "t.en_name", "t.director_name"}, keyword)
.eq("film_type_name", film_type_name) .eq("t.film_type_name", film_type_name)
.eq("film_type_name_short", film_type_name_short) .eq("t.film_type_name_short", film_type_name_short)
.eq("film_country", film_country) .eq("t.film_country", film_country)
.eq("t.from_round", from_round);
; ;
if(from_round != null) {
if(from_round == 0) {
where.eq("t.enroll_type_name", "4");
} else {
where.ne("t.t.enroll_type_name", "4").eq("t.state_3_round", from_round);
}
} else {
where.where("((t.enroll_type_name = '4') or (t.t.enroll_type_name != '4' and t.state_3_round in (2, 3)))");
}
sql = "select t.* from (" + sql + ") t " + StringUtil.join(" and ", " where ", "", where.getStringList()) + " order by t.film_id desc"; sql = "select t.* from (" + sql + ") t " + StringUtil.join(" and ", " where ", "", where.getStringList()) + " order by t.film_id desc";
return jdbcTemplate.limit(sql, page, where.getObjectArray()); return jdbcTemplate.limit(sql, page, where.getObjectArray());
} }
......
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