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
27d738ad
Commit
27d738ad
authored
Feb 08, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
3ac7ab42
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
2 deletions
+73
-2
GatewayApiConstant.java
src/main/java/com/jz/common/constant/GatewayApiConstant.java
+3
-0
RealTimeSyncController.java
...es/controller/DataIntegration/RealTimeSyncController.java
+4
-2
DmpApiMangeController.java
...modules/controller/dataService/DmpApiMangeController.java
+25
-0
DmpApiMangeService.java
...n/java/com/jz/dmp/modules/service/DmpApiMangeService.java
+7
-0
DmpApiMangeServiceImpl.java
...m/jz/dmp/modules/service/impl/DmpApiMangeServiceImpl.java
+34
-0
No files found.
src/main/java/com/jz/common/constant/GatewayApiConstant.java
View file @
27d738ad
...
@@ -65,4 +65,7 @@ public class GatewayApiConstant {
...
@@ -65,4 +65,7 @@ public class GatewayApiConstant {
//API计量--API未调用列表url
//API计量--API未调用列表url
public
static
final
String
notCalledList
=
"/api/interface/listUnCallApiInterface"
;
public
static
final
String
notCalledList
=
"/api/interface/listUnCallApiInterface"
;
//服务发布/服务取消url
public
static
final
String
apiPublishCancel
=
"/api/producer/optionApiIssueStatus"
;
}
}
src/main/java/com/jz/dmp/modules/controller/DataIntegration/RealTimeSyncController.java
View file @
27d738ad
...
@@ -89,10 +89,12 @@ public class RealTimeSyncController {
...
@@ -89,10 +89,12 @@ public class RealTimeSyncController {
DmpRealtimeSyncInfo
dmpRealtimeSyncInfo
=
list
.
get
(
i
);
DmpRealtimeSyncInfo
dmpRealtimeSyncInfo
=
list
.
get
(
i
);
String
srcTopicName
=
dmpRealtimeSyncInfo
.
getSrcTopicName
();
String
srcTopicName
=
dmpRealtimeSyncInfo
.
getSrcTopicName
();
System
.
out
.
println
(
srcTopicName
);
System
.
out
.
println
(
srcTopicName
);
logger
.
info
(
"############正常执行表数据id........"
+
ids
[
i
]);
logger
.
info
(
"############正常执行表数据id
{}
........"
+
ids
[
i
]);
String
shellPath
=
"/app/bigdata-app/scripts/trigger_straming.sh"
;
String
shellPath
=
"/app/bigdata-app/scripts/trigger_straming.sh"
;
boolean
flag
=
CmdUtils
.
callShell
(
shellPath
,
srcTopicName
);
boolean
flag
=
CmdUtils
.
callShell
(
shellPath
,
srcTopicName
);
logger
.
info
(
"############"
+
flag
);
if
(
flag
){
logger
.
info
(
"############执行成功{}"
+
flag
);
}
}
}
}
}
return
new
JsonResult
();
return
new
JsonResult
();
...
...
src/main/java/com/jz/dmp/modules/controller/dataService/DmpApiMangeController.java
View file @
27d738ad
...
@@ -240,4 +240,29 @@ public class DmpApiMangeController {
...
@@ -240,4 +240,29 @@ public class DmpApiMangeController {
}
}
return
jsonResult
;
return
jsonResult
;
}
}
/**
* 服务发布/服务取消
*
* @author Bellamy
* @since 2021-02-07
*/
@ApiOperation
(
value
=
"服务发布/服务取消"
,
notes
=
"服务发布/服务取消"
)
@GetMapping
(
value
=
"/apiPublishCancel"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
)
public
JsonResult
apiPublishCancel
(
@RequestParam
String
id
,
@RequestParam
(
name
=
"optStatus"
)
Boolean
optStatus
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
JsonResult
.
error
(
ResultCode
.
PARAMS_ERROR
,
"id不能为空!"
);
}
JsonResult
jsonResult
=
new
JsonResult
();
try
{
jsonResult
=
dmpApiMangeService
.
apiPublishCancel
(
id
,
optStatus
);
}
catch
(
Exception
e
)
{
jsonResult
.
setMessage
(
e
.
getMessage
());
jsonResult
.
setCode
(
ResultCode
.
INTERNAL_SERVER_ERROR
);
e
.
printStackTrace
();
}
return
jsonResult
;
}
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/DmpApiMangeService.java
View file @
27d738ad
...
@@ -83,4 +83,11 @@ public interface DmpApiMangeService {
...
@@ -83,4 +83,11 @@ public interface DmpApiMangeService {
* @since 2021-01-19
* @since 2021-01-19
*/
*/
JsonResult
getAuthOrgList
(
String
key
)
throws
Exception
;
JsonResult
getAuthOrgList
(
String
key
)
throws
Exception
;
/**
* @Description:服务发布/服务取消
* @author Bellamy
* @since 2021-02-07
*/
JsonResult
apiPublishCancel
(
String
id
,
Boolean
optStatus
)
throws
Exception
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpApiMangeServiceImpl.java
View file @
27d738ad
...
@@ -314,4 +314,38 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
...
@@ -314,4 +314,38 @@ public class DmpApiMangeServiceImpl implements DmpApiMangeService {
return
result
;
return
result
;
}
}
/**
* @param id
* @param optStatus
* @Description:服务发布/服务取消
* @author Bellamy
* @since 2021-02-07
*/
@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
);
}
return
result
;
}
}
}
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