Commit b041f54d authored by Quxl's avatar Quxl

x

parent 636c7d75
...@@ -14,7 +14,7 @@ public interface ReviewService { ...@@ -14,7 +14,7 @@ public interface ReviewService {
Object queryDoubtfulList(); 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); Fc_review queryReview(Integer film_id, Integer enroll_type_id);
......
...@@ -26,17 +26,16 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -26,17 +26,16 @@ public class ReviewServiceImpl implements ReviewService {
JdbcTemplate jdbcTemplate; JdbcTemplate jdbcTemplate;
@Override @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); 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) { if(is_review) {
where.ge("r.review_state", 2); where.ge("r.review_state", 2);
} else { } else {
where.lt("r.review_state", 2); 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 = "" String sql = ""
+ "select " + "select "
+ "mf.*, " + "mf.*, "
......
...@@ -47,20 +47,21 @@ public class UserReviewController { ...@@ -47,20 +47,21 @@ public class UserReviewController {
@PostMapping("review_list") @PostMapping("review_list")
@ApiOperation("审核列表") @ApiOperation("审核列表")
@ApiImplicitParams({ @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 = "film_type_id", value="影片类型ID"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "enroll_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 = "string", required = false, name = "keyword", value="模糊匹配关键词"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"), @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", 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; index = index == null ? 1 : index;
limit = limit == null ? 20 : limit; limit = limit == null ? 20 : limit;
Page page = new Page(index, limit); Page page = new Page(index, limit);
LoginToken loginToken = tokenService.getToken(); LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId(); 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); 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