class 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();
    }

}