Commit 0d9e6d95 authored by Quxl's avatar Quxl

x

parent deb41d17
...@@ -75,8 +75,7 @@ public class FilmGroupServiceImpl implements FilmGroupService { ...@@ -75,8 +75,7 @@ public class FilmGroupServiceImpl implements FilmGroupService {
} }
String sql = "" String sql = ""
+ "select " + "select "
+ "t.*, " + "t.* "
+ "(select group_concat(t.playactor_name) from fc_member_film_playactor fp where fp.film_id = t.id and fp.playactor_type = 'director') director_name "
+ "from " + "from "
+ "" + table + " t where t.film_group_id is null " + (StringUtil.isNotBlank(film_country) ? (" and t.film_country = '" + film_country + "'") : ""); + "" + table + " t where t.film_group_id is null " + (StringUtil.isNotBlank(film_country) ? (" and t.film_country = '" + film_country + "'") : "");
return jdbcTemplate.limit(sql, page); return jdbcTemplate.limit(sql, page);
...@@ -96,8 +95,7 @@ public class FilmGroupServiceImpl implements FilmGroupService { ...@@ -96,8 +95,7 @@ public class FilmGroupServiceImpl implements FilmGroupService {
+ "select " + "select "
+ "t.*, " + "t.*, "
+ "r.review_state, " + "r.review_state, "
+ "r.review_round, " + "r.review_round "
+ "(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = t.id and fp.playactor_type = 'director') director_name "
+ "from " + "from "
+ "" + table + " t left join fc_review r on r.film_id = t.id"; + "" + table + " t left join fc_review r on r.film_id = t.id";
...@@ -110,7 +108,7 @@ public class FilmGroupServiceImpl implements FilmGroupService { ...@@ -110,7 +108,7 @@ public class FilmGroupServiceImpl implements FilmGroupService {
.eq("tt.film_country", film_country) .eq("tt.film_country", film_country)
.eq("tt.review_state", review_state) .eq("tt.review_state", review_state)
.eq("tt.review_round", review_round) .eq("tt.review_round", review_round)
.lk(new String[] {"tt.cn_name", "tt.en_name", "tt.director_name"}, keyword); .lk("tt.keywords", keyword);
; ;
sql = "select tt.* from (" + sql + ") tt " + StringUtil.join(" and ", " where ", "", "", wehre.getStringList()); sql = "select tt.* from (" + sql + ") tt " + StringUtil.join(" and ", " where ", "", "", wehre.getStringList());
return jdbcTemplate.limit(sql, page, wehre.getObjectArray()); return jdbcTemplate.limit(sql, page, wehre.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