修改包名为 org.dromara
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</developers>
|
||||
|
||||
<parent>
|
||||
<groupId>com.zyplayer</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>zyplayer-doc</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
@@ -36,11 +36,11 @@
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zyplayer</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>zyplayer-doc-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zyplayer</groupId>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>zyplayer-doc-data</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbDatasource;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
|
||||
import com.zyplayer.doc.data.service.manage.DbDatasourceService;
|
||||
import com.zyplayer.doc.db.controller.vo.DatabaseExportVo;
|
||||
import com.zyplayer.doc.db.controller.vo.TableColumnVo;
|
||||
import com.zyplayer.doc.db.controller.vo.TableColumnVo.TableInfoVo;
|
||||
import com.zyplayer.doc.db.controller.vo.TableDdlVo;
|
||||
import com.zyplayer.doc.db.controller.vo.TableStatusVo;
|
||||
import com.zyplayer.doc.db.framework.consts.DbAuthType;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import com.zyplayer.doc.db.framework.db.dto.*;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import com.zyplayer.doc.db.framework.utils.PoiUtil;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbDatasource;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocAuthConst;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysModuleType;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysType;
|
||||
import org.dromara.zyplayer.data.service.manage.DbDatasourceService;
|
||||
import org.dromara.zyplayer.db.controller.vo.DatabaseExportVo;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableColumnVo;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableColumnVo.TableInfoVo;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableDdlVo;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableStatusVo;
|
||||
import org.dromara.zyplayer.db.framework.consts.DbAuthType;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.*;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.db.framework.utils.PoiUtil;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||
import com.zyplayer.doc.core.json.ResponseJson;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.AuthInfo;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.UserAuth;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.UserInfo;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
|
||||
import com.zyplayer.doc.data.service.manage.AuthInfoService;
|
||||
import com.zyplayer.doc.data.service.manage.UserAuthService;
|
||||
import com.zyplayer.doc.data.service.manage.UserInfoService;
|
||||
import com.zyplayer.doc.db.controller.vo.UserDbAuthVo;
|
||||
import com.zyplayer.doc.db.framework.consts.DbAuthType;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.core.json.DocResponseJson;
|
||||
import org.dromara.zyplayer.core.json.ResponseJson;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.AuthInfo;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.UserAuth;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.UserInfo;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocAuthConst;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysModuleType;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysType;
|
||||
import org.dromara.zyplayer.data.service.manage.AuthInfoService;
|
||||
import org.dromara.zyplayer.data.service.manage.UserAuthService;
|
||||
import org.dromara.zyplayer.data.service.manage.UserInfoService;
|
||||
import org.dromara.zyplayer.db.controller.vo.UserDbAuthVo;
|
||||
import org.dromara.zyplayer.db.framework.consts.DbAuthType;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson.util.TypeUtils;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.db.controller.download.FormatDownloadConst;
|
||||
import com.zyplayer.doc.db.controller.download.FormatDownloadService;
|
||||
import com.zyplayer.doc.db.controller.param.DataViewParam;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteParam;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteResult;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteType;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.SqlExecutor;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import com.zyplayer.doc.db.framework.utils.JSONUtil;
|
||||
import com.zyplayer.doc.db.service.common.ExecuteAuthService;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.db.controller.download.FormatDownloadConst;
|
||||
import org.dromara.zyplayer.db.controller.download.FormatDownloadService;
|
||||
import org.dromara.zyplayer.db.controller.param.DataViewParam;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteParam;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteResult;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteType;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.SqlExecutor;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.db.framework.utils.JSONUtil;
|
||||
import org.dromara.zyplayer.db.service.common.ExecuteAuthService;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -1,19 +1,19 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbDatasource;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.service.manage.DbDatasourceService;
|
||||
import com.zyplayer.doc.db.framework.configuration.DatasourceUtil;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbDatasource;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocAuthConst;
|
||||
import org.dromara.zyplayer.data.service.manage.DbDatasourceService;
|
||||
import org.dromara.zyplayer.db.framework.configuration.DatasourceUtil;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
@@ -1,24 +1,24 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbProcLog;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
|
||||
import com.zyplayer.doc.data.service.manage.DbProcLogService;
|
||||
import com.zyplayer.doc.db.controller.param.ProcedureListParam;
|
||||
import com.zyplayer.doc.db.framework.consts.DbAuthType;
|
||||
import com.zyplayer.doc.db.framework.db.dto.ProcedureDto;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteResult;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbProcLog;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocAuthConst;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysModuleType;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysType;
|
||||
import org.dromara.zyplayer.data.service.manage.DbProcLogService;
|
||||
import org.dromara.zyplayer.db.controller.param.ProcedureListParam;
|
||||
import org.dromara.zyplayer.db.framework.consts.DbAuthType;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.ProcedureDto;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteResult;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
@@ -9,23 +9,26 @@ import com.alibaba.druid.sql.ast.statement.SQLSelectStatement;
|
||||
import com.alibaba.druid.sql.parser.SQLStatementParser;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbFavorite;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbHistory;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
|
||||
import com.zyplayer.doc.data.service.manage.DbFavoriteService;
|
||||
import com.zyplayer.doc.data.service.manage.DbHistoryService;
|
||||
import com.zyplayer.doc.db.framework.consts.DbAuthType;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.*;
|
||||
import com.zyplayer.doc.db.framework.db.transfer.SqlParseUtil;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import com.zyplayer.doc.db.framework.utils.SQLTransformUtils;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbFavorite;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbHistory;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocAuthConst;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysModuleType;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysType;
|
||||
import org.dromara.zyplayer.data.service.manage.DbFavoriteService;
|
||||
import org.dromara.zyplayer.data.service.manage.DbHistoryService;
|
||||
import org.dromara.zyplayer.db.framework.consts.DbAuthType;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ColumnExecuteResult;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ColumnSqlExecutor;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteParam;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteType;
|
||||
import org.dromara.zyplayer.db.framework.db.transfer.SqlParseUtil;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.db.framework.utils.SQLTransformUtils;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbTableRelation;
|
||||
import com.zyplayer.doc.data.repository.manage.param.TableRelationParam;
|
||||
import com.zyplayer.doc.data.repository.manage.vo.TableRelationVo;
|
||||
import com.zyplayer.doc.data.service.manage.DbTableRelationService;
|
||||
import com.zyplayer.doc.db.controller.vo.TableColumnVo;
|
||||
import com.zyplayer.doc.db.framework.consts.DbAuthType;
|
||||
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbTableRelation;
|
||||
import org.dromara.zyplayer.data.repository.manage.param.TableRelationParam;
|
||||
import org.dromara.zyplayer.data.repository.manage.vo.TableRelationVo;
|
||||
import org.dromara.zyplayer.data.service.manage.DbTableRelationService;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableColumnVo;
|
||||
import org.dromara.zyplayer.db.framework.consts.DbAuthType;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.zyplayer.doc.db.controller;
|
||||
package org.dromara.zyplayer.db.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbTransferTask;
|
||||
import com.zyplayer.doc.data.service.manage.DbTransferTaskService;
|
||||
import com.zyplayer.doc.db.framework.db.transfer.SqlParseUtil;
|
||||
import com.zyplayer.doc.db.framework.db.transfer.TransferDataServer;
|
||||
import com.zyplayer.doc.db.framework.json.DocDbResponseJson;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbTransferTask;
|
||||
import org.dromara.zyplayer.data.service.manage.DbTransferTaskService;
|
||||
import org.dromara.zyplayer.db.framework.db.transfer.SqlParseUtil;
|
||||
import org.dromara.zyplayer.db.framework.db.transfer.TransferDataServer;
|
||||
import org.dromara.zyplayer.db.framework.json.DocDbResponseJson;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -1,21 +1,21 @@
|
||||
package com.zyplayer.doc.db.controller.download;
|
||||
package org.dromara.zyplayer.db.controller.download;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.core.util.ZyplayerDocVersion;
|
||||
import com.zyplayer.doc.db.controller.param.DataViewParam;
|
||||
import com.zyplayer.doc.db.controller.vo.TableColumnVo;
|
||||
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteParam;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteType;
|
||||
import com.zyplayer.doc.db.service.common.ExecuteAuthService;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import com.zyplayer.doc.db.service.download.BaseDownloadService;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.core.util.ZyplayerDocVersion;
|
||||
import org.dromara.zyplayer.db.controller.param.DataViewParam;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableColumnVo;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteParam;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteType;
|
||||
import org.dromara.zyplayer.db.service.common.ExecuteAuthService;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.db.service.download.BaseDownloadService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.download;
|
||||
package org.dromara.zyplayer.db.controller.download;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
@@ -8,18 +8,18 @@ import com.alibaba.excel.ExcelWriter;
|
||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zyplayer.doc.db.controller.param.DataViewParam;
|
||||
import com.zyplayer.doc.db.controller.vo.TableColumnVo;
|
||||
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteParam;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteResult;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteType;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.SqlExecutor;
|
||||
import com.zyplayer.doc.db.framework.utils.SQLTransformUtils;
|
||||
import com.zyplayer.doc.db.service.common.ExecuteAuthService;
|
||||
import com.zyplayer.doc.db.service.database.DatabaseServiceFactory;
|
||||
import com.zyplayer.doc.db.service.database.DbBaseService;
|
||||
import com.zyplayer.doc.db.service.download.BaseDownloadService;
|
||||
import org.dromara.zyplayer.db.controller.param.DataViewParam;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableColumnVo;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteParam;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteResult;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteType;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.SqlExecutor;
|
||||
import org.dromara.zyplayer.db.framework.utils.SQLTransformUtils;
|
||||
import org.dromara.zyplayer.db.service.common.ExecuteAuthService;
|
||||
import org.dromara.zyplayer.db.service.database.DatabaseServiceFactory;
|
||||
import org.dromara.zyplayer.db.service.database.DbBaseService;
|
||||
import org.dromara.zyplayer.db.service.download.BaseDownloadService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.download;
|
||||
package org.dromara.zyplayer.db.controller.download;
|
||||
|
||||
/**
|
||||
* 下载类型枚举
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.download;
|
||||
package org.dromara.zyplayer.db.controller.download;
|
||||
|
||||
/**
|
||||
* 下载类型枚举
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.controller.download;
|
||||
package org.dromara.zyplayer.db.controller.download;
|
||||
|
||||
import com.zyplayer.doc.db.controller.param.DataViewParam;
|
||||
import org.dromara.zyplayer.db.controller.param.DataViewParam;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.param;
|
||||
package org.dromara.zyplayer.db.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.param;
|
||||
package org.dromara.zyplayer.db.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.param;
|
||||
package org.dromara.zyplayer.db.controller.param;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
package com.zyplayer.doc.db.controller.vo;
|
||||
|
||||
import com.zyplayer.doc.db.controller.vo.TableColumnVo.TableInfoVo;
|
||||
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 数据库表导出
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class DatabaseExportVo {
|
||||
|
||||
// 表字段注释信息列表
|
||||
private Map<String, List<TableColumnDescDto>> columnList;
|
||||
|
||||
// 数据库表列表
|
||||
private List<TableInfoVo> tableList;
|
||||
|
||||
}
|
||||
package org.dromara.zyplayer.db.controller.vo;
|
||||
|
||||
import org.dromara.zyplayer.db.controller.vo.TableColumnVo.TableInfoVo;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 数据库表导出
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class DatabaseExportVo {
|
||||
|
||||
// 表字段注释信息列表
|
||||
private Map<String, List<TableColumnDescDto>> columnList;
|
||||
|
||||
// 数据库表列表
|
||||
private List<TableInfoVo> tableList;
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zyplayer.doc.db.controller.vo;
|
||||
package org.dromara.zyplayer.db.controller.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.controller.vo;
|
||||
package org.dromara.zyplayer.db.controller.vo;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.vo;
|
||||
package org.dromara.zyplayer.db.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.controller.vo;
|
||||
package org.dromara.zyplayer.db.controller.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.configuration;
|
||||
package org.dromara.zyplayer.db.framework.configuration;
|
||||
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.zyplayer.doc.db.framework.configuration;
|
||||
package org.dromara.zyplayer.db.framework.configuration;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbDatasource;
|
||||
import com.zyplayer.doc.data.utils.DruidDataSourceUtil;
|
||||
import com.zyplayer.doc.db.framework.configuration.analysis.*;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import com.zyplayer.doc.db.framework.db.interceptor.SqlLogInterceptor;
|
||||
import org.apache.ibatis.plugin.Interceptor;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbDatasource;
|
||||
import org.dromara.zyplayer.data.utils.DruidDataSourceUtil;
|
||||
import org.dromara.zyplayer.db.framework.configuration.analysis.*;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.interceptor.SqlLogInterceptor;
|
||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.springframework.core.io.Resource;
|
||||
@@ -1,22 +1,22 @@
|
||||
package com.zyplayer.doc.db.framework.configuration;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 开启db模块的注解
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {
|
||||
"com.zyplayer.doc.db",
|
||||
})
|
||||
public @interface EnableDocDb {
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.configuration;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 开启db模块的注解
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {
|
||||
"org.dromara.zyplayer.db",
|
||||
})
|
||||
public @interface EnableDocDb {
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
/**
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.analysis;
|
||||
package org.dromara.zyplayer.db.framework.configuration.analysis;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.configuration.async;
|
||||
package org.dromara.zyplayer.db.framework.configuration.async;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.consts;
|
||||
package org.dromara.zyplayer.db.framework.consts;
|
||||
|
||||
/**
|
||||
* 数据库授权前缀
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.db.bean;
|
||||
package org.dromara.zyplayer.db.framework.db.bean;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.zyplayer.doc.db.framework.db.enums.DatabaseProductEnum;
|
||||
import org.dromara.zyplayer.db.framework.db.enums.DatabaseProductEnum;
|
||||
import lombok.Data;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zyplayer.doc.db.framework.db.bean;
|
||||
package org.dromara.zyplayer.db.framework.db.bean;
|
||||
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbDatasource;
|
||||
import com.zyplayer.doc.data.service.manage.DbDatasourceService;
|
||||
import com.zyplayer.doc.db.framework.configuration.DatasourceUtil;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbDatasource;
|
||||
import org.dromara.zyplayer.data.service.manage.DbDatasourceService;
|
||||
import org.dromara.zyplayer.db.framework.configuration.DatasourceUtil;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.bean;
|
||||
package org.dromara.zyplayer.db.framework.db.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 字段信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class ColumnInfoDto {
|
||||
private String isNullable;
|
||||
private String columnType;
|
||||
private String columnDefault;
|
||||
private String extra;
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 字段信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class ColumnInfoDto {
|
||||
private String isNullable;
|
||||
private String columnType;
|
||||
private String columnDefault;
|
||||
private String extra;
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 数据库信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class DatabaseInfoDto {
|
||||
private String dbName;
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 数据库信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class DatabaseInfoDto {
|
||||
private String dbName;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 表字段注释信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class QueryTableColumnDescDto {
|
||||
private String tableName;
|
||||
private String columnName;
|
||||
private String description;
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 表字段注释信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class QueryTableColumnDescDto {
|
||||
private String tableName;
|
||||
private String columnName;
|
||||
private String description;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 表注释信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class TableDescDto {
|
||||
private String tableName;
|
||||
private String description;
|
||||
private String majorId;
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 表注释信息
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018-11-27
|
||||
*/
|
||||
@Data
|
||||
public class TableDescDto {
|
||||
private String tableName;
|
||||
private String description;
|
||||
private String majorId;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.dto;
|
||||
package org.dromara.zyplayer.db.framework.db.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.enums;
|
||||
package org.dromara.zyplayer.db.framework.db.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.enums;
|
||||
package org.dromara.zyplayer.db.framework.db.enums;
|
||||
|
||||
/**
|
||||
* 数据库类型枚举
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.interceptor;
|
||||
package org.dromara.zyplayer.db.framework.db.interceptor;
|
||||
|
||||
import org.apache.ibatis.cache.CacheKey;
|
||||
import org.apache.ibatis.executor.Executor;
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.zyplayer.doc.db.framework.db.job;
|
||||
package org.dromara.zyplayer.db.framework.db.job;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.BackupLog;
|
||||
import com.zyplayer.doc.db.framework.db.vo.BackupJobVO;
|
||||
import com.zyplayer.doc.db.framework.utils.DatabaseBackupUtils;
|
||||
import com.zyplayer.doc.db.framework.utils.QuartzManagerUtils;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.BackupLog;
|
||||
import org.dromara.zyplayer.db.framework.db.vo.BackupJobVO;
|
||||
import org.dromara.zyplayer.db.framework.utils.DatabaseBackupUtils;
|
||||
import org.dromara.zyplayer.db.framework.utils.QuartzManagerUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zyplayer.doc.db.controller.param.ProcedureListParam;
|
||||
import com.zyplayer.doc.db.controller.vo.TableStatusVo;
|
||||
import com.zyplayer.doc.db.framework.db.dto.*;
|
||||
import org.dromara.zyplayer.db.controller.param.ProcedureListParam;
|
||||
import org.dromara.zyplayer.db.controller.vo.TableStatusVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.alibaba.druid.pool.DruidPooledConnection;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import com.zyplayer.doc.db.framework.sse.service.DbSseEmitterService;
|
||||
import com.zyplayer.doc.db.framework.sse.util.DbSseCacheUtil;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import org.dromara.zyplayer.db.framework.sse.service.DbSseEmitterService;
|
||||
import org.dromara.zyplayer.db.framework.sse.util.DbSseCacheUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.mapping.ParameterMapping;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.mapping.ParameterMapping;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
/**
|
||||
* 执行类型
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.base;
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.alibaba.druid.pool.DruidPooledConnection;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.mapping.ParameterMapping;
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper">
|
||||
|
||||
<resultMap id="TableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto" >
|
||||
<resultMap id="TableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto" >
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="COLUMN_NAME" property="name" jdbcType="VARCHAR" />
|
||||
<result column="DATA_TYPE" property="type" jdbcType="VARCHAR" />
|
||||
@@ -10,18 +10,18 @@
|
||||
<result column="COMMENTS" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="COLUMN_NAME" property="columnName" jdbcType="VARCHAR" />
|
||||
<result column="COMMENTS" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 获取用户列表 -->
|
||||
<select id="getDatabaseList" resultType="com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto">
|
||||
<select id="getDatabaseList" resultType="org.dromara.zyplayer.db.framework.db.dto.DatabaseInfoDto">
|
||||
select USERNAME dbName from all_users
|
||||
</select>
|
||||
|
||||
<select id="getTableStatus" resultType="com.zyplayer.doc.db.controller.vo.TableStatusVo">
|
||||
<select id="getTableStatus" resultType="org.dromara.zyplayer.db.controller.vo.TableStatusVo">
|
||||
select dt.TABLE_NAME as name,
|
||||
dt.NUM_ROWS as "rows",
|
||||
dt.AVG_ROW_LEN as avgRowLength,
|
||||
@@ -35,7 +35,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 获取表列表 -->
|
||||
<select id="getTableList" resultType="com.zyplayer.doc.db.framework.db.dto.TableInfoDto">
|
||||
<select id="getTableList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableInfoDto">
|
||||
select t.OWNER as dbName,t.TABLE_NAME as tableName,c.COMMENTS as tableComment from all_tables t
|
||||
left join all_tab_comments c on t.TABLE_NAME = c.TABLE_NAME and t.OWNER = c.OWNER
|
||||
<where>
|
||||
@@ -72,7 +72,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 条件查询表 -->
|
||||
<select id="getTableDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableDescDto">
|
||||
<select id="getTableDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableDescDto">
|
||||
select t.OWNER,t.TABLE_NAME as tableName,c.COMMENTS as description
|
||||
from all_tables t
|
||||
left join all_tab_comments c on t.TABLE_NAME = c.TABLE_NAME and t.owner = c.owner
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.dm;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.dm;
|
||||
|
||||
/**
|
||||
* 达梦数据库的mapper持有对象
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper">
|
||||
|
||||
<resultMap id="TableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto" >
|
||||
<resultMap id="TableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto" >
|
||||
<result column="name" property="name" jdbcType="VARCHAR" />
|
||||
<result column="col_name" property="name" jdbcType="VARCHAR" />
|
||||
<result column="data_type" property="type" jdbcType="VARCHAR" />
|
||||
<result column="comment" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="COLUMN_NAME" property="columnName" jdbcType="VARCHAR" />
|
||||
<result column="DESCRIPTION" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="TableStatusDtoMap" type="com.zyplayer.doc.db.controller.vo.TableStatusVo">
|
||||
<resultMap id="TableStatusDtoMap" type="org.dromara.zyplayer.db.controller.vo.TableStatusVo">
|
||||
<result column="Name" property="name"/>
|
||||
<result column="Engine" property="engine"/>
|
||||
<result column="Version" property="version"/>
|
||||
@@ -36,7 +36,7 @@
|
||||
<result column="Comment" property="comment"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="DatabasesDtoMap" type="com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto" >
|
||||
<resultMap id="DatabasesDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.DatabaseInfoDto" >
|
||||
<result column="name" property="dbName" jdbcType="VARCHAR" />
|
||||
<result column="database_name" property="dbName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
@@ -49,7 +49,7 @@
|
||||
show create table `${dbName}`.${tableName}
|
||||
</select>
|
||||
|
||||
<resultMap id="TablesDtoMap" type="com.zyplayer.doc.db.framework.db.dto.TableInfoDto" >
|
||||
<resultMap id="TablesDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.TableInfoDto" >
|
||||
<result column="name" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="tab_name" property="tableName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
@@ -74,7 +74,7 @@
|
||||
select 1
|
||||
</select>
|
||||
|
||||
<select id="getTableDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableDescDto">
|
||||
<select id="getTableDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableDescDto">
|
||||
select 1 from ${dbName}.${tableName} where 0 = 1
|
||||
</select>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.hive;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.hive;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.dto.ColumnInfoDto;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.ColumnInfoDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.mysql.HiveMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.mysql.HiveMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper">
|
||||
|
||||
<select id="getDatabaseList" resultType="com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto">
|
||||
<select id="getDatabaseList" resultType="org.dromara.zyplayer.db.framework.db.dto.DatabaseInfoDto">
|
||||
select SCHEMA_NAME dbName from `information_schema`.SCHEMATA
|
||||
</select>
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
show create table `${dbName}`.${tableName}
|
||||
</select>
|
||||
|
||||
<select id="getTableList" resultType="com.zyplayer.doc.db.framework.db.dto.TableInfoDto">
|
||||
<select id="getTableList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableInfoDto">
|
||||
select table_schema dbName,table_name tableName, table_comment as tableComment
|
||||
from `information_schema`.tables
|
||||
<if test="dbName != null">where table_schema=#{dbName}</if>
|
||||
</select>
|
||||
|
||||
<select id="getTableColumnList" resultType="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto">
|
||||
<select id="getTableColumnList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto">
|
||||
SELECT table_name as tableName,COLUMN_NAME as name,column_comment description,data_type type,
|
||||
COALESCE(CHARACTER_MAXIMUM_LENGTH,NUMERIC_PRECISION) as `length`,NUMERIC_SCALE as numericScale,
|
||||
if(COLUMN_KEY='PRI','1','0') as primaryKey,
|
||||
@@ -27,7 +27,7 @@
|
||||
ORDER BY ordinal_position
|
||||
</select>
|
||||
|
||||
<select id="getTableStatus" resultType="com.zyplayer.doc.db.controller.vo.TableStatusVo">
|
||||
<select id="getTableStatus" resultType="org.dromara.zyplayer.db.controller.vo.TableStatusVo">
|
||||
<!-- show table status from `${dbName}` like #{tableName} -->
|
||||
select TABLE_NAME as name, ENGINE as engine, VERSION as version, ROW_FORMAT as rowFormat,
|
||||
TABLE_ROWS as `rows`, AVG_ROW_LENGTH as avgRowLength, DATA_LENGTH as dataLength,
|
||||
@@ -39,17 +39,17 @@
|
||||
where table_schema=#{dbName} and table_name=#{tableName}
|
||||
</select>
|
||||
|
||||
<select id="getTableColumnDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto">
|
||||
<select id="getTableColumnDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto">
|
||||
select 1
|
||||
</select>
|
||||
|
||||
<select id="getTableAndColumnBySearch" resultType="com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto">
|
||||
<select id="getTableAndColumnBySearch" resultType="org.dromara.zyplayer.db.framework.db.dto.QueryTableColumnDescDto">
|
||||
SELECT TABLE_NAME as tableName, column_name as columnName, column_comment as description
|
||||
FROM `INFORMATION_SCHEMA`.Columns
|
||||
WHERE table_schema=#{dbName} AND (COLUMN_NAME like #{searchText} or column_comment like #{searchText})
|
||||
</select>
|
||||
|
||||
<select id="getTableDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableDescDto">
|
||||
<select id="getTableDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableDescDto">
|
||||
select table_name tableName, table_comment as description
|
||||
from `information_schema`.tables
|
||||
<where>
|
||||
@@ -73,13 +73,13 @@
|
||||
<include refid="ProcedureListCondition"/>
|
||||
</select>
|
||||
|
||||
<select id="getProcedureList" resultType="com.zyplayer.doc.db.framework.db.dto.ProcedureDto">
|
||||
<select id="getProcedureList" resultType="org.dromara.zyplayer.db.framework.db.dto.ProcedureDto">
|
||||
select `db`, `name`, `type`, `definer`, `created` from mysql.proc
|
||||
<include refid="ProcedureListCondition"/>
|
||||
limit #{param.pageSize} offset #{param.offset}
|
||||
</select>
|
||||
|
||||
<select id="getProcedureDetail" resultType="com.zyplayer.doc.db.framework.db.dto.ProcedureDto">
|
||||
<select id="getProcedureDetail" resultType="org.dromara.zyplayer.db.framework.db.dto.ProcedureDto">
|
||||
select `db`, `name`, `type`, `definer`, `created`, `body`, `param_list` as paramList, `returns` from mysql.proc where db=#{dbName} and `type`=#{typeName} and name=#{procName}
|
||||
</select>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.mysql;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.dto.ColumnInfoDto;
|
||||
|
||||
/**
|
||||
* mysql数据库的mapper持有对象
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年8月8日
|
||||
*/
|
||||
public interface MysqlMapper {
|
||||
|
||||
ColumnInfoDto getColumnInfo(@Param("dbName") String dbName, @Param("tableName") String tableName, @Param("columnName") String columnName);
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.mysql;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import org.dromara.zyplayer.db.framework.db.dto.ColumnInfoDto;
|
||||
|
||||
/**
|
||||
* mysql数据库的mapper持有对象
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年8月8日
|
||||
*/
|
||||
public interface MysqlMapper {
|
||||
|
||||
ColumnInfoDto getColumnInfo(@Param("dbName") String dbName, @Param("tableName") String tableName, @Param("columnName") String columnName);
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.mysql.MysqlMapper">
|
||||
|
||||
<select id="getColumnInfo" resultType="com.zyplayer.doc.db.framework.db.dto.ColumnInfoDto">
|
||||
select
|
||||
IS_NULLABLE isNullable, COLUMN_TYPE columnType, CHARACTER_MAXIMUM_LENGTH maxLength,
|
||||
COLUMN_DEFAULT columnDefault,EXTRA extra
|
||||
from information_schema.columns t
|
||||
where t.table_schema=#{dbName}
|
||||
and t.table_name=#{tableName}
|
||||
and t.column_name=#{columnName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.mysql.MysqlMapper">
|
||||
|
||||
<select id="getColumnInfo" resultType="org.dromara.zyplayer.db.framework.db.dto.ColumnInfoDto">
|
||||
select
|
||||
IS_NULLABLE isNullable, COLUMN_TYPE columnType, CHARACTER_MAXIMUM_LENGTH maxLength,
|
||||
COLUMN_DEFAULT columnDefault,EXTRA extra
|
||||
from information_schema.columns t
|
||||
where t.table_schema=#{dbName}
|
||||
and t.table_name=#{tableName}
|
||||
and t.column_name=#{columnName}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper">
|
||||
|
||||
<resultMap id="TableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto" >
|
||||
<resultMap id="TableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto" >
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="COLUMN_NAME" property="name" jdbcType="VARCHAR" />
|
||||
<result column="DATA_TYPE" property="type" jdbcType="VARCHAR" />
|
||||
@@ -10,18 +10,18 @@
|
||||
<result column="COMMENTS" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="COLUMN_NAME" property="columnName" jdbcType="VARCHAR" />
|
||||
<result column="COMMENTS" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 获取用户列表 -->
|
||||
<select id="getDatabaseList" resultType="com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto">
|
||||
<select id="getDatabaseList" resultType="org.dromara.zyplayer.db.framework.db.dto.DatabaseInfoDto">
|
||||
select USERNAME dbName from all_users
|
||||
</select>
|
||||
|
||||
<select id="getTableStatus" resultType="com.zyplayer.doc.db.controller.vo.TableStatusVo">
|
||||
<select id="getTableStatus" resultType="org.dromara.zyplayer.db.controller.vo.TableStatusVo">
|
||||
select dt.TABLE_NAME as name,
|
||||
dt.NUM_ROWS as "rows",
|
||||
dt.AVG_ROW_LEN as avgRowLength,
|
||||
@@ -35,7 +35,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 获取表列表 -->
|
||||
<select id="getTableList" resultType="com.zyplayer.doc.db.framework.db.dto.TableInfoDto">
|
||||
<select id="getTableList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableInfoDto">
|
||||
select t.OWNER as dbName,t.TABLE_NAME as tableName,c.COMMENTS as tableComment from all_tables t
|
||||
left join all_tab_comments c on t.TABLE_NAME = c.TABLE_NAME and t.OWNER = c.OWNER
|
||||
<where>
|
||||
@@ -72,7 +72,7 @@
|
||||
</select>
|
||||
|
||||
<!-- 条件查询表 -->
|
||||
<select id="getTableDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableDescDto">
|
||||
<select id="getTableDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableDescDto">
|
||||
select t.OWNER,t.TABLE_NAME as tableName,c.COMMENTS as description
|
||||
from all_tables t
|
||||
left join all_tab_comments c on t.TABLE_NAME = c.TABLE_NAME and t.owner = c.owner
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.oracle;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.oracle;
|
||||
|
||||
/**
|
||||
* oracle数据库的mapper持有对象
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper">
|
||||
|
||||
<resultMap id="TableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto">
|
||||
<resultMap id="TableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto">
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR"/>
|
||||
<result column="NAME" property="name" jdbcType="VARCHAR"/>
|
||||
<result column="ISIDENITY" property="selfIncrement" jdbcType="VARCHAR"/>
|
||||
@@ -13,25 +13,25 @@
|
||||
<result column="DESCRIPTION" property="description" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto">
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.QueryTableColumnDescDto">
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR"/>
|
||||
<result column="COLUMN_NAME" property="columnName" jdbcType="VARCHAR"/>
|
||||
<result column="DESCRIPTION" property="description" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getDatabaseList" resultType="com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto">
|
||||
<select id="getDatabaseList" resultType="org.dromara.zyplayer.db.framework.db.dto.DatabaseInfoDto">
|
||||
SELECT distinct table_schema as dbName
|
||||
FROM information_schema.tables ORDER BY 1
|
||||
</select>
|
||||
|
||||
<select id="getTableStatus" resultType="com.zyplayer.doc.db.controller.vo.TableStatusVo">
|
||||
<select id="getTableStatus" resultType="org.dromara.zyplayer.db.controller.vo.TableStatusVo">
|
||||
SELECT relname as name, reltuples as rows
|
||||
FROM pg_class r JOIN pg_namespace n
|
||||
ON (relnamespace = n.oid)
|
||||
WHERE relkind = 'r' AND n.nspname = #{dbName} and relname = #{tableName}
|
||||
</select>
|
||||
|
||||
<select id="getTableList" resultType="com.zyplayer.doc.db.framework.db.dto.TableInfoDto">
|
||||
<select id="getTableList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableInfoDto">
|
||||
select relname as tableName,cast(obj_description(relfilenode,'pg_class') as varchar) as tableComment from pg_class c
|
||||
where relname in (select tablename from pg_tables where schemaname=#{dbName} and position('_2' in tablename)=0)
|
||||
order by 1
|
||||
@@ -78,7 +78,7 @@
|
||||
AND A .attnum > 0
|
||||
</select>
|
||||
|
||||
<select id="getTableDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableDescDto">
|
||||
<select id="getTableDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableDescDto">
|
||||
select t.relname as tableName ,description as description
|
||||
from pg_description d,pg_class c,pg_stat_all_tables t
|
||||
where d.objoid=c.oid and objsubid=0 and t.relname=c.relname and t.schemaname=#{dbName}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.postgresql;
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.postgresql;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.dto.ColumnInfoDto;
|
||||
import org.dromara.zyplayer.db.framework.db.dto.ColumnInfoDto;
|
||||
|
||||
/**
|
||||
* postgresql数据库的mapper持有对象
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.base.BaseMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.base.BaseMapper">
|
||||
|
||||
<resultMap id="TableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto" >
|
||||
<resultMap id="TableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto" >
|
||||
<result column="NAME" property="name" jdbcType="VARCHAR" />
|
||||
<result column="ISIDENITY" property="selfIncrement" jdbcType="VARCHAR" />
|
||||
<result column="TYPE" property="type" jdbcType="VARCHAR" />
|
||||
@@ -12,17 +12,17 @@
|
||||
<result column="DESCRIPTION" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="com.zyplayer.doc.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<resultMap id="QueryTableColumnDescDtoMap" type="org.dromara.zyplayer.db.framework.db.dto.QueryTableColumnDescDto" >
|
||||
<result column="TABLE_NAME" property="tableName" jdbcType="VARCHAR" />
|
||||
<result column="COLUMN_NAME" property="columnName" jdbcType="VARCHAR" />
|
||||
<result column="DESCRIPTION" property="description" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getDatabaseList" resultType="com.zyplayer.doc.db.framework.db.dto.DatabaseInfoDto">
|
||||
<select id="getDatabaseList" resultType="org.dromara.zyplayer.db.framework.db.dto.DatabaseInfoDto">
|
||||
SELECT NAME as dbName FROM Master..SysDatabases ORDER BY NAME
|
||||
</select>
|
||||
|
||||
<select id="getTableStatus" resultType="com.zyplayer.doc.db.controller.vo.TableStatusVo">
|
||||
<select id="getTableStatus" resultType="org.dromara.zyplayer.db.controller.vo.TableStatusVo">
|
||||
select #{tableName} as name
|
||||
</select>
|
||||
|
||||
@@ -76,12 +76,12 @@
|
||||
AND name = '${tableName}'
|
||||
</select>
|
||||
|
||||
<select id="getTableList" resultType="com.zyplayer.doc.db.framework.db.dto.TableInfoDto">
|
||||
<select id="getTableList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableInfoDto">
|
||||
SELECT NAME as tableName, ID as tableId
|
||||
FROM ${dbName}..SysObjects Where XType='U' ORDER BY NAME
|
||||
</select>
|
||||
|
||||
<select id="getTableColumnList" resultType="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto">
|
||||
<select id="getTableColumnList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto">
|
||||
WITH PRIMARYINFO( COLUMNNAME ,ISPRAMARY) AS
|
||||
(
|
||||
SELECT C.NAME,'true' AS COLUMNNAME
|
||||
@@ -113,7 +113,7 @@
|
||||
WHERE convert(nvarchar(max),C.value) like #{searchText} OR B.name like #{searchText}
|
||||
</select>
|
||||
|
||||
<select id="getTableDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableDescDto">
|
||||
<select id="getTableDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableDescDto">
|
||||
select 'TABLEDESC_SYS' as tableName, value as description, major_id as majorId
|
||||
from ${dbName}.sys.extended_properties
|
||||
WHERE minor_id=0
|
||||
@@ -1,26 +1,26 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.sqlserver;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* sqlserver数据库的mapper持有对象
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年8月8日
|
||||
*/
|
||||
public interface SqlServerMapper {
|
||||
|
||||
/**
|
||||
* 获取字段注释
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @return 表字段注释
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年8月8日
|
||||
*/
|
||||
List<TableColumnDescDto> getTableColumnDescList(@Param("tableName") String tableName);
|
||||
|
||||
}
|
||||
package org.dromara.zyplayer.db.framework.db.mapper.sqlserver;
|
||||
|
||||
import org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* sqlserver数据库的mapper持有对象
|
||||
*
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年8月8日
|
||||
*/
|
||||
public interface SqlServerMapper {
|
||||
|
||||
/**
|
||||
* 获取字段注释
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @return 表字段注释
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年8月8日
|
||||
*/
|
||||
List<TableColumnDescDto> getTableColumnDescList(@Param("tableName") String tableName);
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zyplayer.doc.db.framework.db.mapper.sqlserver.SqlServerMapper">
|
||||
<mapper namespace="org.dromara.zyplayer.db.framework.db.mapper.sqlserver.SqlServerMapper">
|
||||
|
||||
<select id="getTableColumnDescList" resultType="com.zyplayer.doc.db.framework.db.dto.TableColumnDescDto">
|
||||
<select id="getTableColumnDescList" resultType="org.dromara.zyplayer.db.framework.db.dto.TableColumnDescDto">
|
||||
SELECT B.name AS name,C.value AS description
|
||||
FROM sys.tables A
|
||||
INNER JOIN sys.columns B ON B.object_id = A.object_id
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.parser;
|
||||
package org.dromara.zyplayer.db.framework.db.parser;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.parser;
|
||||
package org.dromara.zyplayer.db.framework.db.parser;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.zyplayer.doc.db.framework.db.parser;
|
||||
package org.dromara.zyplayer.db.framework.db.parser;
|
||||
|
||||
import org.apache.ibatis.parsing.TokenHandler;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql;
|
||||
package org.dromara.zyplayer.db.framework.db.sql;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql;
|
||||
|
||||
import com.alibaba.druid.DbType;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
@@ -17,10 +17,10 @@ import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OraclePrimaryKey;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleUnique;
|
||||
import com.alibaba.druid.sql.parser.SQLParserUtils;
|
||||
import com.alibaba.druid.util.FnvHash;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.mysql.function.MySqlToOracleFunctionTransform;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.mysql.util.MySqlSQLDataTypeTransformUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.MapCacheUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.SQLTransformUtils;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.function.MySqlToOracleFunctionTransform;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.util.MySqlSQLDataTypeTransformUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.MapCacheUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.SQLTransformUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql;
|
||||
|
||||
import com.alibaba.druid.DbType;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
@@ -10,10 +10,10 @@ import com.alibaba.druid.sql.dialect.mysql.ast.MySqlUnique;
|
||||
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStatement;
|
||||
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlOutputVisitor;
|
||||
import com.alibaba.druid.sql.parser.SQLParserUtils;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.mysql.function.MySqlToSqlServerFunctionTransform;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.mysql.util.MySqlSQLDataTypeTransformUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.MapCacheUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.SQLTransformUtils;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.function.MySqlToSqlServerFunctionTransform;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.util.MySqlSQLDataTypeTransformUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.MapCacheUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.SQLTransformUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.function;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.sql.MethodInvoke;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.MethodInvoke;
|
||||
|
||||
/**
|
||||
* mysql2oracle需要转换的函数
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.function;
|
||||
|
||||
/**
|
||||
* mysql2oracle需要转换的函数实现
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.function;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLObject;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr;
|
||||
@@ -6,7 +6,7 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectItem;
|
||||
import com.zyplayer.doc.db.framework.db.sql.MethodInvoke;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.MethodInvoke;
|
||||
|
||||
/**
|
||||
* mysql2sqlserver需要转换的函数
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.function;
|
||||
|
||||
import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.mysql.util;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.mysql.util;
|
||||
|
||||
import com.alibaba.druid.sql.SQLTransformUtils;
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.oracle;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.oracle;
|
||||
|
||||
import com.alibaba.druid.DbType;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
@@ -17,10 +17,10 @@ import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleUnique;
|
||||
import com.alibaba.druid.sql.dialect.oracle.visitor.OracleOutputVisitor;
|
||||
import com.alibaba.druid.sql.parser.SQLParserUtils;
|
||||
import com.alibaba.druid.util.FnvHash;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.oracle.function.OracleToMySqlFunctionTransform;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.oracle.util.OracleSQLDataTypeTransformUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.MapCacheUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.SQLTransformUtils;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.oracle.function.OracleToMySqlFunctionTransform;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.oracle.util.OracleSQLDataTypeTransformUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.MapCacheUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.SQLTransformUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.oracle.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.oracle.function;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLObject;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr;
|
||||
@@ -6,7 +6,7 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectItem;
|
||||
import com.zyplayer.doc.db.framework.db.sql.MethodInvoke;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.MethodInvoke;
|
||||
|
||||
/**
|
||||
* oracle2mysql需要转换的函数
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.oracle.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.oracle.function;
|
||||
|
||||
import com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.oracle.util;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.oracle.util;
|
||||
|
||||
import com.alibaba.druid.sql.SQLTransformUtils;
|
||||
import com.alibaba.druid.sql.SQLUtils;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.sqlserver;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.sqlserver;
|
||||
|
||||
import com.alibaba.druid.DbType;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
@@ -10,10 +10,10 @@ import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlCreateTableStateme
|
||||
import com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerOutputVisitor;
|
||||
import com.alibaba.druid.sql.parser.SQLParserUtils;
|
||||
import com.alibaba.druid.util.FnvHash;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.sqlserver.function.SqlServerToMySqlFunctionTransform;
|
||||
import com.zyplayer.doc.db.framework.db.sql.dialect.sqlserver.util.SqlServerSQLDataTypeTransformUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.MapCacheUtil;
|
||||
import com.zyplayer.doc.db.framework.utils.SQLTransformUtils;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.sqlserver.function.SqlServerToMySqlFunctionTransform;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.dialect.sqlserver.util.SqlServerSQLDataTypeTransformUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.MapCacheUtil;
|
||||
import org.dromara.zyplayer.db.framework.utils.SQLTransformUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.sqlserver.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.sqlserver.function;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.sql.MethodInvoke;
|
||||
import org.dromara.zyplayer.db.framework.db.sql.MethodInvoke;
|
||||
|
||||
/**
|
||||
* sqlserver2mysql需要转换的函数
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.sqlserver.function;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.sqlserver.function;
|
||||
|
||||
/**
|
||||
* sqlserver2mysql需要转换的函数实现
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.sql.dialect.sqlserver.util;
|
||||
package org.dromara.zyplayer.db.framework.db.sql.dialect.sqlserver.util;
|
||||
|
||||
import com.alibaba.druid.sql.SQLTransformUtils;
|
||||
import com.alibaba.druid.sql.ast.SQLDataType;
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zyplayer.doc.db.framework.db.transfer;
|
||||
package org.dromara.zyplayer.db.framework.db.transfer;
|
||||
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteParam;
|
||||
import com.zyplayer.doc.db.framework.db.parser.FillParamUtil;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteParam;
|
||||
import org.dromara.zyplayer.db.framework.db.parser.FillParamUtil;
|
||||
import net.sf.jsqlparser.JSQLParserException;
|
||||
import net.sf.jsqlparser.expression.Alias;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
@@ -1,23 +1,23 @@
|
||||
package com.zyplayer.doc.db.framework.db.transfer;
|
||||
package org.dromara.zyplayer.db.framework.db.transfer;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.zyplayer.doc.core.exception.ConfirmException;
|
||||
import com.zyplayer.doc.data.config.security.DocUserDetails;
|
||||
import com.zyplayer.doc.data.config.security.DocUserUtil;
|
||||
import com.zyplayer.doc.data.repository.manage.entity.DbTransferTask;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocAuthConst;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysModuleType;
|
||||
import com.zyplayer.doc.data.repository.support.consts.DocSysType;
|
||||
import com.zyplayer.doc.data.service.manage.DbTransferTaskService;
|
||||
import com.zyplayer.doc.data.utils.ThreadPoolUtil;
|
||||
import com.zyplayer.doc.db.framework.consts.DbAuthType;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import com.zyplayer.doc.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteParam;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteResult;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.ExecuteType;
|
||||
import com.zyplayer.doc.db.framework.db.mapper.base.SqlExecutor;
|
||||
import org.dromara.zyplayer.core.exception.ConfirmException;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserDetails;
|
||||
import org.dromara.zyplayer.data.config.security.DocUserUtil;
|
||||
import org.dromara.zyplayer.data.repository.manage.entity.DbTransferTask;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocAuthConst;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysModuleType;
|
||||
import org.dromara.zyplayer.data.repository.support.consts.DocSysType;
|
||||
import org.dromara.zyplayer.data.service.manage.DbTransferTaskService;
|
||||
import org.dromara.zyplayer.data.utils.ThreadPoolUtil;
|
||||
import org.dromara.zyplayer.db.framework.consts.DbAuthType;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseFactoryBean;
|
||||
import org.dromara.zyplayer.db.framework.db.bean.DatabaseRegistrationBean;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteParam;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteResult;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.ExecuteType;
|
||||
import org.dromara.zyplayer.db.framework.db.mapper.base.SqlExecutor;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.transfer;
|
||||
package org.dromara.zyplayer.db.framework.db.transfer;
|
||||
|
||||
/**
|
||||
* 数据互导状态类
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.vo;
|
||||
package org.dromara.zyplayer.db.framework.db.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.db.vo;
|
||||
package org.dromara.zyplayer.db.framework.db.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.json;
|
||||
package org.dromara.zyplayer.db.framework.json;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.serializer.SerializeConfig;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zyplayer.doc.db.framework.sse.controller;
|
||||
package org.dromara.zyplayer.db.framework.sse.controller;
|
||||
|
||||
import com.zyplayer.doc.core.annotation.AuthMan;
|
||||
import com.zyplayer.doc.db.framework.sse.param.DbCommonSseParam;
|
||||
import com.zyplayer.doc.db.framework.sse.service.DbSseEmitterService;
|
||||
import org.dromara.zyplayer.core.annotation.AuthMan;
|
||||
import org.dromara.zyplayer.db.framework.sse.param.DbCommonSseParam;
|
||||
import org.dromara.zyplayer.db.framework.sse.service.DbSseEmitterService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
import javax.annotation.Resource;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.sse.enums;
|
||||
package org.dromara.zyplayer.db.framework.sse.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zyplayer.doc.db.framework.sse.param;
|
||||
package org.dromara.zyplayer.db.framework.sse.param;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.zyplayer.doc.db.framework.sse.service;
|
||||
package org.dromara.zyplayer.db.framework.sse.service;
|
||||
|
||||
import com.zyplayer.doc.db.framework.sse.param.DbCommonSseParam;
|
||||
import org.dromara.zyplayer.db.framework.sse.param.DbCommonSseParam;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user