Commit 687300b3 authored by Quxl's avatar Quxl

x

parent aedfe53d
...@@ -4,6 +4,8 @@ import java.util.Date; ...@@ -4,6 +4,8 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.format.annotation.DateTimeFormat;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.bean.Fc_review; import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.Fc_review_doubtful; import com.egolm.film.bean.Fc_review_doubtful;
...@@ -60,6 +62,8 @@ public interface ReviewService { ...@@ -60,6 +62,8 @@ public interface ReviewService {
String keyword, String keyword,
Date start_date, Date start_date,
Date end_date, Date end_date,
Date review_start_date,
Date review_end_date,
Integer film_type_id, Integer film_type_id,
Integer enroll_type_id, Integer enroll_type_id,
Page page); Page page);
......
...@@ -125,6 +125,8 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -125,6 +125,8 @@ public class ReviewServiceImpl implements ReviewService {
String keyword, String keyword,
Date start_date, Date start_date,
Date end_date, Date end_date,
Date review_start_date,
Date review_end_date,
Integer film_type_id, Integer film_type_id,
Integer enroll_type_id, Integer enroll_type_id,
Page page) { Page page) {
...@@ -132,6 +134,8 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -132,6 +134,8 @@ public class ReviewServiceImpl implements ReviewService {
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword) .lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.ge("r.push_time", start_date) .ge("r.push_time", start_date)
.lt("r.push_time", end_date == null ? null : DateUtil.end(end_date)) .lt("r.push_time", end_date == null ? null : DateUtil.end(end_date))
.ge("r.review_time", review_start_date)
.lt("r.review_time", review_end_date == null ? null : DateUtil.end(review_end_date))
.where("r.review_round in (select ugf.fun_id from fc_user_group_fun ugf, fc_user u where ugf.group_id = u.group_id and u.uid = ?)", new Object[]{user_id}) .where("r.review_round in (select ugf.fun_id from fc_user_group_fun ugf, fc_user u where ugf.group_id = u.group_id and u.uid = ?)", new Object[]{user_id})
.where(is_review ? "rr.review_state is not null" : "rr.review_state is null", new Object[]{}) .where(is_review ? "rr.review_state is not null" : "rr.review_state is null", new Object[]{})
; ;
......
...@@ -49,20 +49,32 @@ public class UserReviewController { ...@@ -49,20 +49,32 @@ public class UserReviewController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "boolean", required = false, name = "is_review", value="是否已审核"), @ApiImplicitParam(paramType = "query", dataType = "boolean", required = false, name = "is_review", value="是否已审核"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "start_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 = "date", required = false, name = "end_date", value="检索推送日期范围-结束"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "review_start_date", value="检索审核日期范围-开始"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "review_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 = "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, @DateTimeFormat(pattern="yyyy-MM-dd")Date start_date, @DateTimeFormat(pattern="yyyy-MM-dd")Date end_date, Integer film_type_id, Integer enroll_type_id, String keyword, Long index, Long limit) { public Object getReviewList(
boolean is_review,
@DateTimeFormat(pattern="yyyy-MM-dd")Date start_date,
@DateTimeFormat(pattern="yyyy-MM-dd")Date end_date,
@DateTimeFormat(pattern="yyyy-MM-dd")Date review_start_date,
@DateTimeFormat(pattern="yyyy-MM-dd")Date review_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.queryReviewListForUser(is_review, user_id, keyword, start_date, end_date, film_type_id, enroll_type_id, page); List<Map<String, Object>> list = service.queryReviewListForUser(is_review, user_id, keyword, start_date, end_date, review_start_date, review_end_date, film_type_id, enroll_type_id, 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