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
a6e6592e
Commit
a6e6592e
authored
Mar 10, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
离线修改
parent
24846237
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
OfflineSynchController.java
...es/controller/DataIntegration/OfflineSynchController.java
+2
-2
OfflineSynchServiceImpl.java
.../jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
+2
-1
DmpDevelopTaskMapper.xml
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
+17
-2
No files found.
src/main/java/com/jz/dmp/modules/controller/DataIntegration/OfflineSynchController.java
View file @
a6e6592e
...
@@ -266,12 +266,12 @@ public class OfflineSynchController {
...
@@ -266,12 +266,12 @@ public class OfflineSynchController {
}
}
/**
/**
* 保存离线任务数据
* 保存
/编辑
离线任务数据
*
*
* @return
* @return
* @author Bellamy
* @author Bellamy
*/
*/
@ApiOperation
(
value
=
"保存
离线任务数据"
,
notes
=
"保存
离线任务数据"
)
@ApiOperation
(
value
=
"保存
/编辑离线任务数据"
,
notes
=
"保存/编辑
离线任务数据"
)
@PostMapping
(
value
=
"/addSyncTask"
)
@PostMapping
(
value
=
"/addSyncTask"
)
public
JsonResult
addSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
public
JsonResult
addSyncTask
(
@RequestBody
@Validated
SyncDmpTaskAddReq
syncDmpTaskAddReq
)
throws
Exception
{
JsonResult
list
=
new
JsonResult
();
JsonResult
list
=
new
JsonResult
();
...
...
src/main/java/com/jz/dmp/modules/service/impl/OfflineSynchServiceImpl.java
View file @
a6e6592e
...
@@ -638,6 +638,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -638,6 +638,7 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
task
.
setTargetTableName
(
targetTable
);
task
.
setTargetTableName
(
targetTable
);
task
.
setSourceTableName
(
sourceTableName
);
task
.
setSourceTableName
(
sourceTableName
);
task
.
setSourceDbName
(
sourceDbName
);
task
.
setSourceDbName
(
sourceDbName
);
task
.
setSourceDbId
(
sourceDbId
);
List
<
DvTaskRuleT
>
list
=
new
ArrayList
<>();
List
<
DvTaskRuleT
>
list
=
new
ArrayList
<>();
//更新规则信息
//更新规则信息
List
<
Map
>
taskRules
=
(
List
<
Map
>)
body
.
get
(
"taskRules"
);
List
<
Map
>
taskRules
=
(
List
<
Map
>)
body
.
get
(
"taskRules"
);
...
@@ -647,8 +648,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
...
@@ -647,8 +648,8 @@ public class OfflineSynchServiceImpl implements OfflineSynchService {
task
.
setCreateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setCreateUserId
(
SessionUtils
.
getCurrentUserId
());
task
.
setCreateTime
(
new
Date
());
task
.
setCreateTime
(
new
Date
());
dmpDevelopTaskDao
.
insert
(
task
);
//新增任务数据
dmpDevelopTaskDao
.
insert
(
task
);
//新增任务数据
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
logger
.
info
(
"======== save sync task end ========"
);
logger
.
info
(
"======== save sync task end ========"
);
this
.
saveTaskHistory
(
task
);
//保存任务历史版本
//保存dmp数据校验规则信息
//保存dmp数据校验规则信息
settRuleInfo
(
taskId
,
taskRules
,
list
);
settRuleInfo
(
taskId
,
taskRules
,
list
);
}
else
{
}
else
{
...
...
src/main/resources/mapper/dmp/DmpDevelopTaskMapper.xml
View file @
a6e6592e
...
@@ -73,9 +73,9 @@
...
@@ -73,9 +73,9 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into dmp_develop_task(datasource_id, TASK_TYPE, TYPE, SCHEDULE_TYPE, IS_SUBMIT, TASK_DESC, SCRIPT, DATA_STATUS, CREATE_USER_ID, CREATE_TIME,
insert into dmp_develop_task(datasource_id, TASK_TYPE, TYPE, SCHEDULE_TYPE, IS_SUBMIT, TASK_DESC, SCRIPT, DATA_STATUS, CREATE_USER_ID, CREATE_TIME,
SOURCE_DB_ID,
UPDATE_USER_ID, UPDATE_TIME, TREE_ID, CHK_RESULT, SYNC_RESULT, CHK_TIME, SYNC_TIME, FLOW_HEADER, FLOW_JSON, VERSION, publish_version, IS_GZIPED,SOURCE_DB_NAME,SOURCE_TABLE_NAME,TARGET_DB_NAME,TARGET_TABLE_NAME)
UPDATE_USER_ID, UPDATE_TIME, TREE_ID, CHK_RESULT, SYNC_RESULT, CHK_TIME, SYNC_TIME, FLOW_HEADER, FLOW_JSON, VERSION, publish_version, IS_GZIPED,SOURCE_DB_NAME,SOURCE_TABLE_NAME,TARGET_DB_NAME,TARGET_TABLE_NAME)
values (#{datasourceId}, #{taskType}, #{type}, #{scheduleType}, #{isSubmit}, #{taskDesc}, #{data}, #{dataStatus}, #{createUserId}, #{createTime}, #{updateUserId},
values (#{datasourceId}, #{taskType}, #{type}, #{scheduleType}, #{isSubmit}, #{taskDesc}, #{data}, #{dataStatus}, #{createUserId}, #{createTime}, #{
sourceDbId}, #{
updateUserId},
#{updateTime}, #{treeId}, #{chkResult}, #{syncResult}, #{chkTime}, #{syncTime}, #{flowHeader}, #{flowJson}, #{version}, #{publishVersion,jdbcType=VARCHAR}, #{isGziped}, #{sourceDbName}, #{sourceTableName}, #{targetDbName}, #{targetTableName})
#{updateTime}, #{treeId}, #{chkResult}, #{syncResult}, #{chkTime}, #{syncTime}, #{flowHeader}, #{flowJson}, #{version}, #{publishVersion,jdbcType=VARCHAR}, #{isGziped}, #{sourceDbName}, #{sourceTableName}, #{targetDbName}, #{targetTableName})
</insert>
</insert>
...
@@ -148,6 +148,21 @@
...
@@ -148,6 +148,21 @@
<if
test=
"isGziped != null"
>
<if
test=
"isGziped != null"
>
IS_GZIPED = #{isGziped},
IS_GZIPED = #{isGziped},
</if>
</if>
<if
test=
"sourceDbId != null"
>
source_db_id = #{sourceDbId},
</if>
<if
test=
"sourceDbName != null and sourceTableName != '' "
>
source_db_name = #{sourceDbName},
</if>
<if
test=
"sourceTableName != null and sourceTableName !='' "
>
source_table_name = #{sourceTableName},
</if>
<if
test=
"targetDbName != null and targetDbName !='' "
>
target_db_name = #{targetDbName},
</if>
<if
test=
"targetTableName != null and targetTableName !='' "
>
target_table_name = #{targetTableName},
</if>
</set>
</set>
where ID = #{id}
where ID = #{id}
</update>
</update>
...
...
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