UserProjectDao extends BaseDao { public int[] insertUserProjectList(List<UserProject> userProjects) throws SQLException { if (CollectionUtils.isEmpty(userProjects)) { return new int[0]; } return this.getDasClient().batchInsert(userProjects); }  Long insertUserProject(UserProject userProject); int[] insertUserProjectList(List<UserProject> userProjects); int updateUserProject(UserProject userProject); int deleteUserProjectByProjectId(Long project_id); int deleteByProjectAndUserIdS(Long projectId, Set<Long> userIds); List<UserProject> getUsersByProjectId(Long projectId); UserProject getMinUserProjectByProjectId(Long project_id);  }
@Test public void insertUserProjectList() throws Exception { List<UserProject> userProjects = new ArrayList<>(); for (Long i = 1L; i < 4; i++) { userProjects.add(UserProject.builder().projectId(1L).userId(i).build()); } int[] ids = userProjectDao.insertUserProjectList(userProjects); System.out.println("insertUserProjectList :-------> " + ids); Assert.assertTrue(ids.length > 0); }