@@ -39,7 +39,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -39,7 +39,7 @@ public class ReviewServiceImpl implements ReviewService {
Integerreview_round,
Integerreview_round,
Integerreview_state,
Integerreview_state,
Integerallot_state,
Integerallot_state,
Integerstate,
Integeropt_state,
Pagepage){
Pagepage){
SqlWherew1=newSqlWhere()
SqlWherew1=newSqlWhere()
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)",newObject[]{group_id})
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)",newObject[]{group_id})
...
@@ -53,7 +53,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -53,7 +53,7 @@ public class ReviewServiceImpl implements ReviewService {
.eq("r.enroll_type_id",enroll_type_id)
.eq("r.enroll_type_id",enroll_type_id)
.eq("r.review_state",review_state)
.eq("r.review_state",review_state)
.eq("r.allot_state",allot_state)
.eq("r.allot_state",allot_state)
.eq("r.state",state);
.eq("r.opt_state",opt_state);
Stringsql=""
Stringsql=""
+"select "
+"select "
+"mf.id, "
+"mf.id, "
...
@@ -69,7 +69,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -69,7 +69,7 @@ public class ReviewServiceImpl implements ReviewService {
+"r.review_round, "
+"r.review_round, "
+"r.review_state, "
+"r.review_state, "
+"r.allot_state, "
+"r.allot_state, "
+"r.state, "
+"r.opt_state, "
+"r.enroll_type_id, "
+"r.enroll_type_id, "
+"(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director' group by fp.film_id, fp.playactor_type) director_name, "
+"(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director' group by fp.film_id, fp.playactor_type) director_name, "
+"count(rr.id) user_count "
+"count(rr.id) user_count "
...
@@ -91,7 +91,8 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -91,7 +91,8 @@ public class ReviewServiceImpl implements ReviewService {
+"r.id, "
+"r.id, "
+"r.review_round, "
+"r.review_round, "
+"r.review_state, "
+"r.review_state, "
+"r.allot_state,"
+"r.allot_state, "
+"r.opt_state, "
+"r.enroll_type_id "
+"r.enroll_type_id "
;
;
...
@@ -132,6 +133,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -132,6 +133,7 @@ public class ReviewServiceImpl implements ReviewService {
+"r.review_round, "
+"r.review_round, "
+"r.allot_state, "
+"r.allot_state, "
+"r.review_state, "
+"r.review_state, "
+"r.opt_state, "
+"r.push_time, "
+"r.push_time, "
+"rr.view_state, "
+"rr.view_state, "
+"rr.review_state user_review_state, "
+"rr.review_state user_review_state, "
...
@@ -218,7 +220,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -218,7 +220,7 @@ public class ReviewServiceImpl implements ReviewService {
review.setReview_round(1);
review.setReview_round(1);
review.setPush_time(now);
review.setPush_time(now);
review.setAllot_state(0);
review.setAllot_state(0);
review.setState(0);
review.setOpt_state(0);
review.setReview_state(null);
review.setReview_state(null);
review.setCreate_time(now);
review.setCreate_time(now);
jdbcTemplate.save(review);
jdbcTemplate.save(review);
...
@@ -231,7 +233,7 @@ public class ReviewServiceImpl implements ReviewService {
...
@@ -231,7 +233,7 @@ public class ReviewServiceImpl implements ReviewService {
publicvoidtoNextRound(Integerreview_id){
publicvoidtoNextRound(Integerreview_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 = r.review_round and r.id = ?",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 = r.review_round and r.id = ?",review_id);
Integerallot_state=count>0?1:0;
Integerallot_state=count>0?1:0;
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, state = 0, allot_state = ?, review_state = null, push_time = now() where id = ?",allot_state,review_id);
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, opt_state = 0, allot_state = ?, review_state = null, push_time = now() where id = ?",allot_state,review_id);