@Test public void batch() { User user = new User(); user.setName("xcrj1"); user.setAge(20); userService.save(user); //userService.saveOrUpdateBatch(userList); } 1. 2. 3. 4. 5. 6. 7. 8. 批量插入操作-saveBatch /*** * userService.saveBatch(userList, 2); * param2:默认...
User user = userMapper.selectById(1739970502337392641L); System.out.println(user); } //根据多个主键id批量查询结果的 @Test public void selectIds() { List<Long> list = Arrays.asList(1739970502337392641L, 1739983903621038082L, 1739984905459900417L); List<User> userList = userMapper.selectBatchIds(li...