Commit 89fb206a authored by Quxl's avatar Quxl

x

parent 8b87f699
...@@ -93,7 +93,7 @@ public interface FilmService { ...@@ -93,7 +93,7 @@ public interface FilmService {
List<Map<String, Object>> queryListAll(String keyword); List<Map<String, Object>> queryListAll(String keyword);
List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, Integer upload_state, Integer film_type, Integer enroll_type, String film_country, Page page); List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, Integer upload_state, Integer film_type, Integer enroll_type, String film_country, Integer film_type_short, Page page);
void pass(Long member_film_id); void pass(Long member_film_id);
......
...@@ -367,10 +367,11 @@ public class FilmServiceImpl implements FilmService { ...@@ -367,10 +367,11 @@ public class FilmServiceImpl implements FilmService {
} }
@Override @Override
public List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, Integer upload_state, Integer film_type, Integer enroll_type, String film_country, Page page) { public List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, Integer upload_state, Integer film_type, Integer enroll_type, String film_country, Integer film_type_short, Page page) {
SqlWhere where = new SqlWhere().lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword).eq("mf.state", state).eq("mf.apply_state", apply_state).eq("mf.upload_state", upload_state).lk("mf.enroll_type_name", enroll_type).eq("mf.film_type_name", film_type).eq("mf.film_country", film_country); SqlWhere where = new SqlWhere().lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword).eq("mf.state", state).eq("mf.apply_state", apply_state).eq("mf.upload_state", upload_state).lk("mf.enroll_type_name", enroll_type).eq("mf.film_type_name", film_type).eq("mf.film_type_name_short", film_type_short).eq("mf.film_country", film_country);
String sql = "select mf.*, ifnull(rv.review_state, 0) review_state, (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 rv on rv.film_id = mf.id" + StringUtil.join(" and ", " where ", "", "", where.getStringList()); String sql = "select mf.*, ifnull(rv.review_state, 0) review_state, (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 rv on rv.film_id = mf.id" + StringUtil.join(" and ", " where ", "", "", where.getStringList());
Object[] objs = where.getObjectList(); Object[] objs = where.getObjectList();
page.setLimitKey("mf.film_no");
return jdbcTemplate.limit(sql, page, objs); return jdbcTemplate.limit(sql, page, objs);
} }
......
...@@ -65,16 +65,17 @@ public class AdminFirstController { ...@@ -65,16 +65,17 @@ public class AdminFirstController {
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="影片状态[state=1 未提交, state=2 已提交]"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="影片状态[state=1 未提交, state=2 已提交]"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="apply_state", value="初审状态[apply_state=1 未初审, apply_state=2 初审通过, apply_state=3 初审未通过]"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="apply_state", value="初审状态[apply_state=1 未初审, apply_state=2 初审通过, apply_state=3 初审未通过]"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_short"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country",value="影片国家地区"), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country",value="影片国家地区"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
}) })
public Object list(String keyword, Integer state, Integer apply_state, Integer film_type, Integer enroll_type, String film_country, Long index, Long limit) { public Object list(String keyword, Integer state, Integer apply_state, Integer film_type, Integer enroll_type, String film_country, Integer film_type_short, Long index, Long limit) {
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, page); List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, state, apply_state, null, film_type, enroll_type, film_country, film_type_short, page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
...@@ -84,17 +85,18 @@ public class AdminFirstController { ...@@ -84,17 +85,18 @@ public class AdminFirstController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="keyword", value="关键字"), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="keyword", value="关键字"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_short"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country",value="影片国家地区"), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country",value="影片国家地区"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="upload_state",value="影片文件上传状态(0,1)"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="upload_state",value="影片文件上传状态(0,1)"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
}) })
public Object pass_list(String keyword, Integer film_type, Integer enroll_type, Integer upload_state, String film_country, Long index, Long limit) { public Object pass_list(String keyword, Integer film_type, Integer enroll_type, Integer upload_state, String film_country, Integer film_type_short, Long index, Long limit) {
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, page); List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, 2, 2, upload_state,film_type, enroll_type, film_country, film_type_short, 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