Commit f39fbe65 authored by Quxl's avatar Quxl

xx

parent 0a6d1933
......@@ -44,14 +44,15 @@ public class AdminFirstController {
@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="enroll_type", 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="limit", value="分页大小"),
})
public Object list(String keyword, Integer state, Integer apply_state, String film_type, String enroll_type, Long index, Long limit) {
public Object list(String keyword, Integer state, Integer apply_state, String film_type, String 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);
List<Map<String, Object>> list = memberService.queryChuShenList(keyword, state, apply_state, film_type, enroll_type, page);
List<Map<String, Object>> list = memberService.queryChuShenList(keyword, state, apply_state, film_type, enroll_type, film_country, page);
return Rjx.jsonOk().setData(list);
}
......
......@@ -133,7 +133,6 @@ public interface MemberService {
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,
Page page);
List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, String film_type, String enroll_type, String film_country, Page page);
}
......@@ -496,8 +496,8 @@ public class MemberServiceImpl implements MemberService {
}
@Override
public List<Map<String, Object>> queryChuShenList(String keyword, Integer state, Integer apply_state, String film_type, String enroll_type, Page page) {
SqlWhere where = new SqlWhere().olike(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);
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().olike(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.*, (select GROUP_CONCAT(mfd.director_name) from fc_member_film_director mfd where mfd.film_id = mf.id) director_name from fc_member_film mf" + StringUtil.join(" and ", " where ", "", "", where.getStringList());
Object[] objs = where.getObjectList();
return jdbcTemplate.limit(sql, page, objs);
......
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