Commit b041f54d authored by Quxl's avatar Quxl

x

parent 636c7d75
......@@ -14,7 +14,7 @@ public interface ReviewService {
Object queryDoubtfulList();
List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page);
List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date start_date, Date end_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page);
Fc_review queryReview(Integer film_id, Integer enroll_type_id);
......
......@@ -26,17 +26,16 @@ public class ReviewServiceImpl implements ReviewService {
JdbcTemplate jdbcTemplate;
@Override
public List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page) {
public List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date start_date, Date end_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page) {
List<Integer> ids = jdbcTemplate.queryForObjects("select ugf.fun_id from fc_user_group_fun ugf, fc_user u where ugf.group_id = u.group_id and u.uid = ?", Integer.class, user_id);
SqlWhere where = new SqlWhere().in("r.review_round", ids.toArray()).eq("r.enroll_type_id", enroll_type_id).lk(new String[]{"en_name", "cn_name"}, keyword);
SqlWhere where = new SqlWhere().ge("r.push_time", start_date).lt("r.push_time", end_date == null ? null : DateUtil.end(end_date)).in("r.review_round", ids.toArray()).eq("r.enroll_type_id", enroll_type_id).lk(new String[]{"en_name", "cn_name"}, keyword);
if(is_review) {
where.ge("r.review_state", 2);
} else {
where.lt("r.review_state", 2);
}
if(push_date != null) {
where.ge("r.create_time", DateUtil.start(push_date)).lt("r.create_time", DateUtil.end(push_date));
}
String sql = ""
+ "select "
+ "mf.*, "
......
......@@ -47,20 +47,21 @@ public class UserReviewController {
@PostMapping("review_list")
@ApiOperation("审核列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "push_date", value="推送日期"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "start_date", value="开始日期"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "end_date", value="结束日志"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "film_type_id", value="影片类型ID"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "enroll_type_id", value="申报奖项ID"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"),
})
public Object getReviewList(boolean is_review, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Long index, Long limit) {
public Object getReviewList(boolean is_review, Date start_date, Date end_date, Integer film_type_id, Integer enroll_type_id, String keyword, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
List<Map<String, Object>> list = service.queryReviewList(is_review, user_id, push_date, film_type_id, enroll_type_id, keyword, page);
List<Map<String, Object>> list = service.queryReviewList(is_review, user_id, start_date, end_date, film_type_id, enroll_type_id, keyword, 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