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
971994dc
Commit
971994dc
authored
Jan 11, 2021
by
mcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3eb74037
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
329 additions
and
52 deletions
+329
-52
DmpRealtimeSyncInfoDao.java
...n/java/com/jz/dmp/modules/dao/DmpRealtimeSyncInfoDao.java
+19
-0
DmpRealtimeSyncSelectTable.java
.../com/jz/dmp/modules/model/DmpRealtimeSyncSelectTable.java
+163
-0
RealTimeSyncDataSourceModel.java
...com/jz/dmp/modules/model/RealTimeSyncDataSourceModel.java
+31
-0
DmpRealtimeSyncInfoServiceImpl.java
.../modules/service/impl/DmpRealtimeSyncInfoServiceImpl.java
+101
-46
DmpRealtimeSyncInfoMapper.xml
src/main/resources/mapper/dmp/DmpRealtimeSyncInfoMapper.xml
+15
-6
No files found.
src/main/java/com/jz/dmp/modules/dao/DmpRealtimeSyncInfoDao.java
View file @
971994dc
...
...
@@ -5,6 +5,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceNameListDto;
import
com.jz.dmp.modules.controller.DataIntegration.bean.RealTimeSyncListDto
;
import
com.jz.dmp.modules.controller.DataIntegration.bean.RealTimeSyncListReq
;
import
com.jz.dmp.modules.model.DmpRealtimeSyncInfo
;
import
com.jz.dmp.modules.model.DmpRealtimeSyncSelectTable
;
import
com.jz.dmp.modules.model.RealTimeSyncDataSourceModel
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -131,4 +132,22 @@ public interface DmpRealtimeSyncInfoDao {
Map
queryBlackTableByDataSourceId
(
@Param
(
"srcDatasourceId"
)
String
srcDatasourceId
);
Map
selecltRealtimeSyncInfoByParams
(
Map
<
String
,
Object
>
queryParam
);
/**
* 添加实时任务黑名单表
*
* @return
* @author Bellamy
* @since 2021-01-11
*/
int
insertRealtimeBlackList
(
Map
blacklist
);
/**
* 新增实时任务已选择的表信息
*
* @return
* @author Bellamy
* @since 2021-01-11
*/
int
insertRealtimeSelectTable
(
DmpRealtimeSyncSelectTable
selectTable
);
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/model/DmpRealtimeSyncSelectTable.java
0 → 100644
View file @
971994dc
package
com
.
jz
.
dmp
.
modules
.
model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 实时同步任务已选择的表信息(DmpRealtimeSyncSelectTable)实体类
*
* @author Bellamy
* @since 2021-01-11 13:06:53
*/
@ApiModel
(
value
=
"实时同步任务已选择的表信息"
,
description
=
"实时同步任务已选择的表信息"
)
public
class
DmpRealtimeSyncSelectTable
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
87562703941786967L
;
/**
* selectTableId
*/
@ApiModelProperty
(
value
=
"selectTableId"
)
private
Long
selectTableId
;
/**
* 实时任务id
*/
@ApiModelProperty
(
value
=
"实时任务id"
)
private
Long
realtimeId
;
/**
* 脱敏字段
*/
@ApiModelProperty
(
value
=
"脱敏字段"
)
private
String
desensitizationField
;
/**
* 加密算法
*/
@ApiModelProperty
(
value
=
"加密算法"
)
private
String
arithmetic
;
/**
* 主键名称
*/
@ApiModelProperty
(
value
=
"主键名称"
)
private
String
pkName
;
/**
* 源数据表名称
*/
@ApiModelProperty
(
value
=
"源数据表名称"
)
private
String
srcTableName
;
/**
* 目标数据表名称
*/
@ApiModelProperty
(
value
=
"目标数据表名称"
)
private
String
targetTableName
;
/**
* 创建人
*/
@ApiModelProperty
(
value
=
"创建人"
)
private
String
crePerson
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
creTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
uptTime
;
/**
* 更新人
*/
@ApiModelProperty
(
value
=
"更新人"
)
private
String
uptPerson
;
public
Long
getSelectTableId
()
{
return
selectTableId
;
}
public
void
setSelectTableId
(
Long
selectTableId
)
{
this
.
selectTableId
=
selectTableId
;
}
public
Long
getRealtimeId
()
{
return
realtimeId
;
}
public
void
setRealtimeId
(
Long
realtimeId
)
{
this
.
realtimeId
=
realtimeId
;
}
public
String
getDesensitizationField
()
{
return
desensitizationField
;
}
public
void
setDesensitizationField
(
String
desensitizationField
)
{
this
.
desensitizationField
=
desensitizationField
;
}
public
String
getArithmetic
()
{
return
arithmetic
;
}
public
void
setArithmetic
(
String
arithmetic
)
{
this
.
arithmetic
=
arithmetic
;
}
public
String
getPkName
()
{
return
pkName
;
}
public
void
setPkName
(
String
pkName
)
{
this
.
pkName
=
pkName
;
}
public
String
getSrcTableName
()
{
return
srcTableName
;
}
public
void
setSrcTableName
(
String
srcTableName
)
{
this
.
srcTableName
=
srcTableName
;
}
public
String
getTargetTableName
()
{
return
targetTableName
;
}
public
void
setTargetTableName
(
String
targetTableName
)
{
this
.
targetTableName
=
targetTableName
;
}
public
String
getCrePerson
()
{
return
crePerson
;
}
public
void
setCrePerson
(
String
crePerson
)
{
this
.
crePerson
=
crePerson
;
}
public
Date
getCreTime
()
{
return
creTime
;
}
public
void
setCreTime
(
Date
creTime
)
{
this
.
creTime
=
creTime
;
}
public
Date
getUptTime
()
{
return
uptTime
;
}
public
void
setUptTime
(
Date
uptTime
)
{
this
.
uptTime
=
uptTime
;
}
public
String
getUptPerson
()
{
return
uptPerson
;
}
public
void
setUptPerson
(
String
uptPerson
)
{
this
.
uptPerson
=
uptPerson
;
}
}
\ No newline at end of file
src/main/java/com/jz/dmp/modules/model/RealTimeSyncDataSourceModel.java
View file @
971994dc
...
...
@@ -72,6 +72,13 @@ public class RealTimeSyncDataSourceModel {
*/
private
String
dataSourceTypeName
;
private
String
accessId
;
private
String
accessKey
;
/*
* 终端信息
* */
private
String
endpoint
;
public
Integer
getDatasourceType
()
{
return
datasourceType
;
...
...
@@ -176,4 +183,28 @@ public class RealTimeSyncDataSourceModel {
public
void
setDatasourceDesc
(
String
datasourceDesc
)
{
this
.
datasourceDesc
=
datasourceDesc
;
}
public
String
getAccessId
()
{
return
accessId
;
}
public
void
setAccessId
(
String
accessId
)
{
this
.
accessId
=
accessId
;
}
public
String
getAccessKey
()
{
return
accessKey
;
}
public
void
setAccessKey
(
String
accessKey
)
{
this
.
accessKey
=
accessKey
;
}
public
String
getEndpoint
()
{
return
endpoint
;
}
public
void
setEndpoint
(
String
endpoint
)
{
this
.
endpoint
=
endpoint
;
}
}
src/main/java/com/jz/dmp/modules/service/impl/DmpRealtimeSyncInfoServiceImpl.java
View file @
971994dc
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/dmp/DmpRealtimeSyncInfoMapper.xml
View file @
971994dc
...
...
@@ -374,6 +374,9 @@
ds.db_name as dbName,
ds.host,
ds.port,
ds.endpoint,
ds,access_key as accessKey,
ds.access_id as accessId,
dsdt.datasource_type as datasourceTypeName,
dsdt.driver_class_name as driverName
from dmp_syncing_datasource ds
...
...
@@ -410,7 +413,6 @@
t1.tree_id as treeId,
t2.name as treeName,
t1.status,
date_format(t1.update_time,'%Y-%m-%d %H:%i:%s') as updateTime,
t1.src_datasource_id as srcDatasourceId,
t1.src_datasource_name as srcDatasourceName,
t1.src_database_type as srcDatabaseType,
...
...
@@ -419,19 +421,26 @@
t1.target_database_type as targetDatabaseType
FROM dmp_realtime_sync_info t1
left join dmp_navigation_tree t2 on t1.tree_id=t2.id
left join dmp_syncing_datasource t3 ON t1.src_datasource_id = t3.ID
left join dmp_syncing_datasource t4 ON t1.target_datasource_id = t4.ID
where 1=1
<if
test=
"projectId !=null"
>
and t1.project_id=#{projectId}
</if>
<if
test=
"taskStatus != null and taskStatus != '' "
>
AND t1.status = #{taskStatus}
</if>
<if
test=
"treeId != null and treeId != '' "
>
AND t1.id = #{treeId}
</if>
<if
test=
"targetDatabaseTypeId != null and targetDatabaseTypeId != '' "
>
AND t4.DATASOURCE_TYPE = #{targetDatabaseTypeId}
</if>
<if
test=
"sourceDatabaseTypeId != null and sourceDatabaseTypeId != ''"
>
AND t3.DATASOURCE_TYPE = #{sourceDatabaseTypeId}
</if>
<if
test=
"sourceDatabaseName != null and sourceDatabaseName != '' "
>
AND t1.src_datasource_name like CONCAT('%', #{sourceDatabaseName}, '%')
</if>
<if
test=
"targetDatabaseName != null and targetDatabaseName != '' "
>
AND t1.target_datasource_name like CONCAT('%', #{targetDatabaseName}, '%')
</if>
<if
test=
"treeName != null and treeName != '' "
>
AND t2.name like CONCAT('%', #{treeName}, '%')
</if>
<if
test=
"sourceConnectorName != null "
>
AND t1.connector_job_id = #{sourceConnectorName}
</if>
<if
test=
"srcDataSourceId != null"
>
AND t1.src_datasource_id = #{srcDataSourceId}
</if>
order by t1.create_time desc
</select>
<!--添加实时任务黑名单表-->
<insert
id=
"insertRealtimeBlackList"
parameterType=
"java.util.Map"
>
insert into dmp_realtime_sync_blacklist_table_info (realtime_id,datasource_id,blacklist_table,cre_time,cre_person)
values(#{realtimeId},#{datasourceId},#{blacklistTable},#{creTime},#{crePerson})
</insert>
<!--新增实时任务已选择的表信息-->
<insert
id=
"insertRealtimeSelectTable"
parameterType=
"com.jz.dmp.modules.model.DmpRealtimeSyncSelectTable"
>
insert into dmp_realtime_sync_select_table (realtime_id,desensitization_field,arithmetic,pk_name,src_table_name,target_table_name,cre_time,cre_person)
values(#{realtimeId},#{desensitizationField},#{arithmetic},#{pkName},#{srcTableName},#{targetTableName},#{creTime},#{crePerson})
</insert>
</mapper>
\ No newline at end of file
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