@Test public void insertDatabaselist() throws Exception { List<DataBaseInfo> dataBaseInfoList = new ArrayList<>(); for (int i = 1; i < 3; i++) { DataBaseInfo alldbs = new DataBaseInfo(); alldbs.setComment("aa" + i); alldbs.setDal_group_id(1L); alldbs.setDb_user("omas" + i); alldbs.setDb_address("192.0.0.12" + i); alldbs.setDb_catalog("table" + i); alldbs.setDbname("name11" + i); alldbs.setDb_password("21212" + i); alldbs.setDb_port("1203" + i); alldbs.setDb_type(1); alldbs.setUpdateUserNo("0076"); dataBaseInfoList.add(alldbs); } int[] ins = dataBaseDao.insertDatabaselist(dataBaseInfoList); System.out.println("insertDatabaselist :-------> " + ins); Assert.assertTrue(ins.length > 0); }
public int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList) throws SQLException { if (CollectionUtils.isEmpty(dataBaseInfoList)) { return new int[0]; } return this.getDasClient().batchInsert(dataBaseInfoList); }
DataBaseDao extends BaseDao { public int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList) throws SQLException { if (CollectionUtils.isEmpty(dataBaseInfoList)) { return new int[0]; } return this.getDasClient().batchInsert(dataBaseInfoList); } }
DataBaseDao extends BaseDao { public int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList) throws SQLException { if (CollectionUtils.isEmpty(dataBaseInfoList)) { return new int[0]; } return this.getDasClient().batchInsert(dataBaseInfoList); }  }
DataBaseDao extends BaseDao { public int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList) throws SQLException { if (CollectionUtils.isEmpty(dataBaseInfoList)) { return new int[0]; } return this.getDasClient().batchInsert(dataBaseInfoList); }  Long insertDataBaseInfo(DataBaseInfo dataBaseInfo); int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList); int updateDataBaseInfo(DataBaseInfo dataBaseInfo); int updateDataBaseInfo(Long id, String dbname, String db_address, String db_port, String db_user,
                                  String db_password, String db_catalog, Integer db_type, String comment, String updateUserNo); int updateDataBaseInfo(Long id, Long groupId, String comment); int updateDataBaseInfo(Long id, String comment); int updateDataBaseInfo(Long id, Long groupId); int deleteDataBaseInfo(Long id); DataBaseInfo getDataBaseInfoByDbId(Long id); DataBaseInfo getDatabaseByName(String name); List<DataBaseInfo> getAllDbByProjectId(long projectId); List<DataBaseInfo> getAllDbByAppId(String appid); List<String> getAllDbAllinOneNames(); List<DataBaseInfo> getGroupDBsByGroup(Long groupId); Long getCountByName(String dbname); Long getCountByIdAndName(Long id, String dbname); List<DataBaseInfo> getAllDbsByDbNames(List<String> dbNames); List<DataBaseInfo> getAllDbsByIdss(List<Long> ids); DataBaseInfo getMasterCologByDatabaseSetId(Long dbset_id); Long getTotalCount(Paging<DataBaseInfo> paging); List<DataBaseView> findDbPageList(Paging<DataBaseInfo> paging); Long getTotalCountByUserId(Paging<DataBaseInfo> paging, Long userId); List<DataBaseView> findDbPageListByUserId(Paging<DataBaseInfo> paging, Long userId); List<DataBaseInfo> getDatabaseListByLikeName(String dbname); }
DataBaseDao extends BaseDao { public int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList) throws SQLException { if (CollectionUtils.isEmpty(dataBaseInfoList)) { return new int[0]; } return this.getDasClient().batchInsert(dataBaseInfoList); }  Long insertDataBaseInfo(DataBaseInfo dataBaseInfo); int[] insertDatabaselist(List<DataBaseInfo> dataBaseInfoList); int updateDataBaseInfo(DataBaseInfo dataBaseInfo); int updateDataBaseInfo(Long id, String dbname, String db_address, String db_port, String db_user,
                                  String db_password, String db_catalog, Integer db_type, String comment, String updateUserNo); int updateDataBaseInfo(Long id, Long groupId, String comment); int updateDataBaseInfo(Long id, String comment); int updateDataBaseInfo(Long id, Long groupId); int deleteDataBaseInfo(Long id); DataBaseInfo getDataBaseInfoByDbId(Long id); DataBaseInfo getDatabaseByName(String name); List<DataBaseInfo> getAllDbByProjectId(long projectId); List<DataBaseInfo> getAllDbByAppId(String appid); List<String> getAllDbAllinOneNames(); List<DataBaseInfo> getGroupDBsByGroup(Long groupId); Long getCountByName(String dbname); Long getCountByIdAndName(Long id, String dbname); List<DataBaseInfo> getAllDbsByDbNames(List<String> dbNames); List<DataBaseInfo> getAllDbsByIdss(List<Long> ids); DataBaseInfo getMasterCologByDatabaseSetId(Long dbset_id); Long getTotalCount(Paging<DataBaseInfo> paging); List<DataBaseView> findDbPageList(Paging<DataBaseInfo> paging); Long getTotalCountByUserId(Paging<DataBaseInfo> paging, Long userId); List<DataBaseView> findDbPageListByUserId(Paging<DataBaseInfo> paging, Long userId); List<DataBaseInfo> getDatabaseListByLikeName(String dbname);  }