Commit b67eb21e authored by Quxl's avatar Quxl

x

parent 6815c73a
......@@ -42,9 +42,7 @@ public interface ReviewService {
Integer opt_state,
Page page);
List<Map<String, Object>> queryNewAsianRound3List(String keyword, Integer review_state, String ext_type, Page page);
List<Map<String, Object>> queryNewAsianRound2List(String keyword, Integer review_state, String ext_type, Page page);
List<Map<String, Object>> queryNewAsianRoundList(String keyword, Integer review_state, Integer review_round, String ext_type, Page page);
/**
* 查询评委审片列表
......
......@@ -119,14 +119,10 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public List<Map<String, Object>> queryNewAsianRound2List(String keyword, Integer review_state, String ext_type, Page page) {
// TODO Auto-generated method stub
return null;
}
@Override
public List<Map<String, Object>> queryNewAsianRound3List(String keyword, Integer review_state, String ext_type, Page page) {
public List<Map<String, Object>> queryNewAsianRoundList(String keyword, Integer review_state, Integer review_round, String ext_type, Page page) {
XRException.assertNotBlank("获奖类型不能未空", ext_type);
XRException.assertNotBlank("选片轮数不能为空", review_round);
if(review_round.intValue() == 3) {
String sql = ""
+ "select "
+ "rh.film_id, "
......@@ -169,6 +165,12 @@ public class ReviewServiceImpl implements ReviewService {
sql = "select @rownum:=@rownum+1 as rownum, t.* from (" + sql + ") t, (select @rownum:=0) row order by t.ext_score_avg desc";
sql = "select tt.* from (" + sql + ") tt " + StringUtil.join(" where ", " and ", "", "", where.getStringList()) + " order by tt.rownum";
return jdbcTemplate.limit(sql, page, where.getObjectList());
} else if(review_round.intValue() == 2) {
throw new XRException("亚新二选榜单没有没有准备好");
} else {
throw new XRException("只能查询亚新2,3选榜单");
}
}
public static void main(String[] args) {
......
......@@ -93,38 +93,21 @@ public class AdminReviewController {
}
@ResponseBody
@PostMapping("getNewAsianRound2List")
@ApiOperation("查询亚新2选榜单")
@PostMapping("getNewAsianRoundList")
@ApiOperation("查询亚新榜单")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", name="keyword", value="搜索关键字"),
@ApiImplicitParam(paramType="query", dataType="int", name="review_state", value="评委意见(3参赛 4参赛备选 5参展)"),
@ApiImplicitParam(paramType="query", dataType="int", name="ext_type", value="获奖类型(前端根据审片时保存到数据库的对应字段进行检索)"),
@ApiImplicitParam(paramType="query", dataType="int", name="review_round", value="第2或3选(2,3)"),
@ApiImplicitParam(paramType="query", dataType="long", name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", name="limit", value="分页大小"),
})
public Object getNewAsianRound2List(String keyword, Integer review_state, String ext_type, Long index, Long limit) {
public Object getNewAsianRound3List(String keyword, Integer review_state, Integer review_round, String ext_type, 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 = reviewService.queryNewAsianRound2List(keyword, review_state, ext_type, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
@ResponseBody
@PostMapping("getNewAsianRound3List")
@ApiOperation("查询亚新3选榜单")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", name="keyword", value="搜索关键字"),
@ApiImplicitParam(paramType="query", dataType="int", name="review_state", value="评委意见(3参赛 4参赛备选 5参展)"),
@ApiImplicitParam(paramType="query", dataType="int", name="ext_type", value="获奖类型(前端根据审片时保存到数据库的对应字段进行检索)"),
@ApiImplicitParam(paramType="query", dataType="long", name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", name="limit", value="分页大小"),
})
public Object getNewAsianRound3List(String keyword, Integer review_state, String ext_type, 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 = reviewService.queryNewAsianRound3List(keyword, review_state, ext_type, page);
List<Map<String, Object>> list = reviewService.queryNewAsianRoundList(keyword, review_state, review_round, ext_type, 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