Commit 60ac8a74 authored by Quxl's avatar Quxl

x

parent e3170d31
......@@ -110,4 +110,6 @@ public interface ReviewService {
List<Map<String, Object>> queryReviewRecordLogList(String username, Integer enroll_type_id, Integer review_state, Page page);
List<Map<String, Object>> queryReviewHistoryList(Integer[] film_type_id, Page page);
}
\ No newline at end of file
package com.egolm.film.api.service.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
......@@ -718,4 +719,17 @@ public class ReviewServiceImpl implements ReviewService {
return jdbcTemplate.limit(sql, page, where.getObjectArray());
}
@Override
public List<Map<String, Object>> queryReviewHistoryList(Integer[] film_type_id, Page page) {
List<String> film_type_name = new ArrayList<String>();
for(Integer id : film_type_id) {
if(id != null) {
film_type_name.add(String.valueOf(id));
}
}
String sql = "select rh.*, mf.film_type_name, mf.cn_name, mf.en_name from fc_review_history rh left join fc_member_film mf on mf.id = rh.film_id order by rh.create_time desc";
sql = "select t.* from (" + sql + ") t where t.film_type_name in (" + StringUtil.join("', '", "'", "'", film_type_name) + ")";
return jdbcTemplate.limit(sql, page);
}
}
\ No newline at end of file
......@@ -378,6 +378,23 @@ public class AdminReviewController {
return Rjx.jsonOk().setData(recordMap).set("exts", extList);
}
@ResponseBody
@Transactional
@PostMapping("getReviewHistory")
@ApiOperation("查询审片过程")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "film_type_id", allowMultiple=true),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "index"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "limit"),
})
public Object getReviewHistory(Integer[] film_type_id, 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.queryReviewHistoryList(film_type_id, 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