Springmvc+mybatis怎么批量删除

从数据库查出来的数据,通过foreach,将id遍历在checkbox中,现在怎么实现多选批量删除数据

将选中的id都传入到后台,delete from test where id in(......)

多选,传到后台
delete from tablename where id in (前台传来的ids)