Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jz-dmp-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
jz-dmp-service
Commits
a0981050
Commit
a0981050
authored
Jan 12, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8a01a3da
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
119 additions
and
188 deletions
+119
-188
DataSourceController.java
...ules/controller/DataIntegration/DataSourceController.java
+2
-3
SyncingDatasourceTypeDto.java
...roller/DataIntegration/bean/SyncingDatasourceTypeDto.java
+0
-156
DmpSyncingDatasourceService.java
...m/jz/dmp/modules/service/DmpSyncingDatasourceService.java
+1
-2
DmpSyncingDatasourceServiceImpl.java
...modules/service/impl/DmpSyncingDatasourceServiceImpl.java
+4
-27
datasource.json
src/main/resources/templates/datasource.json
+112
-0
lxTaskJson.json
src/main/resources/templates/lxTaskJson.json
+0
-0
realtime.json
src/main/resources/templates/realtime.json
+0
-0
No files found.
src/main/java/com/jz/dmp/modules/controller/DataIntegration/DataSourceController.java
View file @
a0981050
...
@@ -6,7 +6,6 @@ import com.jz.common.page.PageInfoResponse;
...
@@ -6,7 +6,6 @@ import com.jz.common.page.PageInfoResponse;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DmpSyncingDatasourceReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DmpSyncingDatasourceReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.SyncingDatasourceTypeDto
;
import
com.jz.dmp.modules.service.DmpSyncingDatasourceService
;
import
com.jz.dmp.modules.service.DmpSyncingDatasourceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -172,11 +171,11 @@ public class DataSourceController {
...
@@ -172,11 +171,11 @@ public class DataSourceController {
@ApiImplicitParam
(
name
=
"datasourceTypeId"
,
value
=
"数据源类型id"
)
@ApiImplicitParam
(
name
=
"datasourceTypeId"
,
value
=
"数据源类型id"
)
@ApiOperation
(
value
=
"获取数据源类型输入框属性"
,
notes
=
"获取数据源类型输入框属性"
)
@ApiOperation
(
value
=
"获取数据源类型输入框属性"
,
notes
=
"获取数据源类型输入框属性"
)
@GetMapping
(
value
=
"/getDatasourceTypeAttr"
)
@GetMapping
(
value
=
"/getDatasourceTypeAttr"
)
public
JsonResult
<
SyncingDatasourceTypeDto
>
getDatasourceTypeAttr
(
@RequestParam
String
datasourceTypeId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
public
JsonResult
getDatasourceTypeAttr
(
@RequestParam
String
datasourceTypeId
,
HttpServletRequest
httpRequest
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
datasourceTypeId
))
{
if
(
StringUtils
.
isEmpty
(
datasourceTypeId
))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
);
}
}
JsonResult
<
SyncingDatasourceTypeDto
>
result
=
dmpSyncingDatasourceService
.
selectDatasourceTypeAttrById
(
datasourceTypeId
);
JsonResult
result
=
dmpSyncingDatasourceService
.
selectDatasourceTypeAttrById
(
datasourceTypeId
);
return
result
;
return
result
;
}
}
...
...
src/main/java/com/jz/dmp/modules/controller/DataIntegration/bean/SyncingDatasourceTypeDto.java
deleted
100644 → 0
View file @
8a01a3da
package
com
.
jz
.
dmp
.
modules
.
controller
.
DataIntegration
.
bean
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
/**
* 数据源类型(DmpSyncingDatasourceType)实体类
*
* @author Bellamy
* @since 2020-12-21 18:39:06
*/
@ApiModel
(
value
=
"数据源类型返回对象"
,
description
=
"数据源类型"
)
public
class
SyncingDatasourceTypeDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
526021146272437267L
;
/**
* 数据源类型ID
*/
@ApiModelProperty
(
value
=
"数据源类型ID"
)
private
String
datasourceTypeId
;
/**
* 数据源名称
*/
@ApiModelProperty
(
value
=
"数据源名称"
)
private
String
datasourceTypeName
;
/**
* 数据源分类
*/
@ApiModelProperty
(
value
=
"数据源分类"
)
private
String
datasourceCatecode
;
/**
* 数据源分类
*/
@ApiModelProperty
(
value
=
"数据源分类名称"
)
private
String
datasourceCatename
;
/**
* jdbcUrl
*/
@ApiModelProperty
(
value
=
"jdbcUrl"
)
private
String
jdbcUrl
;
/**
* 密码
*/
@ApiModelProperty
(
value
=
"密码"
)
private
String
password
;
/**
* 账户
*/
@ApiModelProperty
(
value
=
"账户"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"数据源描述"
)
private
String
datasourceDesc
;
@ApiModelProperty
(
value
=
"数据源名称"
)
private
String
datasourceName
;
@ApiModelProperty
(
value
=
"网络连接类型"
)
private
String
networkConnectionType
;
/**
* 数据源类型
*/
@ApiModelProperty
(
value
=
"数据源分类输入框属性json"
)
private
JSONObject
dbAttrs
;
public
String
getDatasourceCatecode
()
{
return
datasourceCatecode
;
}
public
void
setDatasourceCatecode
(
String
datasourceCatecode
)
{
this
.
datasourceCatecode
=
datasourceCatecode
;
}
public
String
getDatasourceCatename
()
{
return
datasourceCatename
;
}
public
void
setDatasourceCatename
(
String
datasourceCatename
)
{
this
.
datasourceCatename
=
datasourceCatename
;
}
public
String
getDatasourceTypeId
()
{
return
datasourceTypeId
;
}
public
void
setDatasourceTypeId
(
String
datasourceTypeId
)
{
this
.
datasourceTypeId
=
datasourceTypeId
;
}
public
String
getDatasourceTypeName
()
{
return
datasourceTypeName
;
}
public
void
setDatasourceTypeName
(
String
datasourceTypeName
)
{
this
.
datasourceTypeName
=
datasourceTypeName
;
}
public
JSONObject
getDbAttrs
()
{
return
dbAttrs
;
}
public
void
setDbAttrs
(
JSONObject
dbAttrs
)
{
this
.
dbAttrs
=
dbAttrs
;
}
public
String
getJdbcUrl
()
{
return
jdbcUrl
;
}
public
void
setJdbcUrl
(
String
jdbcUrl
)
{
this
.
jdbcUrl
=
jdbcUrl
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getDatasourceDesc
()
{
return
datasourceDesc
;
}
public
void
setDatasourceDesc
(
String
datasourceDesc
)
{
this
.
datasourceDesc
=
datasourceDesc
;
}
public
String
getDatasourceName
()
{
return
datasourceName
;
}
public
void
setDatasourceName
(
String
datasourceName
)
{
this
.
datasourceName
=
datasourceName
;
}
public
String
getNetworkConnectionType
()
{
return
networkConnectionType
;
}
public
void
setNetworkConnectionType
(
String
networkConnectionType
)
{
this
.
networkConnectionType
=
networkConnectionType
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/DmpSyncingDatasourceService.java
View file @
a0981050
...
@@ -6,7 +6,6 @@ import com.jz.common.page.PageInfoResponse;
...
@@ -6,7 +6,6 @@ import com.jz.common.page.PageInfoResponse;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DmpSyncingDatasourceReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DmpSyncingDatasourceReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.SyncingDatasourceTypeDto
;
import
com.jz.dmp.modules.model.DmpSyncingDatasource
;
import
com.jz.dmp.modules.model.DmpSyncingDatasource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -80,5 +79,5 @@ public interface DmpSyncingDatasourceService {
...
@@ -80,5 +79,5 @@ public interface DmpSyncingDatasourceService {
List
<
DmpSyncingDatasource
>
findListByParams
(
DmpSyncingDatasource
ds
)
throws
Exception
;
List
<
DmpSyncingDatasource
>
findListByParams
(
DmpSyncingDatasource
ds
)
throws
Exception
;
JsonResult
<
SyncingDatasourceTypeDto
>
selectDatasourceTypeAttrById
(
String
datasourceTypeId
)
throws
Exception
;
JsonResult
selectDatasourceTypeAttrById
(
String
datasourceTypeId
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpSyncingDatasourceServiceImpl.java
View file @
a0981050
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
package
com
.
jz
.
dmp
.
modules
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
...
@@ -15,7 +14,6 @@ import com.jz.dmp.agent.DmpAgentResult;
...
@@ -15,7 +14,6 @@ import com.jz.dmp.agent.DmpAgentResult;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceListReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DmpSyncingDatasourceReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.DmpSyncingDatasourceReq
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.SyncingDatasourceTypeDto
;
import
com.jz.dmp.modules.dao.DmpProjectDao
;
import
com.jz.dmp.modules.dao.DmpProjectDao
;
import
com.jz.dmp.modules.dao.DmpSyncingDatasourceDao
;
import
com.jz.dmp.modules.dao.DmpSyncingDatasourceDao
;
import
com.jz.dmp.modules.model.DmpAgentDatasourceInfo
;
import
com.jz.dmp.modules.model.DmpAgentDatasourceInfo
;
...
@@ -343,37 +341,16 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
...
@@ -343,37 +341,16 @@ public class DmpSyncingDatasourceServiceImpl implements DmpSyncingDatasourceServ
* @author Bellamy
* @author Bellamy
*/
*/
@Override
@Override
public
JsonResult
<
SyncingDatasourceTypeDto
>
selectDatasourceTypeAttrById
(
String
datasourceTypeId
)
throws
Exception
{
public
JsonResult
selectDatasourceTypeAttrById
(
String
datasourceTypeId
)
throws
Exception
{
Map
returnMap
=
new
HashMap
();
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
"datasourceTypeId"
,
datasourceTypeId
);
map
.
put
(
"datasourceTypeId"
,
datasourceTypeId
);
SyncingDatasourceTypeDto
dto
=
new
SyncingDatasourceTypeDto
();
List
<
Map
>
list
=
dmpSyncingDatasourceDao
.
queryGroupDatasourceType
(
map
);
List
<
Map
>
list
=
dmpSyncingDatasourceDao
.
queryGroupDatasourceType
(
map
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
Map
str
=
list
.
get
(
0
);
Map
str
=
list
.
get
(
0
);
if
(
StringUtils
.
isNotEmpty
(
str
.
get
(
"datasourceTypeId"
).
toString
()))
{
returnMap
=
JSONObject
.
parseObject
(
str
.
get
(
"dbAttrs"
).
toString
());
dto
.
setDatasourceTypeId
(
str
.
get
(
"datasourceTypeId"
).
toString
());
}
}
if
(
StringUtils
.
isNotEmpty
(
str
.
get
(
"datasourceCatecode"
).
toString
()))
{
return
new
JsonResult
(
returnMap
);
dto
.
setDatasourceCatecode
(
str
.
get
(
"datasourceCatecode"
).
toString
());
}
if
(
StringUtils
.
isNotEmpty
(
str
.
get
(
"datasourceCatename"
).
toString
()))
{
dto
.
setDatasourceCatename
(
str
.
get
(
"datasourceCatename"
).
toString
());
}
if
(
StringUtils
.
isNotEmpty
(
str
.
get
(
"datasourceTypeName"
).
toString
()))
{
dto
.
setDatasourceTypeName
(
str
.
get
(
"datasourceTypeName"
).
toString
());
}
if
(
StringUtils
.
isNotEmpty
(
str
.
get
(
"dbAttrs"
).
toString
()))
{
//数据源字段属性json
Map
<
String
,
Object
>
dbAttrs
=
JSONObject
.
parseObject
(
str
.
get
(
"dbAttrs"
).
toString
());
dto
.
setJdbcUrl
(
dbAttrs
.
get
(
"jdbcUrl"
).
toString
());
dto
.
setPassword
(
dbAttrs
.
get
(
"password"
).
toString
());
dto
.
setDatasourceDesc
(
dbAttrs
.
get
(
"datasourceDesc"
).
toString
());
dto
.
setUserName
(
dbAttrs
.
get
(
"userName"
).
toString
());
dto
.
setDatasourceName
(
dbAttrs
.
get
(
"datasourceName"
).
toString
());
dto
.
setNetworkConnectionType
(
dbAttrs
.
get
(
"networkConnectionType"
).
toString
());
dto
.
setDbAttrs
(
JSONObject
.
parseObject
(
str
.
get
(
"dbAttrs"
).
toString
()));
}
}
return
new
JsonResult
(
dto
);
}
}
/*
/*
...
...
src/main/resources/templates/datasource.json
0 → 100644
View file @
a0981050
{
"data"
:[
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"mysql"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"SqlServer"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"PostgreSQL"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"Oracle"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"Hive"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"kudu Master"
:
"Y"
,
//
"impala Master fqdn"
:
"Y"
,
//
"databaseType"
:
"Kudu"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"hdfs.namenode.principal"
:
"Y"
,
//
"hive.metastore.uris:thrift"
:
"Y"
,
//
"keytab.location"
:
"Y"
,
"databaseType"
:
"HDFS"
},
{
"port"
:
"Y"
,
//端口
"agreement"
:
"Y"
,
//协议
"host"
:
"Y"
,
//主机
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"FTP"
},
{
"jdbcUrl"
:
"Y"
,
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"databaseType"
:
"Elasticsearch"
},
{
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"bootstrap地址"
:
"Y"
,
"jaas地址"
:
"Y"
,
"krb5地址"
:
"Y"
,
"databaseType"
:
"Kafka"
}
]
}
/*
{
"jdbcUrl"
:
"Y"
,
"port"
:
"N"
,
//端口
"agreement"
:
"N"
,
//协议
"host"
:
"N"
,
//主机
"password"
:
"Y"
,
//密码
"userName"
:
"Y"
,
//用户名
"datasourceDesc"
:
"Y"
,
//数据源描述
"datasourceName"
:
"Y"
,
//数据源名称
"hdfs.namenode.principal"
:
"N"
,
//
"hive.metastore.uris:thrift"
:
"N"
,
//
"keytab.location"
:
"N"
,
"bootstrap地址"
:
"N"
,
"jaas地址"
:
"N"
,
"krb5地址"
:
"N"
,
"kudu Master"
:
"N"
,
//
"impala Master fqdn"
:
"N"
,
//
"databaseType"
:
"Elasticsearch"
}
*/
src/main/resources/lxTaskJson.json
→
src/main/resources/
templates/
lxTaskJson.json
View file @
a0981050
File moved
src/main/resources/realtime.json
→
src/main/resources/
templates/
realtime.json
View file @
a0981050
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment