Commit 8e4b0dc1 authored by Quxl's avatar Quxl

x

parent fe0da9b5
......@@ -108,6 +108,6 @@ public interface ReviewService {
List<Map<String, Object>> queryTimeoutList(String keyword, Page page);
List<Map<String, Object>> queryReviewRecordLogList(Page page);
List<Map<String, Object>> queryReviewRecordLogList(String username, Integer enroll_type_id, Integer review_state, Page page);
}
\ No newline at end of file
......@@ -700,8 +700,24 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public List<Map<String, Object>> queryReviewRecordLogList(Page page) {
return jdbcTemplate.limit("select rr.*, mf.en_name, mf.cn_name, u.username from fc_review_record rr left join fc_user u on u.uid = rr.user_id left join fc_review r on r.id = rr.review_id left join fc_member_film mf on mf.id = r.film_id", page);
public List<Map<String, Object>> queryReviewRecordLogList(String username, Integer enroll_type_id, Integer review_state, Page page) {
String sql = ""
+ "select "
+ "rr.*, "
+ "r.enroll_type_id, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "u.username, "
+ "ug.group_name "
+ "from "
+ "fc_review_record rr "
+ "left join fc_user u on u.uid = rr.user_id "
+ "left join fc_user group ug on ug.group_id = u.group_id "
+ "left join fc_review r on r.id = rr.review_id "
+ "left join fc_member_film mf on mf.id = r.film_id";
SqlWhere where = new SqlWhere().eq("t.username", username).eq("t.enroll_type_id", enroll_type_id).eq("t.review_state", review_state);
sql = "select t.* from (" + sql + ") t" + StringUtil.join(" and ", " where ", "", "", where.getStringList());
return jdbcTemplate.limit(sql, page, where.getObjectArray());
}
}
\ No newline at end of file
......@@ -335,11 +335,11 @@ public class AdminReviewController {
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "index"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "limit"),
})
public Object getReviewRecordList2(Long index, Long limit) {
public Object getReviewRecordList2(String username, Integer enroll_type_id, Integer review_state, 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.queryReviewRecordLogList(page);
List<Map<String, Object>> list = reviewService.queryReviewRecordLogList(username, enroll_type_id, review_state, 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