Stringsql="select r.* from fc_review r, fc_review_record rr, fc_review_record_ext rre where rre.record_id = rr.id and rr.review_id = r.id and r.enroll_type_id = 2 and review_round >= "+review_round+" group by rr.review_id, rre.record_id, ";
Stringsql="select ran.*, mf.film_no from fc_report_asia_new ran left join fc_member_film mf on mf.id = ran.film_id where ran.user_group_id = "+user_group_id+" and ran.review_round = "+review_round+(StringUtil.isNotBlank(ext_type)?(" and ran.item_"+ext_type+" is not null"):"");
//TODO
returnjdbcTemplate.limit(sql,page);
returnnull;
}
}
@Override
@Override
...
@@ -311,17 +311,19 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -311,17 +311,19 @@ public class ReviewServiceImpl implements ReviewService {
Integercount=jdbcTemplate.queryForInt("select count(rr.id) from fc_review_record rr, fc_review r where rr.review_id = r.id and rr.review_round = ? and r.id = ?",review_round,review_id);
Integercount=jdbcTemplate.queryForInt("select count(rr.id) from fc_review_record rr, fc_review r where rr.review_id = r.id and rr.review_round = ? and r.id = ?",review_round,review_id);
Integerallot_state=count>0?1:0;
Integerallot_state=count>0?1:0;
jdbcTemplate.executeUpdate("update fc_review set review_round = ?, opt_state = 0, allot_state = ?, review_state = null, push_time = now() where id = ?",review_round,allot_state,review_id);
jdbcTemplate.executeUpdate("update fc_review set review_round = ?, opt_state = 0, allot_state = ?, review_state = 0, push_time = now() where id = ?",review_round,allot_state,review_id);
Stringsql="select rr.user_group_id, rre.ext_type, rre.ext_name, avg(rre.ext_score) ext_score from fc_review_record rr, fc_review_record_ext rre where rre.record_id = rr.id and rr.review_id = "+review_id+" group by rr.user_group_id, rre.ext_type, rre.ext_name";
Stringsql="select rr.user_group_id, rre.ext_type, rre.ext_name, avg(rre.ext_score) ext_score from fc_review_record rr, fc_review_record_ext rre where rre.record_id = rr.id and rr.review_id = "+review_id+" and rr.review_round = "+review_round+" group by rr.user_group_id, rre.ext_type, rre.ext_name";
@@ -516,6 +513,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -516,6 +513,7 @@ public class ReviewServiceImpl implements ReviewService {
jdbcTemplate.executeUpdate("update fc_review set allot_state = 1, opt_state = 0 where id = ? and review_round = ?",review_id,review_round);
jdbcTemplate.executeUpdate("update fc_review set allot_state = 1, opt_state = 0 where id = ? and review_round = ?",review_id,review_round);
Stringsql0="select rr.user_group_id from fc_review_record rr, fc_review r where rr.review_id = r.id and r.enroll_type_id = 2 and rr.review_id = ? and rr.review_round = ? and rr.review_round in (2,3) group by rr.user_group_id";
Stringsql0="select rr.user_group_id from fc_review_record rr, fc_review r where rr.review_id = r.id and r.enroll_type_id = 2 and rr.review_id = ? and rr.review_round = ? and rr.review_round in (2,3) group by rr.user_group_id";
sql0="select count(t.user_group_id) from ("+sql0+") t";