Commit 99e999b0 authored by Quxl's avatar Quxl

优化代码

parent e840ffab
......@@ -56,7 +56,7 @@ public class UserReviewController {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = reviewService.limitReviewByUserId(user_id, page);
List<Map<String, Object>> list = reviewService.limitReviewList(user_id, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
......@@ -73,7 +73,7 @@ public class UserReviewController {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = reviewService.limitUnviewByUserId(user_id, page);
List<Map<String, Object>> list = reviewService.limitUnviewList(user_id, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
......@@ -111,7 +111,7 @@ public class UserReviewController {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
Integer round = reviewService.queryRound(user_id, film_id);
List<Fc_film_review> reviewList = reviewService.queryRoundReviewListByUserId(user_id, round, film_id);
List<Fc_film_review> reviewList = reviewService.queryRoundReviewList(user_id, round, film_id);
return Rjx.jsonOk().setData(reviewList);
}
......@@ -124,7 +124,7 @@ public class UserReviewController {
public Object getDoubtfulList(Long film_id) {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
List<Fc_film_doubtful_point> doubtfulList = reviewService.queryDoubtfulListByUserId(user_id, film_id);
List<Fc_film_doubtful_point> doubtfulList = reviewService.queryDoubtfulList(user_id, film_id);
return Rjx.jsonOk().setData(doubtfulList);
}
......
......@@ -10,15 +10,15 @@ import com.egolm.film.bean.Fc_film_review;
public interface UserReviewService {
List<Map<String, Object>> limitReviewByUserId(Integer user_id, Page page);
List<Map<String, Object>> limitReviewList(Integer user_id, Page page);
List<Map<String, Object>> limitUnviewByUserId(Integer user_id, Page page);
List<Map<String, Object>> limitUnviewList(Integer user_id, Page page);
Long queryMemberFilmIdByFilmId(Long film_id);
List<Fc_film_review> queryRoundReviewListByUserId(Integer user_id, Integer round, Long film_id);
List<Fc_film_review> queryRoundReviewList(Integer user_id, Integer round, Long film_id);
List<Fc_film_doubtful_point> queryDoubtfulListByUserId(Integer user_id, Long film_id);
List<Fc_film_doubtful_point> queryDoubtfulList(Integer user_id, Long film_id);
Fc_film queryFilmById(Long film_id);
......
......@@ -20,7 +20,7 @@ public class UserReviewServiceImpl implements UserReviewService {
private JdbcTemplate jdbcTemplate;
@Override
public List<Map<String, Object>> limitReviewByUserId(Integer user_id, Page page) {
public List<Map<String, Object>> limitReviewList(Integer user_id, Page page) {
String sql = ""
+ " select "
+ "film.*, "
......@@ -41,7 +41,7 @@ public class UserReviewServiceImpl implements UserReviewService {
}
@Override
public List<Map<String, Object>> limitUnviewByUserId(Integer user_id, Page page) {
public List<Map<String, Object>> limitUnviewList(Integer user_id, Page page) {
String sql = ""
+ " select "
+ "film.*, "
......@@ -68,13 +68,13 @@ public class UserReviewServiceImpl implements UserReviewService {
}
@Override
public List<Fc_film_review> queryRoundReviewListByUserId(Integer user_id, Integer round, Long film_id) {
public List<Fc_film_review> queryRoundReviewList(Integer 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> queryDoubtfulListByUserId(Integer user_id, Long film_id) {
public List<Fc_film_doubtful_point> queryDoubtfulList(Integer 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);
}
......
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