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
12d1611a
Commit
12d1611a
authored
Mar 01, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据服务bug修改
parent
86026ecd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
207 additions
and
148 deletions
+207
-148
GatewayApiConstant.java
src/main/java/com/jz/common/constant/GatewayApiConstant.java
+50
-16
DmpApiMangeController.java
...modules/controller/dataService/DmpApiMangeController.java
+5
-5
DmpApiServiceMangeController.java
.../controller/dataService/DmpApiServiceMangeController.java
+20
-0
CreateFolderReq.java
.../modules/controller/dataService/bean/CreateFolderReq.java
+47
-0
DmpApiServiceMangeService.java
...com/jz/dmp/modules/service/DmpApiServiceMangeService.java
+9
-0
DmpApiMangeServiceImpl.java
...m/jz/dmp/modules/service/impl/DmpApiMangeServiceImpl.java
+35
-102
DmpApiServiceMangeServiceImpl.java
...p/modules/service/impl/DmpApiServiceMangeServiceImpl.java
+25
-9
DmpOrgMangeServiceImpl.java
...m/jz/dmp/modules/service/impl/DmpOrgMangeServiceImpl.java
+12
-12
lxTaskJson.json
src/main/resources/templates/lxTaskJson.json
+4
-4
No files found.
src/main/java/com/jz/common/constant/GatewayApiConstant.java
View file @
12d1611a
...
...
@@ -37,7 +37,7 @@ public class GatewayApiConstant {
//删除APIurl
public
static
final
String
delApi
=
"/api/interface/delDMPApiInterface"
;
//根据apiid获取API详情url
public
static
final
String
getApiInfo
=
"/api/interface/getApi
Interface
Detail"
;
public
static
final
String
getApiInfo
=
"/api/interface/getApiDetail"
;
//授权给组织url
public
static
final
String
apiAuthToOrg
=
"/api/auth/dmp-auth-api"
;
//测试url
...
...
@@ -75,10 +75,13 @@ public class GatewayApiConstant {
//获取文件夹树
public
static
final
String
folderTree
=
"/api/producer/getFileCatalog"
;
//
获取文件夹树
//
服务开发---获取ApiId
public
static
final
String
getApiId
=
"/api/producer/getCustomApiId"
;
//服务开发---获取ApiId
//创建项目文件夹
public
static
final
String
createProjectFolder
=
"/api/producer/createProjectFolder"
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
GatewayApiConstant
.
class
);
/*
...
...
@@ -95,12 +98,15 @@ public class GatewayApiConstant {
Map
jsonObject
=
JSONObject
.
parseObject
(
resultData
);
if
(
jsonObject
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
jsonObject
.
get
(
"code"
).
toString
()))
{
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
if
(
jsonObject
.
containsKey
(
"data"
))
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
else
return
JsonResult
.
ok
();
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -109,22 +115,50 @@ public class GatewayApiConstant {
/*
* get 请求获取数据
* */
public
static
JsonResult
getRequest2GetData
(
String
url
,
Map
params
)
{
public
static
JsonResult
getRequest2GetData
(
String
url
,
Map
params
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
String
returnData
=
HttpClientUtils
.
getJsonForParam
(
url
,
params
);
if
(
StringUtils
.
isEmpty
(
returnData
))
{
throw
new
RuntimeException
(
"
查询失败
!"
);
throw
new
RuntimeException
(
"
failed
!"
);
}
logger
.
info
(
"#################响应结果{}"
+
returnData
);
Map
map
=
JSONObject
.
parseObject
(
returnData
);
if
(
map
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
map
.
get
(
"code"
).
toString
()))
{
return
JsonResult
.
ok
(
map
.
get
(
"data"
));
Map
jsonObject
=
JSONObject
.
parseObject
(
returnData
);
if
(
jsonObject
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
jsonObject
.
get
(
"code"
).
toString
()))
{
if
(
jsonObject
.
containsKey
(
"data"
))
{
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
else
{
return
JsonResult
.
ok
();
}
}
}
if
(
jsonObject
.
containsKey
(
"msg"
))
{
logger
.
info
(
jsonObject
.
get
(
"msg"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"msg"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
}
/*
* get 请求
* */
public
static
JsonResult
getRequest
(
String
url
,
Map
params
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
String
returnData
=
HttpClientUtils
.
getJsonForParam
(
url
,
params
);
if
(
StringUtils
.
isEmpty
(
returnData
))
{
throw
new
RuntimeException
(
"failed!"
);
}
logger
.
info
(
"#################响应结果{}"
+
returnData
);
Map
jsonObject
=
JSONObject
.
parseObject
(
returnData
);
if
(
jsonObject
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
jsonObject
.
get
(
"code"
).
toString
()))
{
return
JsonResult
.
ok
();
}
}
if
(
map
.
containsKey
(
"message
"
))
{
logger
.
info
(
map
.
get
(
"message
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"message
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"msg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"msg
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"msg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpApiMangeController.java
View file @
12d1611a
...
...
@@ -135,14 +135,14 @@ public class DmpApiMangeController {
*/
@ApiOperation
(
value
=
"获取API详情"
,
notes
=
"获取API详情"
)
@GetMapping
(
value
=
"/getApiInfo"
)
@ApiImplicitParam
(
name
=
"
id"
,
value
=
"ApiId
"
,
required
=
true
)
public
JsonResult
getApiInfoByApiId
(
@RequestParam
String
id
,
HttpServletRequest
httpRequest
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"api
Id
不能为空!"
);
@ApiImplicitParam
(
name
=
"
apiKey"
,
value
=
"apiKey
"
,
required
=
true
)
public
JsonResult
getApiInfoByApiId
(
@RequestParam
String
apiKey
,
HttpServletRequest
httpRequest
)
{
if
(
StringUtils
.
isEmpty
(
apiKey
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"api
Key
不能为空!"
);
}
JsonResult
jsonResult
=
new
JsonResult
();
try
{
jsonResult
=
dmpApiMangeService
.
queryApiInfoByApiId
(
id
);
jsonResult
=
dmpApiMangeService
.
queryApiInfoByApiId
(
apiKey
);
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
e
.
getMessage
());
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpApiServiceMangeController.java
View file @
12d1611a
...
...
@@ -331,6 +331,26 @@ public class DmpApiServiceMangeController {
return
jsonResult
;
}
/**
* 创建项目文件夹
*
* @author Bellamy
* @since 2021-02-24
*/
@ApiOperation
(
value
=
"创建项目文件夹"
,
notes
=
"创建项目文件夹"
)
@PostMapping
(
value
=
"/createProjectFolder"
)
public
JsonResult
createProjectFolder
(
@RequestBody
@Validated
CreateFolderReq
req
,
HttpServletRequest
httpRequest
)
{
JsonResult
jsonResult
=
new
JsonResult
();
try
{
jsonResult
=
dmpApiServiceMangeService
.
createProjectFolder
(
req
);
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
e
.
getMessage
());
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
e
.
printStackTrace
();
}
return
jsonResult
;
}
/**
* 获取数据源表字段
*
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/bean/CreateFolderReq.java
0 → 100644
View file @
12d1611a
package
com
.
jz
.
dmp
.
modules
.
controller
.
dataService
.
bean
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @author Bellamy
* @PACKAGE_NAME: com.jz.dm.models.req
* @PROJECT_NAME: jz-dm-parent
* @NAME: CreateFolderReq
* @DATE: 2021-1-27/18:12
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@Data
@ApiModel
(
"创建文件请求体"
)
public
class
CreateFolderReq
implements
Serializable
{
@ApiModelProperty
(
value
=
"项目id"
,
required
=
false
)
private
Long
projectId
;
@ApiModelProperty
(
value
=
"组织编码"
,
required
=
false
)
private
String
orgCode
;
@ApiModelProperty
(
value
=
"父类文件夹id ,创建同级不传"
,
required
=
false
)
private
Long
parentId
;
@ApiModelProperty
(
value
=
"文件夹名称"
,
required
=
true
)
@NotNull
(
message
=
"文件夹名称不能为空!"
)
@NotEmpty
(
message
=
"文件夹名称不能为空!"
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"文件来源:,1 API制做,2 组织创建"
,
required
=
true
)
@NotEmpty
(
message
=
"文件来源不能为空"
)
@NotNull
(
message
=
"文件来源不能为空"
)
private
String
fileSource
;
@ApiModelProperty
(
value
=
"创建用户"
,
required
=
false
)
private
String
createUser
;
}
src/main/java/com/jz/dmp/modules/service/DmpApiServiceMangeService.java
View file @
12d1611a
...
...
@@ -3,6 +3,7 @@ package com.jz.dmp.modules.service;
import
com.jz.common.constant.JsonResult
;
import
com.jz.dmp.modules.controller.dataService.bean.ApiInterfaceInfoListReq
;
import
com.jz.dmp.modules.controller.dataService.bean.ApiInterfaceReq
;
import
com.jz.dmp.modules.controller.dataService.bean.CreateFolderReq
;
import
com.jz.dmp.modules.controller.dataService.bean.MakeBigDataApiReq
;
import
com.jz.dmp.modules.model.DvRuleT
;
...
...
@@ -113,4 +114,12 @@ public interface DmpApiServiceMangeService {
* @since 2021-01-19
*/
JsonResult
getApiId
()
throws
Exception
;
/**
* 创建项目文件夹
*
* @author Bellamy
* @since 2021-02-24
*/
JsonResult
createProjectFolder
(
CreateFolderReq
req
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpApiMangeServiceImpl.java
View file @
12d1611a
...
...
@@ -53,9 +53,9 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -85,9 +85,9 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -115,9 +115,9 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -131,27 +131,11 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
*/
@Override
public
JsonResult
delApiInfo
(
String
apiKey
,
String
type
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
String
url
=
gatewayUrl
+
GatewayApiConstant
.
delApi
;
Map
params
=
new
HashMap
();
params
.
put
(
"apiKey"
,
apiKey
);
params
.
put
(
"type"
,
type
);
String
returnData
=
HttpClientUtils
.
getJsonForParam
(
url
,
params
);
if
(
StringUtils
.
isEmpty
(
returnData
))
{
throw
new
RuntimeException
(
"删除失败!"
);
}
logger
.
info
(
"#################响应结果{}"
+
returnData
);
Map
map
=
JSONObject
.
parseObject
(
returnData
);
if
(
map
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
map
.
get
(
"code"
).
toString
()))
{
return
JsonResult
.
ok
();
}
}
if
(
map
.
containsKey
(
"message"
))
{
logger
.
info
(
map
.
get
(
"message"
).
toString
());
result
.
setMessage
(
map
.
get
(
"message"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
JsonResult
result
=
GatewayApiConstant
.
getRequest
(
url
,
params
);
return
result
;
}
...
...
@@ -163,28 +147,11 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
*/
@Override
public
JsonResult
queryApiInfoByApiId
(
String
id
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
String
url
=
gatewayUrl
+
GatewayApiConstant
.
getApiInfo
;
Map
params
=
new
HashMap
();
params
.
put
(
"id"
,
id
);
String
resultData
=
HttpClientUtils
.
post
(
url
,
JSONObject
.
toJSONString
(
params
));
if
(
StringUtils
.
isEmpty
(
resultData
))
{
throw
new
RuntimeException
(
"查询失败!"
);
}
logger
.
info
(
"#################响应结果数据{}"
+
resultData
);
Map
jsonObject
=
JSONObject
.
parseObject
(
resultData
);
if
(
jsonObject
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
jsonObject
.
get
(
"code"
).
toString
()))
{
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
}
if
(
jsonObject
.
containsKey
(
"message"
))
{
logger
.
info
(
jsonObject
.
get
(
"message"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"message"
).
toString
());
}
params
.
put
(
"apiKey"
,
id
);
JsonResult
result
=
GatewayApiConstant
.
postRequest2GetData
(
url
,
JSONObject
.
toJSONString
(
params
));
return
result
;
}
...
...
@@ -211,10 +178,10 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
@@ -255,10 +222,10 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
@@ -287,9 +254,9 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
JsonResult
.
ok
(
map
.
get
(
"data"
));
}
}
if
(
map
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
map
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
essage
"
).
toString
());
if
(
map
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -304,28 +271,12 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
*/
@Override
public
JsonResult
apiPublishCancel
(
String
id
,
Boolean
optStatus
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
String
url
=
gatewayUrl
+
GatewayApiConstant
.
apiPublishCancel
;
Map
params
=
new
HashMap
();
params
.
put
(
"id"
,
id
);
params
.
put
(
"optStatus"
,
optStatus
);
String
returnData
=
HttpClientUtils
.
getJsonForParam
(
url
,
params
);
if
(
StringUtils
.
isEmpty
(
returnData
))
{
throw
new
RuntimeException
(
"失败!"
);
}
logger
.
info
(
"#################响应结果{}"
+
returnData
);
Map
map
=
JSONObject
.
parseObject
(
returnData
);
if
(
map
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
map
.
get
(
"code"
).
toString
()))
{
return
JsonResult
.
ok
();
}
}
if
(
map
.
containsKey
(
"message"
))
{
logger
.
info
(
map
.
get
(
"message"
).
toString
());
result
.
setMessage
(
map
.
get
(
"message"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
JsonResult
result
=
GatewayApiConstant
.
getRequest
(
url
,
params
);
return
result
;
}
...
...
@@ -338,26 +289,8 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
*/
@Override
public
JsonResult
saltReset
(
SaltResetReq
req
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
String
url
=
gatewayUrl
+
GatewayApiConstant
.
saltReset
;
String
resultData
=
HttpClientUtils
.
post
(
url
,
JSONObject
.
toJSONString
(
req
));
if
(
StringUtils
.
isEmpty
(
resultData
))
{
throw
new
RuntimeException
(
"查询失败!"
);
}
logger
.
info
(
"#################响应结果数据{}"
+
resultData
);
Map
jsonObject
=
JSONObject
.
parseObject
(
resultData
);
if
(
jsonObject
.
containsKey
(
"code"
))
{
if
(
"200"
.
equals
(
jsonObject
.
get
(
"code"
).
toString
()))
{
result
.
setData
(
jsonObject
.
get
(
"data"
));
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"message"
))
{
logger
.
info
(
jsonObject
.
get
(
"message"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"message"
).
toString
());
}
JsonResult
result
=
GatewayApiConstant
.
postRequest2GetData
(
url
,
JSONObject
.
toJSONString
(
req
));
return
result
;
}
...
...
@@ -385,10 +318,10 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
@@ -417,10 +350,10 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
@@ -450,9 +383,9 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
JsonResult
.
ok
();
}
}
if
(
map
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
map
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
essage
"
).
toString
());
if
(
map
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -484,10 +417,10 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpApiServiceMangeServiceImpl.java
View file @
12d1611a
...
...
@@ -10,6 +10,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.SourceDbNameListDto;
import
com.jz.dmp.modules.controller.dataService.bean.ApiInterfaceInfoListReq
;
import
com.jz.dmp.modules.controller.dataService.bean.ApiInterfaceReq
;
import
com.jz.common.constant.GatewayApiConstant
;
import
com.jz.dmp.modules.controller.dataService.bean.CreateFolderReq
;
import
com.jz.dmp.modules.controller.dataService.bean.MakeBigDataApiReq
;
import
com.jz.dmp.modules.dao.OfflineSynchDao
;
import
com.jz.dmp.modules.service.DmpApiServiceMangeService
;
...
...
@@ -97,10 +98,10 @@ public class DmpApiServiceMangeServiceImpl implements DmpApiServiceMangeService
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
@@ -137,10 +138,10 @@ public class DmpApiServiceMangeServiceImpl implements DmpApiServiceMangeService
return
result
;
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
}
return
result
;
}
...
...
@@ -229,6 +230,21 @@ public class DmpApiServiceMangeServiceImpl implements DmpApiServiceMangeService
return
result
;
}
/**
* 创建项目文件夹
*
* @param req
* @author Bellamy
* @since 2021-02-24
*/
@Override
public
JsonResult
createProjectFolder
(
CreateFolderReq
req
)
throws
Exception
{
String
url
=
gatewayUrl
+
GatewayApiConstant
.
createProjectFolder
;
req
.
setCreateUser
(
SessionUtils
.
getCurrentUserName
());
JsonResult
result
=
GatewayApiConstant
.
postRequest2GetData
(
url
,
JSONObject
.
toJSONString
(
req
));
return
result
;
}
/**
* 服务开发API列表
*
...
...
@@ -273,9 +289,9 @@ public class DmpApiServiceMangeServiceImpl implements DmpApiServiceMangeService
return
JsonResult
.
ok
(
map
.
get
(
"data"
));
}
}
if
(
map
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
map
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
essage
"
).
toString
());
if
(
map
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
src/main/java/com/jz/dmp/modules/service/impl/DmpOrgMangeServiceImpl.java
View file @
12d1611a
...
...
@@ -59,9 +59,9 @@ public class DmpOrgMangeServiceImpl implements DmpOrgMangeService {
return
JsonResult
.
ok
(
jsonObject
.
get
(
"data"
));
}
}
if
(
jsonObject
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
essage
"
).
toString
());
if
(
jsonObject
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
jsonObject
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -117,9 +117,9 @@ public class DmpOrgMangeServiceImpl implements DmpOrgMangeService {
return
JsonResult
.
ok
();
}
}
if
(
map
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
map
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
essage
"
).
toString
());
if
(
map
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -150,9 +150,9 @@ public class DmpOrgMangeServiceImpl implements DmpOrgMangeService {
return
JsonResult
.
ok
();
}
}
if
(
map
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
map
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
essage
"
).
toString
());
if
(
map
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
@@ -182,9 +182,9 @@ public class DmpOrgMangeServiceImpl implements DmpOrgMangeService {
return
JsonResult
.
ok
(
map
.
get
(
"data"
));
}
}
if
(
map
.
containsKey
(
"m
essage
"
))
{
logger
.
info
(
map
.
get
(
"m
essage
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
essage
"
).
toString
());
if
(
map
.
containsKey
(
"m
sg
"
))
{
logger
.
info
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setMessage
(
map
.
get
(
"m
sg
"
).
toString
());
result
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
}
return
result
;
...
...
src/main/resources/templates/lxTaskJson.json
View file @
12d1611a
...
...
@@ -102,8 +102,8 @@
"executorMemory"
:
"1"
,
//分配任务内存
"driverMemory"
:
""
,
//分配任务内存
"executorCore"
:
"1"
,
//单executor的cpu数
"driverCore"
:
"1"
,
//单executor的cpu数
"fieldMapping"
:
""
//字段映射关系
"driverCore"
:
"1"
//单executor的cpu数
//
"fieldMapping"
:
""
//字段映射关系
},
"reader"
:
{
"sourceDbId"
:
""
,
...
...
@@ -219,8 +219,8 @@
},
"mappingRelation"
:[
{
"source"
:
""
,
"target"
:
""
"source
Field
"
:
""
,
"target
Field
"
:
""
}
]
},
...
...
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