Commit 90f4352e authored by Quxl's avatar Quxl

修改组权限

parent 36d396f8
...@@ -14,6 +14,7 @@ import com.egolm.common.jdbc.Page; ...@@ -14,6 +14,7 @@ import com.egolm.common.jdbc.Page;
import com.egolm.film.api.admin.service.AdminAuthService; import com.egolm.film.api.admin.service.AdminAuthService;
import com.egolm.film.bean.Fc_admin; import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_admin_group; import com.egolm.film.bean.Fc_admin_group;
import com.egolm.film.bean.Fc_admin_group_menu;
import com.egolm.film.config.WebMvcConfig; import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.util.SqlWhere; import com.egolm.film.util.SqlWhere;
...@@ -90,9 +91,16 @@ public class AdminAuthServiceImpl implements AdminAuthService { ...@@ -90,9 +91,16 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override @Override
@Transactional @Transactional
public void updateGroupAuth(Integer group_id, Integer[] menu_id) { public void updateGroupAuth(Integer group_id, Integer[] ids) {
String sql = "delete from fc_admin_group_menu where group_id = ?"; String sql = "delete from fc_admin_group_menu where group_id = ?";
jdbcTemplate.executeUpdate(sql, group_id); jdbcTemplate.executeUpdate(sql, group_id);
List<Fc_admin_group_menu> agmList = new ArrayList<Fc_admin_group_menu>();
for(Integer menu_id : ids) {
Fc_admin_group_menu agm = new Fc_admin_group_menu();
agm.setGroup_id(group_id);
agm.setMenu_id(menu_id);
}
jdbcTemplate.batchSave(agmList);
} }
......
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