Commit 3f52e3fb authored by Quxl's avatar Quxl

x

parent aad7910a
...@@ -534,14 +534,16 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -534,14 +534,16 @@ public class ReviewServiceImpl implements ReviewService {
@Transactional @Transactional
public void allotShowFilmUser(Integer review_id, Integer[] user_id) { public void allotShowFilmUser(Integer review_id, Integer[] user_id) {
this.jdbcTemplate.executeUpdate("delete from fc_user_film where review_id = ?", review_id); this.jdbcTemplate.executeUpdate("delete from fc_user_film where review_id = ?", review_id);
List<Fc_user_film> ufs = new ArrayList<Fc_user_film>(); if(user_id.length > 0) {
for(Integer uid : user_id) { List<Fc_user_film> ufs = new ArrayList<Fc_user_film>();
Fc_user_film uf = new Fc_user_film(); for(Integer uid : user_id) {
uf.setReview_id(review_id); Fc_user_film uf = new Fc_user_film();
uf.setUser_id(uid); uf.setReview_id(review_id);
ufs.add(uf); uf.setUser_id(uid);
ufs.add(uf);
}
this.jdbcTemplate.batchSave(ufs);
} }
this.jdbcTemplate.batchSave(ufs);
} }
@Override @Override
......
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