Commit 028835df authored by Quxl's avatar Quxl

x

parent 36e16163
...@@ -7,6 +7,7 @@ import java.util.Map; ...@@ -7,6 +7,7 @@ import java.util.Map;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.bean.Fc_review; import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.Fc_review_doubtful; import com.egolm.film.bean.Fc_review_doubtful;
import com.egolm.film.bean.Fc_review_record;
public interface ReviewService { public interface ReviewService {
...@@ -20,4 +21,6 @@ public interface ReviewService { ...@@ -20,4 +21,6 @@ public interface ReviewService {
List<Map<String, Object>> queryDoubtfulListByFilmId(Integer film_id, Integer user_id); List<Map<String, Object>> queryDoubtfulListByFilmId(Integer film_id, Integer user_id);
void saveReviewRecord(Fc_review_record ru);
} }
\ No newline at end of file
...@@ -32,7 +32,7 @@ import com.egolm.film.bean.Fc_member_film_issuer; ...@@ -32,7 +32,7 @@ import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor; import com.egolm.film.bean.Fc_member_film_playactor;
import com.egolm.film.bean.Fc_member_film_show; 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.Fc_review_user; import com.egolm.film.bean.Fc_review_record;
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.XException; import com.egolm.film.config.XException;
...@@ -495,13 +495,13 @@ public class FilmServiceImpl implements FilmService { ...@@ -495,13 +495,13 @@ public class FilmServiceImpl implements FilmService {
@Transactional @Transactional
public void allot(Long member_film_id, Integer enroll_type_id, Integer review_round, Integer[] user_id) { public void allot(Long member_film_id, Integer enroll_type_id, Integer review_round, Integer[] user_id) {
Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ? and review_round = ?", Fc_review.class, member_film_id, enroll_type_id, review_round); Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ? and review_round = ?", Fc_review.class, member_film_id, enroll_type_id, review_round);
jdbcTemplate.executeUpdate("delete from fc_review_user where review_id = ?", review.getId());
review.setReview_state(1); review.setReview_state(1);
jdbcTemplate.update(review); jdbcTemplate.update(review);
jdbcTemplate.executeUpdate("delete from fc_review_record where review_id = ?", review.getId());
if(user_id != null && user_id.length > 0) { if(user_id != null && user_id.length > 0) {
List<Fc_review_user> list = new ArrayList<Fc_review_user>(); List<Fc_review_record> list = new ArrayList<Fc_review_record>();
for(Integer i : user_id) { for(Integer i : user_id) {
Fc_review_user ru = new Fc_review_user(); Fc_review_record ru = new Fc_review_record();
ru.setReview_id(review.getId()); ru.setReview_id(review.getId());
ru.setUser_id(i); ru.setUser_id(i);
ru.setView_state(0); ru.setView_state(0);
......
...@@ -14,6 +14,7 @@ import com.egolm.common.jdbc.Page; ...@@ -14,6 +14,7 @@ import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.ReviewService; import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_review; import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.Fc_review_doubtful; import com.egolm.film.bean.Fc_review_doubtful;
import com.egolm.film.bean.Fc_review_record;
import com.egolm.film.util.SqlWhere; import com.egolm.film.util.SqlWhere;
@Service @Service
...@@ -48,7 +49,7 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -48,7 +49,7 @@ public class ReviewServiceImpl implements ReviewService {
+ "ru.review_text_style, " + "ru.review_text_style, "
+ "ru.review_text_keynote " + "ru.review_text_keynote "
+ "from " + "from "
+ "fc_member_film mf, fc_review_round rr, fc_review r, fc_review_user ru " + "fc_member_film mf, fc_review_round rr, fc_review r, fc_review_record ru "
+ "where " + "where "
+ " mf.id = rr.film_id " + " mf.id = rr.film_id "
+ "and rr.film_id = r.film_id " + "and rr.film_id = r.film_id "
...@@ -81,5 +82,10 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -81,5 +82,10 @@ public class ReviewServiceImpl implements ReviewService {
return jdbcTemplate.queryForList(sql, film_id, user_id); return jdbcTemplate.queryForList(sql, film_id, user_id);
} }
@Override
public void saveReviewRecord(Fc_review_record ru) {
jdbcTemplate.save(ru);
}
} }
...@@ -7,6 +7,7 @@ import java.util.Map; ...@@ -7,6 +7,7 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
...@@ -17,6 +18,7 @@ import com.egolm.film.api.service.FilmService; ...@@ -17,6 +18,7 @@ import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.ReviewService; import com.egolm.film.api.service.ReviewService;
import com.egolm.film.api.service.UserTokenService; import com.egolm.film.api.service.UserTokenService;
import com.egolm.film.bean.Fc_review_doubtful; import com.egolm.film.bean.Fc_review_doubtful;
import com.egolm.film.bean.Fc_review_record;
import com.egolm.film.model.LoginToken; import com.egolm.film.model.LoginToken;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -98,26 +100,40 @@ public class UserReviewController { ...@@ -98,26 +100,40 @@ public class UserReviewController {
} }
@ResponseBody @ResponseBody
@PostMapping("doubtful_save") @Transactional
@ApiOperation("保存疑点记录") @PostMapping("user_review")
@ApiOperation("评委审片")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "review_id", value="审片ID"), @ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "review_id", value="审片ID"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "enroll_type_id", value="申报奖项ID"), @ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "review_state", value="审片结论(2通过,3否决,4参赛,5参赛备选,6参展)"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "doubtful_type_id", value="疑点类型ID"), @ApiImplicitParam(paramType = "query", dataType = "double", required = false, name = "review_score", value="评分"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "doubtful_text", value="疑点描述"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "review_text", value="评语"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "play_time", value="播放时间{yyyy-MM-dd HH:mm:ss}"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "review_text_1", value="评语1"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "review_text_2", value="评语2"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "review_text_3", value="评语3"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "review_text_4", value="评语4"),
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, allowMultiple=true, name = "enroll_ext_id", value="才赛奖项ID"),
@ApiImplicitParam(paramType = "query", dataType = "double", required = false, allowMultiple=true, name = "enroll_ext_score", value="才赛奖项得分"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, allowMultiple=true, name = "enroll_ext_text", value="才赛奖项评语"),
}) })
public Object saveReviewRecord(Integer review_id, Integer doubtful_type_id, String doubtful_text, @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")Date play_time) { public Object saveReviewRecord(Integer review_id, Integer review_state, Double review_score, String review_text, String review_text_1, String review_text_2, String review_text_3, String review_text_4, Integer[] enroll_ext_id, Double[]enroll_ext_score, String[] enroll_ext_text) {
LoginToken token = tokenService.getToken(); LoginToken token = tokenService.getToken();
Integer user_id = (Integer)token.getId(); Integer user_id = (Integer)token.getId();
Fc_review_doubtful doubtful = new Fc_review_doubtful(); Fc_review_record ru = new Fc_review_record();
doubtful.setCreate_time(new Date()); ru.setReview_id(review_id);
doubtful.setDoubtful_text(doubtful_text); ru.setUser_id(user_id);
doubtful.setDoubtful_type_id(doubtful_type_id); ru.setReview_score(review_score);
doubtful.setPlay_time(play_time); ru.setReview_state(review_state);
doubtful.setReview_id(review_id); ru.setReview_text(review_text_4);
doubtful.setUser_id(user_id); ru.setReview_text_1(review_text_1);
service.saveDoubtful(doubtful); ru.setReview_text_2(review_text_2);
return Rjx.jsonOk().setData(doubtful); ru.setReview_text_3(review_text_3);
ru.setReview_text_4(review_text_4);
service.saveReviewRecord(ru);
return Rjx.jsonOk();
} }
} }
...@@ -7,8 +7,8 @@ import javax.persistence.Id; ...@@ -7,8 +7,8 @@ import javax.persistence.Id;
/** /**
* @author 曲欣亮 * @author 曲欣亮
*/ */
@Entity(name="fc_review_user") @Entity(name="fc_review_record")
public class Fc_review_user implements java.io.Serializable { public class Fc_review_record implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -48,31 +48,19 @@ public class Fc_review_user implements java.io.Serializable { ...@@ -48,31 +48,19 @@ public class Fc_review_user implements java.io.Serializable {
*/ */
private String review_text; private String review_text;
/** private String review_text_1;
* 影片概述
*/
private String review_text_summary;
/** private String review_text_2;
* 叙事/题材
*/
private String review_text_theme;
/** private String review_text_3;
* 风格/美学
*/
private String review_text_style;
/** private String review_text_4;
* 突出/优缺点
*/
private String review_text_keynote;
/** /**
* 无参数构造方法 * 无参数构造方法
*/ */
public Fc_review_user () { public Fc_review_record () {
super(); super();
} }
...@@ -85,12 +73,12 @@ public class Fc_review_user implements java.io.Serializable { ...@@ -85,12 +73,12 @@ public class Fc_review_user implements java.io.Serializable {
* @param review_state 2通过,3否决,4参赛,5参赛备选,6参展 * @param review_state 2通过,3否决,4参赛,5参赛备选,6参展
* @param review_score 得分分数 * @param review_score 得分分数
* @param review_text 影片评论 * @param review_text 影片评论
* @param review_text_summary 影片概述 * @param review_text_1
* @param review_text_theme 叙事/题材 * @param review_text_2
* @param review_text_style 风格/美学 * @param review_text_3
* @param review_text_keynote 突出/优缺点 * @param review_text_4
*/ */
public Fc_review_user(Integer id, Integer review_id, Integer user_id, Integer view_state, Integer review_state, Double review_score, String review_text, String review_text_summary, String review_text_theme, String review_text_style, String review_text_keynote) { public Fc_review_record(Integer id, Integer review_id, Integer user_id, Integer view_state, Integer review_state, Double review_score, String review_text, String review_text_1, String review_text_2, String review_text_3, String review_text_4) {
this.id = id; this.id = id;
this.review_id = review_id; this.review_id = review_id;
this.user_id = user_id; this.user_id = user_id;
...@@ -98,10 +86,10 @@ public class Fc_review_user implements java.io.Serializable { ...@@ -98,10 +86,10 @@ public class Fc_review_user implements java.io.Serializable {
this.review_state = review_state; this.review_state = review_state;
this.review_score = review_score; this.review_score = review_score;
this.review_text = review_text; this.review_text = review_text;
this.review_text_summary = review_text_summary; this.review_text_1 = review_text_1;
this.review_text_theme = review_text_theme; this.review_text_2 = review_text_2;
this.review_text_style = review_text_style; this.review_text_3 = review_text_3;
this.review_text_keynote = review_text_keynote; this.review_text_4 = review_text_4;
} }
public void setId(Integer id) { public void setId(Integer id) {
...@@ -160,36 +148,36 @@ public class Fc_review_user implements java.io.Serializable { ...@@ -160,36 +148,36 @@ public class Fc_review_user implements java.io.Serializable {
return review_text; return review_text;
} }
public void setReview_text_summary(String review_text_summary) { public void setReview_text_1(String review_text_1) {
this.review_text_summary = review_text_summary; this.review_text_1 = review_text_1;
} }
public String getReview_text_summary() { public String getReview_text_1() {
return review_text_summary; return review_text_1;
} }
public void setReview_text_theme(String review_text_theme) { public void setReview_text_2(String review_text_2) {
this.review_text_theme = review_text_theme; this.review_text_2 = review_text_2;
} }
public String getReview_text_theme() { public String getReview_text_2() {
return review_text_theme; return review_text_2;
} }
public void setReview_text_style(String review_text_style) { public void setReview_text_3(String review_text_3) {
this.review_text_style = review_text_style; this.review_text_3 = review_text_3;
} }
public String getReview_text_style() { public String getReview_text_3() {
return review_text_style; return review_text_3;
} }
public void setReview_text_keynote(String review_text_keynote) { public void setReview_text_4(String review_text_4) {
this.review_text_keynote = review_text_keynote; this.review_text_4 = review_text_4;
} }
public String getReview_text_keynote() { public String getReview_text_4() {
return review_text_keynote; return review_text_4;
} }
} }
......
...@@ -7,8 +7,8 @@ import javax.persistence.Id; ...@@ -7,8 +7,8 @@ import javax.persistence.Id;
/** /**
* @author 曲欣亮 * @author 曲欣亮
*/ */
@Entity(name="fc_review_user_ext") @Entity(name="fc_review_record_ext")
public class Fc_review_user_ext implements java.io.Serializable { public class Fc_review_record_ext implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -43,13 +43,13 @@ public class Fc_review_user_ext implements java.io.Serializable { ...@@ -43,13 +43,13 @@ public class Fc_review_user_ext implements java.io.Serializable {
/** /**
* 评委审片结论 * 评委审片结论
*/ */
private String review_text; private String enroll_ext_text;
/** /**
* 无参数构造方法 * 无参数构造方法
*/ */
public Fc_review_user_ext () { public Fc_review_record_ext () {
super(); super();
} }
...@@ -60,15 +60,15 @@ public class Fc_review_user_ext implements java.io.Serializable { ...@@ -60,15 +60,15 @@ public class Fc_review_user_ext implements java.io.Serializable {
* @param user_id 评委ID * @param user_id 评委ID
* @param enroll_ext_id 影片申报奖项ID * @param enroll_ext_id 影片申报奖项ID
* @param enroll_ext_score 影片申报奖项评分 * @param enroll_ext_score 影片申报奖项评分
* @param review_text 评委审片结论 * @param enroll_ext_text 评委审片结论
*/ */
public Fc_review_user_ext(Integer id, Integer review_id, Integer user_id, Integer enroll_ext_id, Double enroll_ext_score, String review_text) { public Fc_review_record_ext(Integer id, Integer review_id, Integer user_id, Integer enroll_ext_id, Double enroll_ext_score, String enroll_ext_text) {
this.id = id; this.id = id;
this.review_id = review_id; this.review_id = review_id;
this.user_id = user_id; this.user_id = user_id;
this.enroll_ext_id = enroll_ext_id; this.enroll_ext_id = enroll_ext_id;
this.enroll_ext_score = enroll_ext_score; this.enroll_ext_score = enroll_ext_score;
this.review_text = review_text; this.enroll_ext_text = enroll_ext_text;
} }
public void setId(Integer id) { public void setId(Integer id) {
...@@ -111,12 +111,12 @@ public class Fc_review_user_ext implements java.io.Serializable { ...@@ -111,12 +111,12 @@ public class Fc_review_user_ext implements java.io.Serializable {
return enroll_ext_score; return enroll_ext_score;
} }
public void setReview_text(String review_text) { public void setEnroll_ext_text(String enroll_ext_text) {
this.review_text = review_text; this.enroll_ext_text = enroll_ext_text;
} }
public String getReview_text() { public String getEnroll_ext_text() {
return review_text; return enroll_ext_text;
} }
} }
......
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