Commit 748cacf6 authored by Quxl's avatar Quxl

x

parent 63b3ec14
......@@ -123,7 +123,7 @@ public interface ReviewService {
void allotShowFilmUser(Integer review_id, Integer[] user_id);
List<Map<String, Object>> queryUserShowList(Integer user_id);
List<Map<String, Object>> queryUserShowList(Integer user_id, Page page);
void toType4(Integer id);
......
......@@ -147,7 +147,7 @@ public class ReviewServiceImpl implements ReviewService {
Integer enroll_type_id,
Page page) {
SqlWhere where = new SqlWhere()
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.lk("mf.keywords", keyword)
.ge("r.push_time", start_date)
.lt("r.push_time", end_date == null ? null : DateUtil.end(end_date))
.ge("r.review_time", review_start_date)
......@@ -660,9 +660,9 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public List<Map<String, Object>> queryUserShowList(Integer user_id) {
public List<Map<String, Object>> queryUserShowList(Integer user_id, Page page) {
String sql = "select r.id review_id, mf.* from fc_review r left join fc_member_film mf on mf.id = r.film_id, fc_user_film uf where r.id = uf.review_id and uf.user_id = ?";
return jdbcTemplate.queryForList(sql, user_id);
return jdbcTemplate.limit(sql, page, user_id);
}
@Override
......
......@@ -84,10 +84,21 @@ public class UserReviewController {
@ResponseBody
@PostMapping("show_list")
@ApiOperation("看片列表")
public Object getReviewList() {
@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="分页排序"),
})
public Object getReviewList(
String[] limitKey,
Long index,
Long limit) {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
List<Map<String, Object>> list = service.queryUserShowList(user_id);
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = service.queryUserShowList(user_id, page);
return Rjx.jsonOk().setData(list);
}
......
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