Commit 26e6a63a authored by Quxl's avatar Quxl

x

parent 2e792b28
...@@ -27,7 +27,8 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -27,7 +27,8 @@ public class ReviewServiceImpl implements ReviewService {
@Override @Override
public List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page) { public List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date push_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page) {
SqlWhere where = new SqlWhere().eq("r.enroll_type_id", enroll_type_id).lk(new String[]{"en_name", "cn_name"}, keyword); List<Integer> ids = jdbcTemplate.queryForObjects("select ugf.fun_id from fc_user_group_fun ugf, fc_user u where ugf.group_id = u.group_id", Integer.class, user_id);
SqlWhere where = new SqlWhere().in("r.review_round", ids.toArray()).eq("r.enroll_type_id", enroll_type_id).lk(new String[]{"en_name", "cn_name"}, keyword);
if(is_review) { if(is_review) {
where.ge("r.review_state", 2); where.ge("r.review_state", 2);
} else { } else {
...@@ -56,7 +57,8 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -56,7 +57,8 @@ public class ReviewServiceImpl implements ReviewService {
+ "where " + "where "
+ " mf.id = r.film_id " + " mf.id = r.film_id "
+ "and r.id = rr.review_id " + "and r.id = rr.review_id "
+ "and r.review_round = rr.review_round" + "and r.review_round = rr.review_round "
+ "and r.review_round in ()"
+ "and rr.user_id = " + user_id + "and rr.user_id = " + user_id
+ StringUtil.join(" and ", " and ", "", "", where.getStringList()); + StringUtil.join(" and ", " and ", "", "", where.getStringList());
return jdbcTemplate.limit(sql, page, where.getObjectList()); return jdbcTemplate.limit(sql, page, where.getObjectList());
......
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