Commit a5761f39 authored by Quxl's avatar Quxl

x

parent 1458ddf9
...@@ -107,6 +107,11 @@ public interface FilmService { ...@@ -107,6 +107,11 @@ public interface FilmService {
Integer enroll_type, Integer enroll_type,
String film_country, String film_country,
Integer film_type_short, Integer film_type_short,
String play_shanghai,
Integer review_round,
Integer review_state,
Integer allot_atate,
Integer r_state,
Page page); Page page);
Integer pass(Long member_film_id); Integer pass(Long member_film_id);
......
...@@ -404,16 +404,23 @@ public class FilmServiceImpl implements FilmService { ...@@ -404,16 +404,23 @@ public class FilmServiceImpl implements FilmService {
Integer enroll_type, Integer enroll_type,
String film_country, String film_country,
Integer film_type_short, Integer film_type_short,
String play_shanghai,
Integer review_round,
Integer review_state,
Integer allot_atate,
Integer r_state,
Page page) { Page page) {
SqlWhere where = new SqlWhere() SqlWhere where1 = new SqlWhere()
.eq("mf.state", state) .eq("mf.state", state)
.eq("mf.apply_state", apply_state) .eq("mf.apply_state", apply_state)
.eq("mf.upload_state", upload_state) .eq("mf.upload_state", upload_state)
.eq("mf.film_type_name", film_type) .eq("mf.film_type_name", film_type)
.eq("mf.film_type_name_short", film_type_short) .eq("mf.film_type_name_short", film_type_short)
.eq("mf.film_country", film_country) .eq("mf.film_country", film_country)
.eq("mf.play_shanghai", play_shanghai)
.lk("mf.enroll_type_name", enroll_type) .lk("mf.enroll_type_name", enroll_type)
.lk(new String[]{"mf.en_name", "mf.cn_name", "fp.playactor_name"}, keyword); .lk(new String[]{"mf.en_name", "mf.cn_name", "fp.playactor_name"}, keyword);
String sql = "" String sql = ""
+ "select " + "select "
+ "mf.id, " + "mf.id, "
...@@ -442,7 +449,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -442,7 +449,7 @@ public class FilmServiceImpl implements FilmService {
+ "where " + "where "
+ "mf.id = fp.film_id " + "mf.id = fp.film_id "
+ "and fp.playactor_type = 'director' " + "and fp.playactor_type = 'director' "
+ StringUtil.join(" and ", " and ", " ", " ", where.getStringList()) + StringUtil.join(" and ", " and ", " ", " ", where1.getStringList())
+ "group by " + "group by "
+ "mf.id, " + "mf.id, "
+ "mf.film_no, " + "mf.film_no, "
...@@ -464,8 +471,27 @@ public class FilmServiceImpl implements FilmService { ...@@ -464,8 +471,27 @@ public class FilmServiceImpl implements FilmService {
+ "r.allot_state, " + "r.allot_state, "
+ "r.state " + "r.state "
+ "order by mf.film_no"; + "order by mf.film_no";
Object[] objs = where.getObjectList();
return jdbcTemplate.limit(sql, page, objs); List<Object> objs = new ArrayList<Object>();
Object[] ary1 = where1.getObjectList();
for(Object obj : ary1) {
objs.add(obj);
}
SqlWhere where2 = new SqlWhere()
.eq("t.review_round", review_round)
.eq("t.review_state", review_state)
.eq("t.allot_atate", allot_atate)
.eq("t.state", r_state)
;
sql = "select t.* from (" + sql + ") t" + StringUtil.join(" and ", " and ", " ", " ", where2.getStringList());
Object[] ary2 = where2.getObjectList();
for(Object obj : ary2) {
objs.add(obj);
}
return jdbcTemplate.limit(sql, page, objs.toArray());
} }
@Override @Override
......
...@@ -74,7 +74,7 @@ public class AdminFirstController { ...@@ -74,7 +74,7 @@ public class AdminFirstController {
index = index == null ? 1 : index; index = index == null ? 1 : index;
limit = limit == null ? 20 : limit; limit = limit == null ? 20 : limit;
Page page = new Page(index, limit); Page page = new Page(index, limit);
List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, state, apply_state, null, film_type, enroll_type, film_country, film_type_short, page); List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, state, apply_state, null, film_type, enroll_type, film_country, film_type_short, null, null, null, null, null, page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
...@@ -117,7 +117,11 @@ public class AdminFirstController { ...@@ -117,7 +117,11 @@ public class AdminFirstController {
index = index == null ? 1 : index; index = index == null ? 1 : index;
limit = limit == null ? 20 : limit; limit = limit == null ? 20 : limit;
Page page = new Page(index, limit); Page page = new Page(index, limit);
List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, 2, 2, upload_state,film_type, enroll_type, film_country, film_type_short, page); List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, 2, 2, upload_state,film_type, enroll_type, film_country, film_type_short, play_shanghai,
review_round,
review_state,
allot_atate,
r_state, page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
......
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