Commit b9475773 authored by Quxl's avatar Quxl

x

parent 7fdbc579
...@@ -133,5 +133,7 @@ public interface ReviewService { ...@@ -133,5 +133,7 @@ public interface ReviewService {
List<Map<String, Object>> queryDisputeCount(); List<Map<String, Object>> queryDisputeCount();
boolean isBeginReview(Long film_id);
} }
\ No newline at end of file
...@@ -682,4 +682,9 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -682,4 +682,9 @@ public class ReviewServiceImpl implements ReviewService {
return jdbcTemplate.queryForList(sql); return jdbcTemplate.queryForList(sql);
} }
@Override
public boolean isBeginReview(Long film_id) {
return jdbcTemplate.queryForInt("select count(rr.id) from fc_review_record rr, fc_review r where rr.review_id = r.id and r.film_id = " + film_id) > 0;
}
} }
\ No newline at end of file
...@@ -23,6 +23,7 @@ import com.egolm.film.bean.Fc_member_film_show; ...@@ -23,6 +23,7 @@ import com.egolm.film.bean.Fc_member_film_show;
import com.egolm.film.bean.Fc_review; import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.model.Fc_member_film_base_model; import com.egolm.film.bean.model.Fc_member_film_base_model;
import com.egolm.film.config.WebMvcConfig; import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XRException;
import com.egolm.film.model.LoginToken; import com.egolm.film.model.LoginToken;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -161,6 +162,7 @@ public class FilmController { ...@@ -161,6 +162,7 @@ public class FilmController {
} }
@ResponseBody @ResponseBody
@Transactional
@PostMapping("save_film_base") @PostMapping("save_film_base")
@ApiOperation("保存电影主要信息") @ApiOperation("保存电影主要信息")
public Object update_base(Fc_member_film_base_model filmBase) { public Object update_base(Fc_member_film_base_model filmBase) {
...@@ -179,6 +181,14 @@ public class FilmController { ...@@ -179,6 +181,14 @@ public class FilmController {
} }
String create_ip = WebMvcConfig.getRemoteIp(); String create_ip = WebMvcConfig.getRemoteIp();
filmService.saveCreateBase(filmBase.getId(), admin_id, member_id, create_ip); filmService.saveCreateBase(filmBase.getId(), admin_id, member_id, create_ip);
} else {
boolean isBeginReview = reviewService.isBeginReview(filmBase.getId());
if(!isBeginReview) {
reviewService.rmReviewData(filmBase.getId());
reviewService.toFirstRound(filmBase.getId());
} else {
throw new XRException("影片已经进入审片流程,不能修改影片性质");
}
} }
filmService.initKeywords(filmBase.getId()); filmService.initKeywords(filmBase.getId());
return Rjx.jsonOk().set("id", filmBase.getId()); return Rjx.jsonOk().set("id", filmBase.getId());
......
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