Commit 9759e6cc authored by Quxl's avatar Quxl

x

parent 7d065a5f
......@@ -735,16 +735,9 @@ public class ReviewServiceImpl implements ReviewService {
@Override
public List<Map<String, Object>> queryExhibitionList(String keyword, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, String film_country, Integer from_round, Page page) {
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 + ")";
} else {
sql_film = "(select mf0.* from fc_member_film mf0)";
}
String sql = ""
+ "select "
+ "r.*, "
+ "mf.id film_id_enroll, "
+ "mf.cn_name, "
+ "mf.en_name, "
+ "mf.enroll_type_name, "
......@@ -757,11 +750,11 @@ public class ReviewServiceImpl implements ReviewService {
+ "(select count(fp.id) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director') director_name "
+ "from "
+ "fc_review r "
+ "left join (" + sql_film + ") mf on mf.id = r.film_id "
+ "left join fc_review_history rh on rh.enroll_type_id != 4 and rh.review_state = 3 and rh.review_id = r.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 = 3 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))
;
SqlWhere where = new SqlWhere()
.nn("t.film_id_enroll")
.lk(new String[] {"cn_name", "en_name", "director_name"}, keyword)
.eq("film_type_name", film_type_name)
.eq("film_type_name_short", film_type_name_short)
......
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