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
86026ecd
Commit
86026ecd
authored
Feb 26, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
7413cc0f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
15 deletions
+65
-15
GatewayApiConstant.java
src/main/java/com/jz/common/constant/GatewayApiConstant.java
+4
-0
DmpApiServiceMangeController.java
.../controller/dataService/DmpApiServiceMangeController.java
+33
-9
ApiInterfaceReq.java
.../modules/controller/dataService/bean/ApiInterfaceReq.java
+3
-6
DmpApiServiceMangeService.java
...com/jz/dmp/modules/service/DmpApiServiceMangeService.java
+8
-0
DmpApiServiceMangeServiceImpl.java
...p/modules/service/impl/DmpApiServiceMangeServiceImpl.java
+13
-0
lxTaskJson.json
src/main/resources/templates/lxTaskJson.json
+4
-0
No files found.
src/main/java/com/jz/common/constant/GatewayApiConstant.java
View file @
86026ecd
...
...
@@ -75,6 +75,10 @@ public class GatewayApiConstant {
//获取文件夹树
public
static
final
String
folderTree
=
"/api/producer/getFileCatalog"
;
//获取文件夹树
public
static
final
String
getApiId
=
"/api/producer/getCustomApiId"
;
//服务开发---获取ApiId
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GatewayApiConstant
.
class
);
/*
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpApiServiceMangeController.java
View file @
86026ecd
...
...
@@ -54,12 +54,16 @@ public class DmpApiServiceMangeController {
* @author Bellamy
* @since 2021-01-19
*/
@ApiOperation
(
value
=
"制作/编辑API(第三方)"
,
notes
=
"保存/编辑API(第三方)"
)
@ApiOperation
(
value
=
"制作/编辑API(第三方)
和(大数据查询/标签查询)
"
,
notes
=
"保存/编辑API(第三方)"
)
@PostMapping
(
value
=
"/saveApi"
)
public
JsonResult
saveApiInfo
(
@RequestBody
@Validated
ApiInterfaceReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
try
{
if
(
"10004"
.
equals
(
req
.
getApiType
()))
{
jsonResult
=
dmpApiServiceMangeService
.
saveApiInfo
(
req
);
}
else
if
(
"10002"
.
equals
(
req
.
getApiType
()))
{
jsonResult
=
dmpApiServiceMangeService
.
saveApiBigDataInfo
(
req
);
}
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
e
.
getMessage
());
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
...
...
@@ -74,7 +78,7 @@ public class DmpApiServiceMangeController {
* @author Bellamy
* @since 2021-01-19
*/
@ApiOperation
(
value
=
"制作/编辑API(大数据查询/标签查询)"
,
notes
=
"制作/编辑API(大数据查询/标签查询)"
)
/*
@ApiOperation(value = "制作/编辑API(大数据查询/标签查询)", notes = "制作/编辑API(大数据查询/标签查询)")
@PostMapping(value = "/saveApiBigData")
public JsonResult saveApiBigDataInfo(@RequestBody @Validated ApiInterfaceReq req, HttpServletRequest httpRequest) {
JsonResult jsonResult = new JsonResult();
...
...
@@ -86,7 +90,7 @@ public class DmpApiServiceMangeController {
e.printStackTrace();
}
return jsonResult;
}
}
*/
/**
* 编辑API(第三方)基本信息
...
...
@@ -219,10 +223,10 @@ public class DmpApiServiceMangeController {
@GetMapping
(
value
=
"/sourceDbList"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目id"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"dbName"
,
value
=
"数据源类型名称"
,
required
=
true
)})
public
JsonResult
<
List
<
SourceDbNameListDto
>>
getSourceDbList
(
@RequestParam
Integer
projectId
,
@RequestParam
String
dbName
)
{
public
JsonResult
<
List
<
SourceDbNameListDto
>>
getSourceDbList
(
@RequestParam
Integer
projectId
,
@RequestParam
String
dbName
)
{
JsonResult
jsonResult
=
new
JsonResult
();
try
{
jsonResult
=
dmpApiServiceMangeService
.
querygSourceDbList
(
projectId
,
dbName
);
jsonResult
=
dmpApiServiceMangeService
.
querygSourceDbList
(
projectId
,
dbName
);
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
"查询失败"
);
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
...
...
@@ -295,10 +299,30 @@ public class DmpApiServiceMangeController {
@GetMapping
(
value
=
"/folderTree"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"projectId"
,
value
=
"项目id"
),
@ApiImplicitParam
(
name
=
"orgCode"
,
value
=
"组织编码"
)})
public
JsonResult
getFolderTree
(
@RequestParam
(
name
=
"projectId"
,
required
=
false
)
String
projectId
,
@RequestParam
(
name
=
"orgCode"
,
required
=
false
)
String
orgCode
)
{
public
JsonResult
getFolderTree
(
@RequestParam
(
name
=
"projectId"
,
required
=
false
)
String
projectId
,
@RequestParam
(
name
=
"orgCode"
,
required
=
false
)
String
orgCode
)
{
JsonResult
jsonResult
=
new
JsonResult
();
try
{
jsonResult
=
dmpApiServiceMangeService
.
getFolderTree
(
projectId
,
orgCode
);
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
e
.
getMessage
());
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
e
.
printStackTrace
();
}
return
jsonResult
;
}
/**
* 服务开发---获取ApiId
*
* @author Bellamy
* @since 2021-01-19
*/
@ApiOperation
(
value
=
"服务开发---获取ApiId"
,
notes
=
"服务开发---获取ApiId"
)
@PostMapping
(
value
=
"/getApiId"
)
public
JsonResult
getApiId
()
{
JsonResult
jsonResult
=
new
JsonResult
();
try
{
jsonResult
=
dmpApiServiceMangeService
.
get
FolderTree
(
projectId
,
orgCode
);
jsonResult
=
dmpApiServiceMangeService
.
get
ApiId
(
);
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
e
.
getMessage
());
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/bean/ApiInterfaceReq.java
View file @
86026ecd
...
...
@@ -18,7 +18,9 @@ import java.io.Serializable;
@ApiModel
(
value
=
"api基本信息"
)
public
class
ApiInterfaceReq
implements
Serializable
{
@ApiModelProperty
(
value
=
"Api类型:对应字典表key:10004 三方,10002 数据查询"
,
required
=
true
)
@NotNull
(
message
=
"Api类型不能为空"
)
public
String
apiType
;
@ApiModelProperty
(
value
=
"传输方式:0,http 1.https"
,
required
=
true
)
@NotNull
(
message
=
"传输方式不能为空"
)
public
Integer
apiProtocl
;
...
...
@@ -27,10 +29,6 @@ public class ApiInterfaceReq implements Serializable {
@NotNull
(
message
=
"加密方式不能为空"
)
public
Integer
signType
;
@ApiModelProperty
(
value
=
"Api类型:对应字典表key"
,
required
=
true
)
@NotNull
(
message
=
"Api类型不能为空"
)
public
String
apiType
;
@ApiModelProperty
(
value
=
"apiKey"
,
required
=
true
)
@NotNull
(
message
=
"apiKey不能为空"
)
public
String
apiKey
;
...
...
@@ -107,5 +105,4 @@ public class ApiInterfaceReq implements Serializable {
public
String
updateUser
;
@ApiModelProperty
(
value
=
"状态"
,
required
=
false
)
public
String
status
;
}
src/main/java/com/jz/dmp/modules/service/DmpApiServiceMangeService.java
View file @
86026ecd
...
...
@@ -105,4 +105,12 @@ public interface DmpApiServiceMangeService {
* @since 2021-02-25
*/
JsonResult
listCallApi
(
ApiInterfaceInfoListReq
req
)
throws
Exception
;
/**
* 服务开发---获取ApiId
*
* @author Bellamy
* @since 2021-01-19
*/
JsonResult
getApiId
()
throws
Exception
;
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpApiServiceMangeServiceImpl.java
View file @
86026ecd
...
...
@@ -216,6 +216,19 @@ public class DmpApiServiceMangeServiceImpl implements DmpApiServiceMangeService
return
result
;
}
/**
* 服务开发---获取ApiId
*
* @author Bellamy
* @since 2021-01-19
*/
@Override
public
JsonResult
getApiId
()
throws
Exception
{
String
url
=
gatewayUrl
+
GatewayApiConstant
.
getApiId
;
JsonResult
result
=
GatewayApiConstant
.
postRequest2GetData
(
url
,
""
);
return
result
;
}
/**
* 服务开发API列表
*
...
...
src/main/resources/templates/lxTaskJson.json
View file @
86026ecd
...
...
@@ -82,6 +82,8 @@
{
"params"
:
{
//
"version"
:
"1.0"
,
//版本
"treeId"
:
669
,
"projectId"
:
"31"
,
"taskId"
:
""
,
//任务id
...
...
@@ -104,6 +106,7 @@
"fieldMapping"
:
""
//字段映射关系
},
"reader"
:
{
"sourceDbId"
:
""
,
"dbConnection"
:
"mysql_dmp_demo_test"
,
//来源名称
"registerTableName"
:
"dmp_azkaban_exector_server_config"
,
"sourceHdfsPath"
:
""
,
//HDFS存储目录
...
...
@@ -144,6 +147,7 @@
]
},
"writer"
:
{
"targetDbId"
:
""
,
"targetDbConnection"
:
"mysql_dmp_demo"
,
"targetTable"
:
"dmp_azkaban_exector_server_config"
,
"targetFtpDir"
:
""
,
//文件所在目录
...
...
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