Commit eb86ae0f authored by Quxl's avatar Quxl

x

parent 0f1461c1
......@@ -66,7 +66,7 @@ public interface ReviewService {
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);
......
......@@ -169,8 +169,8 @@ public class ReviewServiceImpl implements ReviewService {
}
@Override
public void saveDoubtful(Fc_review_doubtful doubtful) {
jdbcTemplate.save(doubtful);
public void saveDoubtfulList(List<Fc_review_doubtful> doubtfulList) {
jdbcTemplate.batchSave(doubtfulList);
}
@Override
......
......@@ -76,18 +76,20 @@ public class UserReviewController {
@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}"),
})
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();
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();
doubtful.setCreate_time(new Date());
doubtful.setDoubtful_text(doubtful_text);
doubtful.setDoubtful_type_id(doubtful_type_id);
doubtful.setDoubtful_text(text);
doubtful.setPlay_time(play_time);
doubtful.setReview_id(review_id);
doubtful.setUser_id(user_id);
service.saveDoubtful(doubtful);
return Rjx.jsonOk().setData(doubtful);
}
service.saveDoubtfulList(list);
return Rjx.jsonOk();
}
@ResponseBody
......
......@@ -27,11 +27,6 @@ public class Fc_review_doubtful implements java.io.Serializable {
*/
private Integer user_id;
/**
* 疑点类型
*/
private Integer doubtful_type_id;
/**
* 疑点介绍
*/
......@@ -57,16 +52,14 @@ public class Fc_review_doubtful implements java.io.Serializable {
* @param id
* @param review_id 影片ID
* @param user_id 评委ID
* @param doubtful_type_id 疑点类型
* @param doubtful_text 疑点介绍
* @param play_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.review_id = review_id;
this.user_id = user_id;
this.doubtful_type_id = doubtful_type_id;
this.doubtful_text = doubtful_text;
this.play_time = play_time;
this.create_time = create_time;
......@@ -96,14 +89,6 @@ public class Fc_review_doubtful implements java.io.Serializable {
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) {
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