Commit 923aa379 authored by Quxl's avatar Quxl

x

parent b4fa2dfe
...@@ -77,14 +77,16 @@ public class AdminUserServiceImpl implements AdminUserService { ...@@ -77,14 +77,16 @@ public class AdminUserServiceImpl implements AdminUserService {
@Transactional @Transactional
public void saveGroupFuns(Integer group_id, Integer[] fun_id) { public void saveGroupFuns(Integer group_id, Integer[] fun_id) {
jdbcTemplate.executeUpdate("delete from fc_user_group_funs where group_id = ?", group_id); jdbcTemplate.executeUpdate("delete from fc_user_group_funs where group_id = ?", group_id);
List<Fc_user_group_funs> list = new ArrayList<Fc_user_group_funs>(); if(fun_id != null && fun_id.length > 0) {
for(Integer i : fun_id) { List<Fc_user_group_funs> list = new ArrayList<Fc_user_group_funs>();
Fc_user_group_funs gf = new Fc_user_group_funs(); for(Integer i : fun_id) {
gf.setGroup_id(group_id); Fc_user_group_funs gf = new Fc_user_group_funs();
gf.setFun_id(i); gf.setGroup_id(group_id);
list.add(gf); gf.setFun_id(i);
list.add(gf);
}
jdbcTemplate.batchSave(list);
} }
jdbcTemplate.batchSave(list);
} }
@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