Commit 485785ca authored by Quxl's avatar Quxl

x

parent fb163ce7
...@@ -127,7 +127,7 @@ public interface FilmService { ...@@ -127,7 +127,7 @@ public interface FilmService {
* @return * @return
*/ */
List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short,
String film_country, Integer review_round, Integer[] review_state, Page page); String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer dispute_state, Page page);
void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id); void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id);
......
...@@ -540,7 +540,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -540,7 +540,7 @@ public class FilmServiceImpl implements FilmService {
*/ */
@Override @Override
public List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, public List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name,
Integer film_type_name_short, String film_country, Integer review_round, Integer[] review_state, Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer dispute_state,
Page page) { Page page) {
SqlWhere w1 = new SqlWhere() SqlWhere w1 = new SqlWhere()
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id}) .where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id})
...@@ -552,7 +552,9 @@ public class FilmServiceImpl implements FilmService { ...@@ -552,7 +552,9 @@ public class FilmServiceImpl implements FilmService {
.eq("mf.film_country", film_country) .eq("mf.film_country", film_country)
.eq("r.review_round", review_round) .eq("r.review_round", review_round)
.eq("r.enroll_type_id", enroll_type_id) .eq("r.enroll_type_id", enroll_type_id)
.in("r.review_state", review_state); .eq("r.review_state", review_state)
.eq("r.allot_state", allot_state)
.eq("r.dispute_state", dispute_state);
String sql = "select mf.id, mf.film_no, r.id review_id, r.review_round, r.review_state, r.enroll_type_id, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, (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 r where r.film_id = mf.id" + StringUtil.join(" and ", " and ", "", "", w1.getStringList()); String sql = "select mf.id, mf.film_no, r.id review_id, r.review_round, r.review_state, r.enroll_type_id, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, (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 r where r.film_id = mf.id" + StringUtil.join(" and ", " and ", "", "", w1.getStringList());
return jdbcTemplate.limit(sql, page, w1.getObjectList()); return jdbcTemplate.limit(sql, page, w1.getObjectList());
} }
......
...@@ -41,15 +41,18 @@ public class AdminReviewController { ...@@ -41,15 +41,18 @@ public class AdminReviewController {
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_name_short", value="影片类型扩展分类"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_name_short", 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="review_round", value="审片当前第几轮[1,2,3,4,5,6]"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_round", value="审片当前第几轮[1,2,3,4,5,6]"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="评选状态"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_state", value="分配状态"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="dispute_state", 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 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) { 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, Integer allot_state, Integer dispute_state, 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);
Fc_admin admin = (Fc_admin)tokenService.getTokenObj(); Fc_admin admin = (Fc_admin)tokenService.getTokenObj();
List<Map<String, Object>> list = filmService.queryReviewList(keyword, admin.getGroup_id(), enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, page); List<Map<String, Object>> list = filmService.queryReviewList(keyword, admin.getGroup_id(), enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, allot_state, dispute_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