.where("r.review_round in (select ugr.review_round from fc_user_group_round ugr, fc_user u where ugr.group_id = u.group_id and u.uid = ?)",newObject[]{user_id})
.where(is_review?"rr.review_state is not null":"rr.review_state is null",newObject[]{})
;
if(is_review){
where.where("rr.review_state is not null and rr.review_time is not null");
}else{
where.where("rr.review_state is null and rr.review_time is null and rr.review_round = r.review_round");
}
Stringsql_film="fc_member_film";
if(StringUtil.isNotBlank(enroll_type_id)){
sql_film="(select mf0.* from fc_member_film mf0, fc_member_film_enroll mfe where mf0.id = mfe.film_id and mfe.enroll_type_id = "+enroll_type_id+")";
...
...
@@ -182,6 +187,7 @@ public class ReviewServiceImpl implements ReviewService {
+"r.opt_state, "
+"r.push_time, "
+"r.review_time, "
+"rr.id record_id, "
+"rr.review_state user_review_state, "
+"rr.review_score, "
+"rr.review_text, "
...
...
@@ -194,10 +200,20 @@ public class ReviewServiceImpl implements ReviewService {
+"where "
+"mf.id = r.film_id "
+"and r.id = rr.review_id "
+"and r.review_round = rr.review_round "
+"and rr.user_id = "+user_id
+StringUtil.join(" and "," and ","","",where.getStringList());