Commit e840ffab authored by Quxl's avatar Quxl

优化代码

parent ac0a86cc
......@@ -14,8 +14,6 @@ public interface UserReviewService {
List<Map<String, Object>> limitUnviewByUserId(Integer user_id, Page page);
Map<String, Object> queryAllotDetailByFilmId(Long film_id);
Long queryMemberFilmIdByFilmId(Long film_id);
List<Fc_film_review> queryRoundReviewListByUserId(Integer user_id, Integer round, Long film_id);
......
......@@ -61,32 +61,6 @@ public class UserReviewServiceImpl implements UserReviewService {
return jdbcTemplate.limit(sql, page, user_id);
}
@Override
public Map<String, Object> queryAllotDetailByFilmId(Long film_id) {
String sql = ""
+ "SELECT "
+ "allot.*, "
+ "review.round, "
+ "review.review_time, "
+ "review.state, "
+ "review.veto, "
+ "review.video_intro, "
+ "review.video_features, "
+ "review.select_result, "
+ "review.award_1_score, "
+ "review.award_2_score, "
+ "review.award_3_score, "
+ "review.award_4_score, "
+ "review.award_5_score, "
+ "user.realname "
+ "FROM fc_film_allot as allot "
+ "LEFT JOIN fc_film_review as review on allot.film_id = review.film_id and allot.review_round = review.round and allot.uid = review.uid "
+ "LEFT JOIN fc_user as user on allot.uid = user.uid "
+ "WHERE "
+ "allot.film_id = '?'";
return jdbcTemplate.queryForMap(sql, film_id);
}
@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 = ?";
......
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