Commit 971994dc authored by mcb's avatar mcb

no message

parent 3eb74037
...@@ -5,6 +5,7 @@ import com.jz.dmp.modules.controller.DataIntegration.bean.DataSourceNameListDto; ...@@ -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.RealTimeSyncListDto;
import com.jz.dmp.modules.controller.DataIntegration.bean.RealTimeSyncListReq; import com.jz.dmp.modules.controller.DataIntegration.bean.RealTimeSyncListReq;
import com.jz.dmp.modules.model.DmpRealtimeSyncInfo; import com.jz.dmp.modules.model.DmpRealtimeSyncInfo;
import com.jz.dmp.modules.model.DmpRealtimeSyncSelectTable;
import com.jz.dmp.modules.model.RealTimeSyncDataSourceModel; import com.jz.dmp.modules.model.RealTimeSyncDataSourceModel;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -131,4 +132,22 @@ public interface DmpRealtimeSyncInfoDao { ...@@ -131,4 +132,22 @@ public interface DmpRealtimeSyncInfoDao {
Map queryBlackTableByDataSourceId(@Param("srcDatasourceId") String srcDatasourceId); Map queryBlackTableByDataSourceId(@Param("srcDatasourceId") String srcDatasourceId);
Map selecltRealtimeSyncInfoByParams(Map<String, Object> queryParam); 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
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
...@@ -72,6 +72,13 @@ public class RealTimeSyncDataSourceModel { ...@@ -72,6 +72,13 @@ public class RealTimeSyncDataSourceModel {
*/ */
private String dataSourceTypeName; private String dataSourceTypeName;
private String accessId;
private String accessKey;
/*
* 终端信息
* */
private String endpoint;
public Integer getDatasourceType() { public Integer getDatasourceType() {
return datasourceType; return datasourceType;
...@@ -176,4 +183,28 @@ public class RealTimeSyncDataSourceModel { ...@@ -176,4 +183,28 @@ public class RealTimeSyncDataSourceModel {
public void setDatasourceDesc(String datasourceDesc) { public void setDatasourceDesc(String datasourceDesc) {
this.datasourceDesc = 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;
}
} }
...@@ -374,6 +374,9 @@ ...@@ -374,6 +374,9 @@
ds.db_name as dbName, ds.db_name as dbName,
ds.host, ds.host,
ds.port, ds.port,
ds.endpoint,
ds,access_key as accessKey,
ds.access_id as accessId,
dsdt.datasource_type as datasourceTypeName, dsdt.datasource_type as datasourceTypeName,
dsdt.driver_class_name as driverName dsdt.driver_class_name as driverName
from dmp_syncing_datasource ds from dmp_syncing_datasource ds
...@@ -410,7 +413,6 @@ ...@@ -410,7 +413,6 @@
t1.tree_id as treeId, t1.tree_id as treeId,
t2.name as treeName, t2.name as treeName,
t1.status, t1.status,
date_format(t1.update_time,'%Y-%m-%d %H:%i:%s') as updateTime,
t1.src_datasource_id as srcDatasourceId, t1.src_datasource_id as srcDatasourceId,
t1.src_datasource_name as srcDatasourceName, t1.src_datasource_name as srcDatasourceName,
t1.src_database_type as srcDatabaseType, t1.src_database_type as srcDatabaseType,
...@@ -419,19 +421,26 @@ ...@@ -419,19 +421,26 @@
t1.target_database_type as targetDatabaseType t1.target_database_type as targetDatabaseType
FROM dmp_realtime_sync_info t1 FROM dmp_realtime_sync_info t1
left join dmp_navigation_tree t2 on t1.tree_id=t2.id 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 where 1=1
<if test="projectId !=null">and t1.project_id=#{projectId}</if> <if test="projectId !=null">and t1.project_id=#{projectId}</if>
<if test="taskStatus != null and taskStatus != '' "> AND t1.status = #{taskStatus} </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="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="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="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="treeName != null and treeName != '' "> AND t2.name like CONCAT('%', #{treeName}, '%') </if>
<if test="sourceConnectorName != null "> AND t1.connector_job_id = #{sourceConnectorName} </if> <if test="sourceConnectorName != null "> AND t1.connector_job_id = #{sourceConnectorName} </if>
<if test="srcDataSourceId != null"> AND t1.src_datasource_id = #{srcDataSourceId}</if> <if test="srcDataSourceId != null"> AND t1.src_datasource_id = #{srcDataSourceId}</if>
order by t1.create_time desc
</select> </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> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment