Commit 693b6b1e authored by Quxl's avatar Quxl

x

parent b041f54d
...@@ -19,17 +19,19 @@ public class VoteServiceImpl implements VoteService { ...@@ -19,17 +19,19 @@ public class VoteServiceImpl implements VoteService {
@Override @Override
@Transactional @Transactional
public void toNextRound(Long member_film_id, Integer enroll_type_id) { public void toNextRound(Long member_film_id, Integer enroll_type_id) {
Date now = new Date();
try { try {
Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ?", Fc_review.class, member_film_id, enroll_type_id); Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ?", Fc_review.class, member_film_id, enroll_type_id);
Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review.getId()); Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review.getId());
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ? where review_id = ?", count > 0 ? 1 : 0, review.getId()); jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ?, push_time = ? where review_id = ?", count > 0 ? 1 : 0, now, review.getId());
} catch (Exception e) { } catch (Exception e) {
Fc_review review = new Fc_review(); Fc_review review = new Fc_review();
review.setEnroll_type_id(enroll_type_id); review.setEnroll_type_id(enroll_type_id);
review.setFilm_id(member_film_id.intValue()); review.setFilm_id(member_film_id.intValue());
review.setReview_round(1); review.setReview_round(1);
review.setReview_state(0); review.setReview_state(0);
review.setCreate_time(new Date()); review.setPush_time(now);
review.setCreate_time(now);
jdbcTemplate.save(review); jdbcTemplate.save(review);
} }
} }
......
...@@ -37,6 +37,11 @@ public class Fc_review implements java.io.Serializable { ...@@ -37,6 +37,11 @@ public class Fc_review implements java.io.Serializable {
*/ */
private Integer review_state; private Integer review_state;
/**
* 推送时间
*/
private Date push_time;
private Date create_time; private Date create_time;
...@@ -54,14 +59,16 @@ public class Fc_review implements java.io.Serializable { ...@@ -54,14 +59,16 @@ public class Fc_review implements java.io.Serializable {
* @param enroll_type_id 影片性质(申报奖项)ID * @param enroll_type_id 影片性质(申报奖项)ID
* @param review_round 审片轮数,第几轮审片 * @param review_round 审片轮数,第几轮审片
* @param review_state 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展 * @param review_state 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
* @param push_time 推送时间
* @param create_time * @param create_time
*/ */
public Fc_review(Integer id, Integer film_id, Integer enroll_type_id, Integer review_round, Integer review_state, Date create_time) { public Fc_review(Integer id, Integer film_id, Integer enroll_type_id, Integer review_round, Integer review_state, Date push_time, Date create_time) {
this.id = id; this.id = id;
this.film_id = film_id; this.film_id = film_id;
this.enroll_type_id = enroll_type_id; this.enroll_type_id = enroll_type_id;
this.review_round = review_round; this.review_round = review_round;
this.review_state = review_state; this.review_state = review_state;
this.push_time = push_time;
this.create_time = create_time; this.create_time = create_time;
} }
...@@ -105,6 +112,14 @@ public class Fc_review implements java.io.Serializable { ...@@ -105,6 +112,14 @@ public class Fc_review implements java.io.Serializable {
return review_state; return review_state;
} }
public void setPush_time(Date push_time) {
this.push_time = push_time;
}
public Date getPush_time() {
return push_time;
}
public void setCreate_time(Date create_time) { public void setCreate_time(Date create_time) {
this.create_time = create_time; this.create_time = create_time;
} }
......
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