Commit 9250e755 authored by Quxl's avatar Quxl

x

parent 44b11ee9
package com.egolm.film.api.service;
//package com.egolm.film.api.user.service;
//
//import java.util.Date;
//import java.util.List;
//import java.util.Map;
//
//import com.egolm.common.bean.Rjx;
//import com.egolm.common.jdbc.Page;
//import com.egolm.film.bean.Fc_film;
//import com.egolm.film.bean.Fc_film_doubtful_point;
//import com.egolm.film.bean.Fc_film_review;
//
//public interface UserReviewService {
//
// List<Map<String, Object>> limitReviewList(Long user_id, Page page, Date push_date, String film_type_name, String keyword);
//
// List<Map<String, Object>> limitUnviewList(Long user_id, Page page, Date push_date, String film_type_name, String keyword);
//
// Long queryMemberFilmIdByFilmId(Long film_id);
//
// List<Fc_film_review> queryRoundReviewList(Long user_id, Integer round, Long film_id);
//
// List<Fc_film_doubtful_point> queryDoubtfulList(Long user_id, Long film_id);
//
// Fc_film queryFilmById(Long film_id);
//
// Integer queryRound(Long user_id, Long film_id);
//
// Rjx queryStatistics(Long user_id);
//
// void doubtfulAppend(Long user_id, Long film_id, Integer round, Integer type, String type_content, Long play_time, Long times);
//
// void playAppend(Long user_id, Long film_id, Integer round, Long playtime, Long watchtime);
//
// void doReject(Long user_id, Long film_id, Integer round, String veto);
//
// void doPass(Long user_id, Long film_id, Integer round, Double score, String content);
//
//}
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.egolm.common.jdbc.Page;
public interface UserReviewService {
List<Map<String, Object>> queryReviewList(Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page);
}
\ No newline at end of file
......@@ -45,7 +45,7 @@ public class AdminTokenServiceImpl implements AdminTokenService {
session.setAttribute(TOKEN_NAME, token);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60*24, true);
if(cookie != null) {
String sql = "update fc_admin set token = ?, login_ip, login_time where adminid = ?";
String sql = "update fc_admin set token = ?, login_ip = ?, login_time = ? where adminid = ?";
String loginIp = ServletUtil.remoteIp(WebMvcConfig.getRequest());
jdbcTemplate.executeUpdate(sql, cookie.getValue(), loginIp, System.currentTimeMillis()/1000, adminid);
}
......
......@@ -472,6 +472,7 @@ public class FilmServiceImpl implements FilmService {
review.setFilm_id(member_film_id.intValue());
review.setReview_round(nextRound);
review.setReview_state(0);
review.setCreate_time(new Date());
jdbcTemplate.save(review);
}
}
......
package com.egolm.film.api.service.impl;
//package com.egolm.film.api.user.service.impl;
//
//import java.math.BigDecimal;
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.List;
//import java.util.Map;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import com.egolm.common.DateUtil;
//import com.egolm.common.StringUtil;
//import com.egolm.common.bean.Rjx;
//import com.egolm.common.jdbc.JdbcTemplate;
//import com.egolm.common.jdbc.Page;
//import com.egolm.film.api.user.service.UserReviewService;
//import com.egolm.film.bean.Fc_film;
//import com.egolm.film.bean.Fc_film_doubtful_point;
//import com.egolm.film.bean.Fc_film_review;
//import com.egolm.film.bean.Fc_film_user_play;
//import com.egolm.film.config.WebMvcConfig;
//
//@Service
//public class UserReviewServiceImpl implements UserReviewService {
//
// @Autowired
// private JdbcTemplate jdbcTemplate;
//
// @Override
// public List<Map<String, Object>> limitReviewList(
// Long user_id,
// Page page,
// Date push_date,
// String film_type_name,
// String keyword) {
//
// List<Object> args = new ArrayList<Object>();
// List<String> strs = new ArrayList<String>();
// args.add(user_id);
//
// if(push_date != null) {
// strs.add("allot.push_time >= ?");
// strs.add("allot.push_time < ?");
// args.add(DateUtil.start(push_date).getTime()/1000);
// args.add(DateUtil.end(DateUtil.start(push_date)).getTime()/1000);
// }
// if(film_type_name != null && film_type_name.trim().length() > 0) {
// strs.add("film.film_type_name = ?");
// args.add(film_type_name);
// }
// if(keyword != null && keyword.trim().length() > 0) {
// strs.add("(film.en_name like ? or film.cn_name like ?)");
// args.add("%" + keyword + "%");
// args.add("%" + keyword + "%");
// }
//
// String sql = ""
// + " select "
// + "film.*, "
// + "allot.uid, "
// + "allot.review_round, "
// + "allot.film_id, "
// + "allot.push_time, "
// + "review.is_save, "
// + "review.state review_state, "
// + "review.save_state "
// + "from "
// + "fc_film_allot allot "
// + "left join fc_film film on film.id = allot.film_id "
// + "left join fc_film_review review on review.film_id = allot.film_id and review.uid = allot.uid and review.round = allot.review_round "
// + "where "
// + "allot.uid = ? "
// + "and review.state > 0"
// + StringUtil.join(" and ", " ", "", "", strs);
// return jdbcTemplate.limit(sql, page, args.toArray());
// }
//
// @Override
// public List<Map<String, Object>> limitUnviewList(
// Long user_id,
// Page page,
// Date push_date,
// String film_type_name,
// String keyword) {
//
// List<Object> args = new ArrayList<Object>();
// List<String> strs = new ArrayList<String>();
// args.add(user_id);
// if(push_date != null) {
// strs.add("allot.push_time >= ?");
// strs.add("allot.push_time < ?");
// args.add(DateUtil.start(push_date).getTime()/1000);
// args.add(DateUtil.end(DateUtil.start(push_date)).getTime()/1000);
// }
// if(film_type_name != null && film_type_name.trim().length() > 0) {
// strs.add("film.film_type_name = ?");
// args.add(film_type_name);
// }
// if(keyword != null && keyword.trim().length() > 0) {
// strs.add("(film.en_name like ? or film.cn_name like ?)");
// args.add("%" + keyword + "%");
// args.add("%" + keyword + "%");
// }
//
// String sql = ""
// + " select "
// + "film.*, "
// + "allot.uid, "
// + "allot.review_round, "
// + "allot.film_id, "
// + "allot.push_time, "
// + "review.is_save, "
// + "review.state review_state, "
// + "review.save_state "
// + "from "
// + "fc_film_allot allot "
// + "left join fc_film film on film.id = allot.film_id "
// + "left join fc_film_review review on review.film_id = allot.film_id and review.uid = allot.uid and review.round = allot.review_round "
// + "where "
// + "allot.uid = ? "
// + "and review.state is null"
// + StringUtil.join(" and ", " ", "", "", strs);
// return jdbcTemplate.limit(sql, page, args.toArray());
// }
//
// @Override
// public Long queryMemberFilmIdByFilmId(Long film_id) {
// String sql = "select mf.id from fc_member_film mf, fc_film f where mf.film_no = f.film_no and f.id = ?";
// return jdbcTemplate.queryForLong(sql, film_id);
// }
//
// @Override
// public List<Fc_film_review> queryRoundReviewList(Long user_id, Integer round, Long film_id) {
// String sql = "SELECT fc_film_review.* FROM fc_film_review WHERE film_id = ? AND uid = ? AND round = ?";
// return jdbcTemplate.queryForBeans(sql, Fc_film_review.class, film_id, user_id, round);
// }
//
// @Override
// public List<Fc_film_doubtful_point> queryDoubtfulList(Long user_id, Long film_id) {
// String sql = "SELECT * FROM fc_film_doubtful_point WHERE uid = ? AND film_id = ?";
// return jdbcTemplate.queryForBeans(sql, Fc_film_doubtful_point.class, user_id, film_id);
// }
//
// @Override
// public Fc_film queryFilmById(Long film_id) {
// return jdbcTemplate.queryForBean("select * from fc_film where id = ?", Fc_film.class, film_id);
// }
//
// @Override
// public Integer queryRound(Long user_id, Long film_id) {
// return jdbcTemplate.queryForInt("select round from fc_film_allot where film_id = ? and uid = ?", film_id, user_id);
// }
//
// @Override
// public Rjx queryStatistics(Long user_id) {
// String sql0 = "SELECT count(*) as total FROM fc_view_allot WHERE uid = ?";
// String sql1 = "SELECT count(*) as total FROM fc_view_allot WHERE uid = ? AND review_state = 4";
// String sql2 = "SELECT count(*) as total FROM fc_view_allot WHERE uid = ? AND review_state = 2";
// String sql3 = "SELECT count(*) as total FROM fc_view_allot WHERE uid = ? AND (review_state = 3 or review_state = 5)";
// String sql4 = "SELECT count(*) as total FROM fc_view_allot WHERE uid = ? AND review_state = 6";
// Integer count0 = jdbcTemplate.queryForInt(sql0, user_id);
// Integer count1 = jdbcTemplate.queryForInt(sql1, user_id);
// Integer count2 = jdbcTemplate.queryForInt(sql2, user_id);
// Integer count3 = jdbcTemplate.queryForInt(sql3, user_id);
// Integer count4 = jdbcTemplate.queryForInt(sql4, user_id);
//
// Double rate_1 = 0D;
// Double rate_2 = 0D;
// Double rate_3 = 0D;
// Double rate_4 = 0D;
//
// if(count0 > 0) {
// rate_1 = (double)count1/(double)count0;
// rate_2 = (double)count2/(double)count0;
// rate_3 = (double)count3/(double)count0;
// rate_4 = (double)count4/(double)count0;
// }
//
// return Rjx.jsonOk()
// .set("total", count0)
// .set("count_state_4", count1)
// .set("count_state_2", count2)
// .set("count_state_3_5", count3)
// .set("count_state_6", count4)
// .set("rate_1", toRate(rate_1))
// .set("rate_2", toRate(rate_2))
// .set("rate_3", toRate(rate_3))
// .set("rate_4", toRate(rate_4))
// ;
// }
//
// private String toRate(Double dou) {
// return new BigDecimal(dou*100).setScale(2, BigDecimal.ROUND_HALF_UP) + "%";
// }
//
// @Override
// 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);
// doubtful.setCreate_time(System.currentTimeMillis());
// doubtful.setFilm_id(film_id);
// doubtful.setPlay_time(play_time + "");
// doubtful.setRound(round);
// doubtful.setTimes(times);
// doubtful.setType(type);
// doubtful.setType_content(type_content);
// doubtful.setUid(user_id);
// jdbcTemplate.save(doubtful);
// }
//
// @Override
// 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);
// play.setPlaytime(playtime + "");
// play.setRound(round);
// play.setWatchtime(watchtime);
// play.setUid(user_id);
// jdbcTemplate.save(play);
// }
//
// @Override
// public void doReject(
// Long user_id,
// Long film_id,
// Integer round,
// String veto) {
//
// boolean isSave = false;
// Fc_film_review review = null;
// try {
// 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();
// review.setUid(user_id);
// review.setFilm_id(film_id);
// }
// String ip = WebMvcConfig.getRemoteIp();
// review.setRound(round);
// review.setVeto(veto);
// review.setReview_ip(ip);
// review.setReview_time(System.currentTimeMillis());
// review.setState(2);
// if(isSave) {
// this.jdbcTemplate.save(review);
// } else {
// this.jdbcTemplate.update(review);
// }
// }
//
// @Override
// public void doPass(
// Long user_id,
// Long film_id,
// Integer round,
// Double score,
// String content) {
// boolean isSave = false;
// Fc_film_review review = null;
// try {
// 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();
// review.setUid(user_id);
// review.setFilm_id(film_id);
// }
// String ip = WebMvcConfig.getRemoteIp();
// review.setRound(round);
// review.setSelect_result(content);
// review.setReview_ip(ip);
// review.setAward_1_score(new BigDecimal(score));
// review.setReview_time(System.currentTimeMillis());
// review.setState(1);
// if(isSave) {
// this.jdbcTemplate.save(review);
// } else {
// this.jdbcTemplate.update(review);
// }
// }
//
//}
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.UserReviewService;
@Service
public class UserReviewServiceImpl implements UserReviewService {
@Autowired
JdbcTemplate jdbcTemplate;
@Override
public List<Map<String, Object>> queryReviewList(Date push_date, Integer film_type_id, Integer enroll_type_id,
String keyword, Page page) {
// TODO Auto-generated method stub
return null;
}
}
......@@ -24,7 +24,7 @@ import io.swagger.annotations.ApiOperation;
@Api
@Controller
@RequestMapping({"member/apply", "admin/first"})
@RequestMapping({"member/apply", "admin/first", "user/base"})
public class FilmController {
@Autowired
......
package com.egolm.film.api.web.user;
//package com.egolm.film.api.user;
//
//import java.util.Date;
//import java.util.List;
//import java.util.Map;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.egolm.common.bean.Rjx;
//import com.egolm.common.jdbc.Page;
//import com.egolm.film.api.member.service.MemberService;
//import com.egolm.film.api.user.service.UserReviewService;
//import com.egolm.film.api.user.service.UserTokenService;
//import com.egolm.film.bean.Fc_film_doubtful_point;
//import com.egolm.film.bean.Fc_film_review;
//import com.egolm.film.bean.Fc_member_film;
//import com.egolm.film.bean.Fc_member_film_director;
//import com.egolm.film.bean.Fc_member_film_issuer;
//import com.egolm.film.bean.Fc_member_film_playactor;
//import com.egolm.film.bean.Fc_member_film_show;
//import com.egolm.film.model.LoginToken;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//
//@Api
//@Controller
//@RequestMapping("user/review")
//public class UserReviewController {
//
// @Autowired
// private UserTokenService tokenService;
//
// @Autowired
// private UserReviewService reviewService;
//
// @Autowired
// private MemberService memberService;
//
// @ResponseBody
// @PostMapping("review_list")
// @ApiOperation("已审核列表")
// @ApiImplicitParams({
// @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 = "push_date", 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, Date push_date, String film_type_name, String keyword) {
// index = index == null ? 1 : index;
// limit = limit == null ? 20 : limit;
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Page page = new Page(index, limit, limitKey);
// List<Map<String, Object>> list = reviewService.limitReviewList(user_id, page, push_date, film_type_name, keyword);
// return Rjx.jsonOk().setData(list).setPage(page);
// }
//
//
// @ResponseBody
// @PostMapping("unview_list")
// @ApiOperation("未审核列表")
// @ApiImplicitParams({
// @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 = "push_date", 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, Date push_date, String film_type_name, String keyword) {
// index = index == null ? 1 : index;
// limit = limit == null ? 20 : limit;
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Page page = new Page(index, limit, limitKey);
// List<Map<String, Object>> list = reviewService.limitUnviewList(user_id, page, push_date, film_type_name, keyword);
// return Rjx.jsonOk().setData(list).setPage(page);
// }
//
// @ResponseBody
// @PostMapping("member_apply_detail")
// @ApiOperation("查询申报影片详细信息")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"),
// })
// public Object getMemberApplyDetail(Long film_id) {
// Long member_film_id = reviewService.queryMemberFilmIdByFilmId(film_id);
// Fc_member_film memberFilm = memberService.queryMemberFilmById(member_film_id);
// List<Fc_member_film_director> directorList = memberService.queryMemberFilmDirectorList(member_film_id);
// List<Fc_member_film_issuer> issuerList = memberService.queryMemberFilmIssuerList(member_film_id);
// List<Fc_member_film_playactor> playactorList = memberService.queryMemberFilmPlayactorList(member_film_id);
// List<Fc_member_film_show> showList = memberService.queryMemberFilmShowList(member_film_id);
//
// return Rjx.jsonOk()
// .setData(memberFilm)
// .set("member_film_id", member_film_id)
// .set("directorList", directorList)
// .set("issuerList", issuerList)
// .set("playactorList", playactorList)
// .set("showList", showList)
// ;
// }
//
// @ResponseBody
// @PostMapping("review_record_list")
// @ApiOperation("查询评审记录列表")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
// })
// public Object getReviewRecordList(Long film_id) {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Integer round = reviewService.queryRound(user_id, film_id);
// List<Fc_film_review> reviewList = reviewService.queryRoundReviewList(user_id, round, film_id);
// return Rjx.jsonOk().setData(reviewList);
// }
//
// @ResponseBody
// @PostMapping("doubtful_list")
// @ApiOperation("查询疑点列表")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
// })
// public Object getDoubtfulList(Long film_id) {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// List<Fc_film_doubtful_point> doubtfulList = reviewService.queryDoubtfulList(user_id, film_id);
// return Rjx.jsonOk().setData(doubtfulList);
// }
//
// @ResponseBody
// @PostMapping("doubtful_append")
// @ApiOperation("增加疑点")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"),
// @ApiImplicitParam(paramType = "query", dataType = "int", required = true, name = "type", value="疑点类型"),
// @ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "type_content", value="疑点说明"),
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "play_time", value="播放时间"),
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "times", value="次数"),
// })
// public Object doubtfulAppend(Long film_id, Integer type, String type_content, Long play_time, Long times) {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Integer round = reviewService.queryRound(user_id, film_id);
// reviewService.doubtfulAppend(user_id, film_id, round, type, type_content, play_time, times);
// return Rjx.jsonOk();
// }
//
// @ResponseBody
// @PostMapping("play_append")
// @ApiOperation("增加播放记录")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"),
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "playtime", value="播放时间"),
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "watchtime", value="观看时间"),
// })
// public Object playAppend(Long film_id, Long playtime, Long watchtime) {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Integer round = reviewService.queryRound(user_id, film_id);
// reviewService.playAppend(user_id, film_id, round, playtime, watchtime);
// return Rjx.jsonOk();
// }
//
// @ResponseBody
// @PostMapping("do_reject")
// @ApiOperation("审片否决")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
// @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "veto", value="否决理由"),
// })
// public Object doReject(Long film_id, String veto) {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Integer round = reviewService.queryRound(user_id, film_id);
// reviewService.doReject(user_id, film_id, round, veto);
// return Rjx.jsonOk();
// }
//
// @ResponseBody
// @PostMapping("do_pass")
// @ApiOperation("审片通过")
// @ApiImplicitParams({
// @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"),
// @ApiImplicitParam(paramType = "query", dataType = "float", required = true, name = "score", value="评分"),
// @ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "content", value="选片结论"),
// })
// public Object doPass(Long film_id, Double score, String content) {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// Integer round = reviewService.queryRound(user_id, film_id);
// reviewService.doPass(user_id, film_id, round, score, content);
// return Rjx.jsonOk();
// }
//
// @ResponseBody
// @PostMapping("statistics")
// @ApiOperation("查询统计数据")
// public Object statistics() {
// LoginToken loginToken = tokenService.getToken();
// Long user_id = (Long)loginToken.getId();
// return reviewService.queryStatistics(user_id);
// }
//
//}
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.UserReviewService;
import com.egolm.film.api.service.UserTokenService;
import com.egolm.film.model.LoginToken;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
@Api
@Controller
@RequestMapping("user/review")
public class UserReviewController {
@Autowired
private UserTokenService tokenService;
@Autowired
private UserReviewService service;
@ResponseBody
@PostMapping("review_list")
@ApiOperation("审核列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "push_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="分页大小"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "limitKey", value="分页排序", allowMultiple=true),
})
public Object getReviewList(Integer review_state, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Long index, Long limit, String[] limitKey) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
LoginToken loginToken = tokenService.getToken();
Long user_id = (Long)loginToken.getId();
Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = service.queryReviewList(push_date, film_type_id, enroll_type_id, keyword, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
}
......@@ -4,6 +4,8 @@ import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
......@@ -38,6 +40,8 @@ public class Fc_review implements java.io.Serializable {
*/
private String result_text;
private Date create_time;
/**
* 无参数构造方法
......@@ -53,13 +57,15 @@ public class Fc_review implements java.io.Serializable {
* @param review_state 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
* @param review_round 审片轮数,第几轮审片
* @param result_text 审片结论
* @param create_time
*/
public Fc_review(Integer id, Integer film_id, Integer review_state, Integer review_round, String result_text) {
public Fc_review(Integer id, Integer film_id, Integer review_state, Integer review_round, String result_text, Date create_time) {
this.id = id;
this.film_id = film_id;
this.review_state = review_state;
this.review_round = review_round;
this.result_text = result_text;
this.create_time = create_time;
}
public void setId(Integer id) {
......@@ -102,5 +108,13 @@ public class Fc_review implements java.io.Serializable {
return result_text;
}
public void setCreate_time(Date create_time) {
this.create_time = create_time;
}
public Date getCreate_time() {
return create_time;
}
}
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