Commit fee5bbc9 authored by Quxl's avatar Quxl

x

parent 5b5b1870
...@@ -68,16 +68,7 @@ public class FilmGroupServiceImpl implements FilmGroupService { ...@@ -68,16 +68,7 @@ public class FilmGroupServiceImpl implements FilmGroupService {
public List<Map<String, Object>> queryGroupFilmList(Integer[] group_id, String keyword, Integer enroll_type_id, public List<Map<String, Object>> queryGroupFilmList(Integer[] group_id, String keyword, Integer enroll_type_id,
Integer film_type_name, Integer film_type_name_short, Integer play_shanghai, Integer is_important, Integer film_type_name, Integer film_type_name_short, Integer play_shanghai, Integer is_important,
Integer review_state, Integer review_round, String film_country, Page page) { Integer review_state, Integer review_round, String film_country, Page page) {
SqlWhere wehre = new SqlWhere()
.in("film_group_id", group_id)
.eq("film_type_name", film_type_name)
.eq("film_type_name_short", film_type_name_short).eq("play_shanghai", play_shanghai)
.eq("is_important", is_important)
.eq("film_country", film_country)
.eq("review_state", review_state)
.eq("review_round", review_round)
.lk(new String[] {"cn_name", "en_name", "director_name"}, keyword);
;
String table = "fc_member_film"; String table = "fc_member_film";
if(enroll_type_id != null) { if(enroll_type_id != null) {
...@@ -92,7 +83,18 @@ public class FilmGroupServiceImpl implements FilmGroupService { ...@@ -92,7 +83,18 @@ public class FilmGroupServiceImpl implements FilmGroupService {
+ "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";
sql = "select * from (" + sql + ") " + StringUtil.join(" and ", " where ", "", "", wehre.getStringList()); SqlWhere wehre = new SqlWhere()
.in("tt.film_group_id", group_id)
.eq("tt.film_type_name", film_type_name)
.eq("tt.film_type_name_short", film_type_name_short)
.eq("tt.play_shanghai", play_shanghai)
.eq("tt.is_important", is_important)
.eq("tt.film_country", film_country)
.eq("tt.review_state", review_state)
.eq("tt.review_round", review_round)
.lk(new String[] {"tt.cn_name", "tt.en_name", "tt.director_name"}, keyword);
;
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