Commit 5efc4748 authored by Quxl's avatar Quxl

x

parent 7e34a163
......@@ -12,4 +12,5 @@ public interface FilmReportService {
List<Map<String, Object>> directorReport(String playactor_name, Page page);
Map<String, Object> directorDetail(String playactor_name);
List<Map<String, Object>> queryUserViewReport(Page page);
List<Map<String, Object>> queryUserReiewReport(Integer user_id, Page page);
}
......@@ -196,8 +196,26 @@ public class FilmReportServiceImpl implements FilmReportService {
return jdbcTemplate.limit(sql, page);
}
public static void main(String[] args) {
new FilmReportServiceImpl().queryUserViewReport(null);
@Override
public List<Map<String, Object>> queryUserReiewReport(Integer user_id, Page page) {
String sql = ""
+ "select "
+ "rr.*, "
+ "DATEDIFF(now(), rr.create_time) push_days, "
+ "r.review_round review_round_now, "
+ "r.review_state review_state_now, "
+ "r.opt_state, "
+ "r.allot_state, "
+ "mf.en_name, "
+ "mf.cn_name "
+ "from "
+ "fc_review_record rr "
+ "left join fc_review r on r.id = rr.review_id "
+ "left join fc_member_film mf on mf.id = r.film_id "
+ "where "
+ "rr.user_id = " + user_id;
return jdbcTemplate.limit(sql, page);
}
}
......@@ -95,4 +95,15 @@ public class AdminReportController {
return Rjx.jsonOk().setData(list);
}
@ResponseBody
@PostMapping("user_review_report")
@ApiOperation("评委观看统计")
public Object user_review_report(Integer user_id, Long index, Long limit, String[] limitKey) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = filmReportService.queryUserReiewReport(user_id, page);
return Rjx.jsonOk().setData(list);
}
}
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