DatabaseSetService { public ServiceResult deleteCheck(Long dbsetId) throws SQLException { if (deleteCheckDao.isDbsetIdInDatabasesetentry(dbsetId)) { return ServiceResult.fail("请先删除对应的逻辑库映射！"); } if (deleteCheckDao.isDbsetIdInProjectDbsetRelation(dbsetId)) { return ServiceResult.fail("请先删除项目关联的逻辑库！"); } if (deleteCheckDao.isDbsetIdInTaskSQL(dbsetId)) { return ServiceResult.fail("请先删除查询实体关联的逻辑库！"); } if (deleteCheckDao.isDbsetIdInTaskTable(dbsetId)) { return ServiceResult.fail("请先删除表实体关联的逻辑库！"); } return ServiceResult.success(); }  ValidatorChain validatePermision(LoginUser user, Errors errors); boolean insertDatabaseSet(DatabaseSet dbset); int updateDatabaseSet(DatabaseSet dbset); ServiceResult deleteCheck(Long dbsetId); boolean deleteDatabaseSet(Long dbsetId); ListResult<DatabaseSetView> findDbSetPageList(Paging<DatabaseSet> paging); List<DatabaseSet> getAllDatabaseSetByProjectId(Long projectId); List<DatabaseSet> getAllDatabaseSetByAppId(String appId); ListResult<DatabaseSetView> findDbSetPageListByAppid(Paging<DatabaseSet> paging); ServiceResult<String> addDataCenter(LoginUser user, DatabaseSet dbset); ServiceResult<String> updateDataCenter(LoginUser user, DatabaseSet newDbset); ServiceResult<String> deleteDataCenter(LoginUser user, DatabaseSet dbset); ServiceResult<String> syncDbSet(LoginUser user, DatabaseSet dbset); ConfigCkeckResult<List<ConfigDataResponse>> getCheckData(LoginUser user, DatabaseSet dbset); ServiceResult<String> getDbSetButton(LoginUser user); List<ConfigDataResponse> getAllCheckData(LoginUser user, Long gourpId, DatabaseSet dbset);  }
@Test public void deleteCheckTest() throws SQLException { Assert.assertTrue(databaseSetService.deleteCheck(1L).getCode() == ServiceResult.SUCCESS); }