Commit 278eaa5b authored by Quxl's avatar Quxl

x

parent bfcb94b4
......@@ -70,6 +70,8 @@ public interface ReviewService {
Fc_review queryReview(Integer film_id, Integer enroll_type_id);
Fc_review queryReviewById(Integer review_id);
void saveDoubtfulList(List<Fc_review_doubtful> doubtfulList);
List<Map<String, Object>> queryDoubtfulListByFilmIdForUser(Integer film_id, Integer user_id);
......@@ -90,6 +92,8 @@ public interface ReviewService {
void tryNextRound(Integer review_id);
void save(Object obj);
void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id);
void deleteReviewRecord(Integer review_id, Integer review_round, Integer[] user_id);
......
......@@ -264,6 +264,11 @@ public class ReviewServiceImpl implements ReviewService {
return jdbcTemplate.queryForBean(sql, Fc_review.class, film_id, enroll_type_id);
}
@Override
public Fc_review queryReviewById(Integer review_id) {
return jdbcTemplate.queryForBean("select * from fc_review where id = ?", Fc_review.class, review_id);
}
@Override
public void saveDoubtfulList(List<Fc_review_doubtful> doubtfulList) {
jdbcTemplate.batchSave(doubtfulList);
......@@ -610,6 +615,10 @@ public class ReviewServiceImpl implements ReviewService {
jdbcTemplate.save(history);
}
public void save(Object obj) {
jdbcTemplate.save(obj);
}
@Override
@Transactional
public void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id) {
......
package com.egolm.film.api.web.admin;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -19,6 +20,8 @@ import com.egolm.film.api.service.AdminUserService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.Fc_review_history;
import com.egolm.film.bean.Fc_review_record;
import com.egolm.film.bean.Fc_review_record_ext;
import com.egolm.film.config.XRException;
......@@ -187,13 +190,24 @@ public class AdminReviewController {
}
@ResponseBody
@Transactional
@PostMapping("toNextRound")
@ApiOperation("进入下一轮审片")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="review_id", value="审片主表ID"),
})
public Object toNextRound(Integer review_id) {
Fc_review review = reviewService.queryReviewById(review_id);
Fc_review_history history = new Fc_review_history();
history.setReview_id(review.getId());
history.setEnroll_type_id(review.getEnroll_type_id());
history.setFilm_id(review.getFilm_id());
history.setReview_round(review.getReview_round());
history.setReview_state(review.getReview_state());
history.setCreate_time(new Date());
history.setOpt_state(review.getOpt_state());
reviewService.toNextRound(review_id);
reviewService.save(history);
return Rjx.jsonOk();
}
......@@ -206,7 +220,7 @@ public class AdminReviewController {
})
public Object toNextRoundBatch(Integer[] review_id) {
for(Integer id : review_id) {
reviewService.toNextRound(id);
this.toNextRound(id);
}
return Rjx.jsonOk();
}
......
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