+"fc_review_record rr left join fc_user u on rr.user_id = u.uid, "
+"fc_review_history rh left join fc_member_film mf on mf.id = rh.film_id "
+"where "
+"rre.ext_type = '"+ext_type+"' "
+"and rh.review_round = "+review_round+" "
+"and rre.record_id = rr.id "
+"and rr.review_id = rh.review_id "
+"and rh.enroll_type_id = 2 "
+"and rh.opt_state = 2 "
+"group by "
+"rh.film_id, "
+"rh.review_id, "
+"rh.enroll_type_id, "
+"rh.review_round, "
+"rh.review_state, "
+"rh.opt_state, "
+"rr.group_id, "
+"mf.cn_name, "
+"mf.en_name, "
+"mf.film_no, "
+"rre.ext_type, "
+"rre.ext_name"
;
sql="select @rownum:=@rownum+1 as rownum, t.* from ("+sql+") t, (select @rownum:=0) row where t.group_id = "+user_group_id+" order by t.ext_score_avg desc";
where.where("(tt.film_no = ? or tt.en_name like ? or tt.cn_name like ? or tt.ext_name like ?)",newObject[]{Integer.valueOf(keyword),lkstr,lkstr,lkstr});
Stringsql="select ug.group_id, ug.group_name from fc_user_group ug, fc_user u, fc_review_record rr, fc_review r where ug.group_id = u.group_id and u.uid = rr.user_id and rr.review_id = r.id and r.review_round = ? and r.enroll_type_id = ? group by ug.group_id, ug.group_name order by ug.group_id";