Commit cc23342b authored by Quxl's avatar Quxl

xx

parent 91dfd979
......@@ -134,7 +134,7 @@ public interface FilmService {
* @param page
* @return
*/
List<Map<String, Object>> queryReviewList(String keyword, Integer film_type_name, Integer film_type_name_short,
List<Map<String, Object>> queryReviewList(String keyword, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short,
String film_country, Integer[] review_round, Integer[] review_state, Page page);
}
......@@ -518,9 +518,10 @@ public class FilmServiceImpl implements FilmService {
* 检索审片列表
*/
@Override
public List<Map<String, Object>> queryReviewList(String keyword, Integer film_type_name,
public List<Map<String, Object>> queryReviewList(String keyword, Integer enroll_type_id, Integer film_type_name,
Integer film_type_name_short, String film_country, Integer[] review_round, Integer[] review_state,
Page page) {
SqlWhere w1 = new SqlWhere()
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.eq("mf.film_type_name", film_type_name)
......@@ -529,6 +530,9 @@ public class FilmServiceImpl implements FilmService {
.in("mf.review_round", review_round);
;
String sql = "select mf.*, r.review_state, r.result_text, (select GROUP_CONCAT(mfd.playactor_name) from fc_member_film_playactor mfd where mfd.film_id = mf.id and mfd.playactor_type = 'director') director_name from fc_member_film mf left join fc_review r on r.film_id = mf.id and r.review_round = mf.review_round" + StringUtil.join(" and ", " where ", "", "", w1.getStringList());
if(enroll_type_id != null) {
sql = "select t.* from (" + sql + ") t, fc_member_film_enroll mfe where t.id = mfe.film_id and mfe.enroll_type_id = " + enroll_type_id;
}
return jdbcTemplate.limit(sql, page, w1.getObjectList());
}
......
......@@ -27,11 +27,11 @@ public class AdminReviewController {
@ResponseBody
@PostMapping("list")
@ApiOperation("查询选片列表")
public Object list(String keyword, Integer film_type_name, Integer film_type_name_short, String film_country, Integer[] review_round, Integer[] review_state, Long index, Long limit) {
public Object list(String keyword, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, String film_country, Integer[] review_round, Integer[] review_state, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
List<Map<String, Object>> list = filmService.queryReviewList(keyword, film_type_name, film_type_name_short, film_country, review_round, review_state, page);
List<Map<String, Object>> list = filmService.queryReviewList(keyword, enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, page);
return Rjx.jsonOk().setData(list);
}
......
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