Commit b65fb839 authored by Quxl's avatar Quxl

增加搜索条件

parent 173d5f3c
package com.egolm.film.api.user;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -49,8 +50,12 @@ public class UserReviewController {
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "start_time", value="开始时间"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "end_time", value="结束时间"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "film_type_name", value="影片类型"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"),
})
public Object getReviewList(Long index, Long limit, String[] limitKey) {
public Object getReviewList(Long index, Long limit, String[] limitKey, Date start_time, Date end_time, String film_type_name, String keyword) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
LoginToken loginToken = tokenService.getToken();
......@@ -68,8 +73,12 @@ public class UserReviewController {
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "index", value="分页页码"),
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "limit", value="分页大小"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "start_time", value="开始时间"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "end_time", value="结束时间"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "film_type_name", value="影片类型"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "keyword", value="模糊匹配关键词"),
})
public Object getUnviewList(Long index, Long limit, String[] limitKey) {
public Object getUnviewList(Long index, Long limit, String[] limitKey, Date start_time, Date end_time, String film_type_name, String keyword) {
LoginToken loginToken = tokenService.getToken();
Long user_id = (Long)loginToken.getId();
Page page = new Page(index, limit, limitKey);
......
......@@ -136,7 +136,15 @@ public class UserReviewServiceImpl implements UserReviewService {
}
@Override
public void doubtfulAppend(Long user_id, Long film_id, Integer round, Integer type, String type_content, Long play_time, Long times) {
public void doubtfulAppend(
Long user_id,
Long film_id,
Integer round,
Integer type,
String type_content,
Long play_time,
Long times) {
Fc_film_doubtful_point doubtful = new Fc_film_doubtful_point();
String ip = WebMvcConfig.getRemoteIp();
doubtful.setCreate_ip(ip);
......@@ -152,7 +160,13 @@ public class UserReviewServiceImpl implements UserReviewService {
}
@Override
public void playAppend(Long user_id, Long film_id, Integer round, Long playtime, Long watchtime) {
public void playAppend(
Long user_id,
Long film_id,
Integer round,
Long playtime,
Long watchtime) {
Fc_film_user_play play = new Fc_film_user_play();
play.setAddtime(System.currentTimeMillis());
play.setFilm_id(film_id);
......@@ -164,11 +178,17 @@ public class UserReviewServiceImpl implements UserReviewService {
}
@Override
public void doReject(Long user_id, Long film_id, Integer round, String veto) {
public void doReject(
Long user_id,
Long film_id,
Integer round,
String veto) {
boolean isSave = false;
Fc_film_review review = null;
try {
review = this.jdbcTemplate.queryForBean("select * from fc_film_review where uid = ? and film_id = ? and round = ?", Fc_film_review.class, user_id, film_id, round);
String sql = "select * from fc_film_review where uid = ? and film_id = ? and round = ?";
review = this.jdbcTemplate.queryForBean(sql, Fc_film_review.class, user_id, film_id, round);
} catch (Exception e) {
isSave = true;
review = new Fc_film_review();
......@@ -189,11 +209,17 @@ public class UserReviewServiceImpl implements UserReviewService {
}
@Override
public void doPass(Long user_id, Long film_id, Integer round, Double score, String content) {
public void doPass(
Long user_id,
Long film_id,
Integer round,
Double score,
String content) {
boolean isSave = false;
Fc_film_review review = null;
try {
review = this.jdbcTemplate.queryForBean("select * from fc_film_review where uid = ? and film_id = ? and round = ?", Fc_film_review.class, user_id, film_id, round);
String sql = "select * from fc_film_review where uid = ? and film_id = ? and round = ?";
review = this.jdbcTemplate.queryForBean(sql, Fc_film_review.class, user_id, film_id, round);
} catch (Exception e) {
isSave = true;
review = new Fc_film_review();
......
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