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
c6268406
Commit
c6268406
authored
Jan 11, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
330d5784
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
188 additions
and
53 deletions
+188
-53
RealTimeSyncController.java
...es/controller/DataIntegration/RealTimeSyncController.java
+43
-0
DmpRealtimeSyncInfoService.java
...om/jz/dmp/modules/service/DmpRealtimeSyncInfoService.java
+10
-1
DmpRealtimeSyncInfoServiceImpl.java
.../modules/service/impl/DmpRealtimeSyncInfoServiceImpl.java
+134
-52
realtime.json
src/main/resources/realtime.json
+1
-0
No files found.
src/main/java/com/jz/dmp/modules/controller/DataIntegration/RealTimeSyncController.java
View file @
c6268406
...
...
@@ -228,6 +228,10 @@ public class RealTimeSyncController {
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"targetDataSourceId"
).
toString
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"目标数据源id不能为空!"
);
}
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"treeId"
).
toString
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"业务节点id不能为空!"
);
}
//异步提交
Thread
thread
=
new
Thread
(
new
Runnable
()
{
@Override
...
...
@@ -243,4 +247,43 @@ public class RealTimeSyncController {
return
new
JsonResult
();
}
/**
* 编辑实时同步任务
*
* @return
* @author Bellamy
* @since 2021-01-08
*/
@ApiOperation
(
value
=
"编辑实时同步任务"
,
notes
=
"编辑实时同步任务"
)
@PostMapping
(
value
=
"/updateTask"
)
public
JsonResult
updateTask
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
httpRequest
)
throws
Exception
{
logger
.
info
(
"################请求参数{}"
+
params
.
toString
()
+
"############"
);
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"projectId"
).
toString
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"项目id不能为空!"
);
}
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"srcDataSourceId"
).
toString
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"来源数据源id不能为空!"
);
}
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"targetDataSourceId"
).
toString
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"目标数据源id不能为空!"
);
}
if
(
StringUtils
.
isEmpty
(
params
.
get
(
"taskId"
).
toString
()))
{
return
new
JsonResult
(
ResultCode
.
PARAMS_ERROR
,
"任务id不能为空!"
);
}
//异步提交
Thread
thread
=
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
dmpRealtimeSyncInfoService
.
updateRealTimeTask
(
params
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
});
thread
.
start
();
return
new
JsonResult
();
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/DmpRealtimeSyncInfoService.java
View file @
c6268406
...
...
@@ -111,5 +111,14 @@ public interface DmpRealtimeSyncInfoService {
* @author Bellamy
* @since 2021-01-08
*/
boolean
addRealTimeTask
(
Map
<
String
,
Object
>
params
)
throws
Exception
;
JsonResult
addRealTimeTask
(
Map
<
String
,
Object
>
params
)
throws
Exception
;
/**
* 编辑实时同步任务
*
* @return
* @author Bellamy
* @since 2021-01-08
*/
JsonResult
updateRealTimeTask
(
Map
<
String
,
Object
>
params
)
throws
Exception
;
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/service/impl/DmpRealtimeSyncInfoServiceImpl.java
View file @
c6268406
This diff is collapsed.
Click to expand it.
src/main/resources/realtime.json
View file @
c6268406
{
"projectId"
:
31
,
"treeId"
:
1
,
"srcDataSourceId"
:
205
,
"targetDataSourceId"
:
202
,
"sourceName"
:
"test34"
,
...
...
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