Commit 8097f69d authored by Quxl's avatar Quxl

xx

parent 3a0499ee
...@@ -7,6 +7,8 @@ import java.util.Map; ...@@ -7,6 +7,8 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.egolm.common.DateUtil;
import com.egolm.common.StringUtil;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.UserReviewService; import com.egolm.film.api.service.UserReviewService;
...@@ -20,19 +22,17 @@ public class UserReviewServiceImpl implements UserReviewService { ...@@ -20,19 +22,17 @@ public class UserReviewServiceImpl implements UserReviewService {
@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(); SqlWhere where = new SqlWhere().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 {
where.lt("r.review_state", 2); where.lt("r.review_state", 2);
} }
if(push_date != null) {
where.ge("r.create_time", DateUtil.start(push_date)).lt("r.create_time", DateUtil.end(push_date));
String sql = "select mf.*, r.enroll_type_id, r.review_round, r.create_time push_time from fc_member_film mf, fc_review r, fc_review_user where r.film_id = mf.id and r.id"; }
String sql = "select mf.*, r.enroll_type_id, r.review_round, r.create_time push_time from fc_member_film mf, fc_review r, fc_review_user ru where mf.id = r.film_id and r.id = ru.review_id and ru.user_id = " + user_id + StringUtil.join(" and ", " and ", "", "", where.getStringList());
return jdbcTemplate.limit(sql, page, where.getObjectList());
return null;
} }
......
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