Commit abfa7de4 authored by Quxl's avatar Quxl

x

parent f318c6f7
......@@ -93,7 +93,7 @@ public interface FilmService {
List<Map<String, Object>> queryListAll(String keyword);
List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, String film_type, String enroll_type, String film_country, Page page);
List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, Integer film_type, Integer enroll_type, String film_country, Page page);
void pass(Long member_film_id);
......
......@@ -367,9 +367,9 @@ public class FilmServiceImpl implements FilmService {
}
@Override
public List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, String film_type, String enroll_type, String film_country, 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.film_type_name", film_type).eq("mf.enroll_type_name", enroll_type).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 and rv.review_round = mf.review_round" + StringUtil.join(" and ", " where ", "", "", where.getStringList());
public List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, Integer film_type, Integer enroll_type, String film_country, Page page) {
SqlWhere where = new SqlWhere().eq("rv.enroll_type_id", enroll_type).lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword).eq("mf.state", state).eq("mf.apply_state", apply_state).eq("mf.film_type_name", film_type).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, fc_review rv where rv.film_id = mf.id" + StringUtil.join(" and ", " where ", "", "", where.getStringList());
Object[] objs = where.getObjectList();
return jdbcTemplate.limit(sql, page, objs);
}
......
......@@ -70,7 +70,7 @@ public class AdminFirstController {
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
})
public Object list(String keyword, Integer state, Integer apply_state, String film_type, String 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, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
......@@ -89,7 +89,7 @@ public class AdminFirstController {
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
})
public Object pass_list(String keyword, String film_type, String enroll_type, String film_country, Long index, Long limit) {
public Object pass_list(String keyword, Integer film_type, Integer enroll_type, String film_country, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
......
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