Commit 3f52e3fb authored by Quxl's avatar Quxl

x

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