1.批量查询
通过in查询
@Test
public void testBatchSelectByIds()
{
List<Integer> ids = Arrays.asList(5,7);
List<User> users = userMapper.selectBatchIds(ids);
log.info(users);
}
2.批量删除
@Test
public void testBatchDelete()
{
List<Integer> ids = Arrays.asList(2,1008613);
int i = userMapper.deleteBatchIds(ids);
log.info("受影响的行数",i);
}