Commit eb86ae0f authored by Quxl's avatar Quxl

x

parent 0f1461c1
...@@ -66,7 +66,7 @@ public interface ReviewService { ...@@ -66,7 +66,7 @@ public interface ReviewService {
Fc_review queryReview(Integer film_id, Integer enroll_type_id); Fc_review queryReview(Integer film_id, Integer enroll_type_id);
void saveDoubtful(Fc_review_doubtful doubtful); void saveDoubtfulList(List<Fc_review_doubtful> doubtfulList);
List<Map<String, Object>> queryDoubtfulListByFilmId(Integer film_id, Integer user_id); List<Map<String, Object>> queryDoubtfulListByFilmId(Integer film_id, Integer user_id);
......
...@@ -169,8 +169,8 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -169,8 +169,8 @@ public class ReviewServiceImpl implements ReviewService {
} }
@Override @Override
public void saveDoubtful(Fc_review_doubtful doubtful) { public void saveDoubtfulList(List<Fc_review_doubtful> doubtfulList) {
jdbcTemplate.save(doubtful); jdbcTemplate.batchSave(doubtfulList);
} }
@Override @Override
......
...@@ -76,18 +76,20 @@ public class UserReviewController { ...@@ -76,18 +76,20 @@ public class UserReviewController {
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "doubtful_text", value="疑点描述"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "doubtful_text", value="疑点描述"),
@ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "play_time", value="播放时间{yyyy-MM-dd HH:mm:ss}"), @ApiImplicitParam(paramType = "query", dataType = "date", required = false, name = "play_time", value="播放时间{yyyy-MM-dd HH:mm:ss}"),
}) })
public Object saveDoubtful(Integer review_id, Integer doubtful_type_id, String doubtful_text, @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")Date play_time) { public Object saveDoubtful(Integer review_id, String[] doubtful_text, @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")Date play_time) {
LoginToken token = tokenService.getToken(); LoginToken token = tokenService.getToken();
Integer user_id = (Integer)token.getId(); Integer user_id = (Integer)token.getId();
List<Fc_review_doubtful> list = new ArrayList<Fc_review_doubtful>();
for(String text : doubtful_text) {
Fc_review_doubtful doubtful = new Fc_review_doubtful(); Fc_review_doubtful doubtful = new Fc_review_doubtful();
doubtful.setCreate_time(new Date()); doubtful.setCreate_time(new Date());
doubtful.setDoubtful_text(doubtful_text); doubtful.setDoubtful_text(text);
doubtful.setDoubtful_type_id(doubtful_type_id);
doubtful.setPlay_time(play_time); doubtful.setPlay_time(play_time);
doubtful.setReview_id(review_id); doubtful.setReview_id(review_id);
doubtful.setUser_id(user_id); doubtful.setUser_id(user_id);
service.saveDoubtful(doubtful); }
return Rjx.jsonOk().setData(doubtful); service.saveDoubtfulList(list);
return Rjx.jsonOk();
} }
@ResponseBody @ResponseBody
......
...@@ -27,11 +27,6 @@ public class Fc_review_doubtful implements java.io.Serializable { ...@@ -27,11 +27,6 @@ public class Fc_review_doubtful implements java.io.Serializable {
*/ */
private Integer user_id; private Integer user_id;
/**
* 疑点类型
*/
private Integer doubtful_type_id;
/** /**
* 疑点介绍 * 疑点介绍
*/ */
...@@ -57,16 +52,14 @@ public class Fc_review_doubtful implements java.io.Serializable { ...@@ -57,16 +52,14 @@ public class Fc_review_doubtful implements java.io.Serializable {
* @param id * @param id
* @param review_id 影片ID * @param review_id 影片ID
* @param user_id 评委ID * @param user_id 评委ID
* @param doubtful_type_id 疑点类型
* @param doubtful_text 疑点介绍 * @param doubtful_text 疑点介绍
* @param play_time 疑点时间 * @param play_time 疑点时间
* @param create_time * @param create_time
*/ */
public Fc_review_doubtful(Integer id, Integer review_id, Integer user_id, Integer doubtful_type_id, String doubtful_text, Date play_time, Date create_time) { public Fc_review_doubtful(Integer id, Integer review_id, Integer user_id, String doubtful_text, Date play_time, Date create_time) {
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.doubtful_type_id = doubtful_type_id;
this.doubtful_text = doubtful_text; this.doubtful_text = doubtful_text;
this.play_time = play_time; this.play_time = play_time;
this.create_time = create_time; this.create_time = create_time;
...@@ -96,14 +89,6 @@ public class Fc_review_doubtful implements java.io.Serializable { ...@@ -96,14 +89,6 @@ public class Fc_review_doubtful implements java.io.Serializable {
return user_id; return user_id;
} }
public void setDoubtful_type_id(Integer doubtful_type_id) {
this.doubtful_type_id = doubtful_type_id;
}
public Integer getDoubtful_type_id() {
return doubtful_type_id;
}
public void setDoubtful_text(String doubtful_text) { public void setDoubtful_text(String doubtful_text) {
this.doubtful_text = doubtful_text; this.doubtful_text = doubtful_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