Compare commits
73 Commits
Author | SHA1 | Date |
---|---|---|
|
c61f57e7a3 | |
|
ba362b66f7 | |
|
b68b6af04c | |
|
96f33c3358 | |
|
916b2653e0 | |
|
e511093a1e | |
|
079bf4a08e | |
|
b29ed391d1 | |
|
3b1fbc5050 | |
|
c8fbf556fa | |
|
f5bdf00167 | |
|
c87c4a8bac | |
|
fdc6b39872 | |
|
d6c1ebf8cd | |
|
5b31d7a006 | |
|
579a4dc7f3 | |
|
4b33d46b79 | |
|
8351997ee6 | |
|
ab139edf83 | |
|
d201050250 | |
|
78264f9ace | |
|
c393b16490 | |
|
89045be56c | |
|
2e08010677 | |
|
4ce93b9f97 | |
|
86303182f7 | |
|
efd3b81dc8 | |
|
486346b618 | |
|
3cb0927e71 | |
|
4169100ce2 | |
|
ca0364ee10 | |
|
8ff6be9ab4 | |
|
cdb318e230 | |
|
d52a5c29f3 | |
|
96d675e970 | |
|
220d3a984c | |
|
5095d6caf1 | |
|
bf6ffc855f | |
|
5b19404d0a | |
|
b175820510 | |
|
6e3e9fd232 | |
|
e2433b7931 | |
|
0363ab8b21 | |
|
8f5712d33e | |
|
6d5be665a0 | |
|
d66de26a3d | |
|
0623c55417 | |
|
376a969f6a | |
|
5b70efa394 | |
|
f57dedff3e | |
|
ffa1eecd98 | |
|
5fb56a00bc | |
|
e5c0b86017 | |
|
172617c463 | |
|
d5cf5a96f6 | |
|
303674fb04 | |
|
030298942b | |
|
e117360f40 | |
|
acbc880eaf | |
|
e1f085670d | |
|
52ef1fa578 | |
|
1864500899 | |
|
56336fadbd | |
|
dd88506d9e | |
|
8e16bf16a9 | |
|
f6c5cd77b3 | |
|
f6c4282b46 | |
|
99400cba77 | |
|
f5ded45af6 | |
|
ee73d42a8f | |
|
875c46bc93 | |
|
6cca1c275c | |
|
f674225d3b |
2
pom.xml
2
pom.xml
|
@ -23,6 +23,8 @@
|
|||
<module>srt-cloud-system</module>
|
||||
<module>srt-cloud-gateway</module>
|
||||
<module>srt-data-development</module>
|
||||
<module>srt-cloud-data-governance</module>
|
||||
<module>srt-cloud-data-service</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -38,4 +38,7 @@ public interface ServerNames {
|
|||
* srt-cloud-data-governance 服务名
|
||||
*/
|
||||
String DATA_GOVERNANCE_NAME = "srt-cloud-data-governance";
|
||||
String DATA_DATAX = "srt-cloud-datax";
|
||||
|
||||
String DATA_SERVICE_NAME = "srt-cloud-data-service";
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package net.srt.api.module.data.development;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.api.module.data.development.dto.DataProductionScheduleDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
/**
|
||||
* @ClassName DataProductionTaskApi
|
||||
* @Author zrx
|
||||
* @Date 2022/10/26 11:39
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_DEVELOPMENT_NAME, contextId = "data-development-production-schedule")
|
||||
public interface DataProductionScheduleApi {
|
||||
/**
|
||||
* 根据id获取作业调度任务信息
|
||||
*/
|
||||
@GetMapping(value = "api/data/development/production-schedule/{id}")
|
||||
Result<DataProductionScheduleDto> getById(@PathVariable Long id);
|
||||
|
||||
/**
|
||||
* 根据id执行作业调度任务
|
||||
*/
|
||||
@GetMapping(value = "api/data/development/production-schedule/run/{id}")
|
||||
Result<String> scheduleRun(@PathVariable Long id);
|
||||
|
||||
/**
|
||||
* 根据调度记录id查询作业是否执行完毕
|
||||
*/
|
||||
@GetMapping(value = "api/data/development/production-schedule/complete/{recordId}")
|
||||
Result<Boolean> scheduleComplete(@PathVariable Integer recordId);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package net.srt.api.module.data.development;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.api.module.data.development.dto.DataProductionTaskDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
/**
|
||||
* @ClassName DataProductionTaskApi
|
||||
* @Author zrx
|
||||
* @Date 2022/10/26 11:39
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_DEVELOPMENT_NAME, contextId = "data-development-production-task")
|
||||
public interface DataProductionTaskApi {
|
||||
/**
|
||||
* 根据databaseId获取
|
||||
*/
|
||||
@GetMapping(value = "api/data/development/production-task/{databaseId}")
|
||||
Result<DataProductionTaskDto> getByDbId(@PathVariable Long databaseId);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package net.srt.api.module.data.development.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 接入方式
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ExecuteType {
|
||||
/**
|
||||
* 手动
|
||||
*/
|
||||
HAND(1),
|
||||
/**
|
||||
* 调度
|
||||
*/
|
||||
SCHEDULE(2);
|
||||
|
||||
private final Integer value;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package net.srt.api.module.data.development.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据生产-作业调度
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-01-12
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据生产-作业调度")
|
||||
public class DataProductionScheduleDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Integer id;
|
||||
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "调度名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "是否周期执行")
|
||||
private Integer ifCycle;
|
||||
|
||||
@Schema(description = "cron表达式")
|
||||
private String cron;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String note;
|
||||
|
||||
@Schema(description = "节点关系json")
|
||||
private String edges;
|
||||
|
||||
@Schema(description = "0-未发布 1-已发布")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
package net.srt.api.module.data.development.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据生产任务
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2022-12-05
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据生产任务")
|
||||
public class DataProductionTaskDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "节点id")
|
||||
private Long catalogueId;
|
||||
|
||||
@Schema(description = "任务名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "项目(租户id)")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "任务别名")
|
||||
private String alias;
|
||||
|
||||
@Schema(description = "任务类型")
|
||||
private Integer dialect;
|
||||
|
||||
@Schema(description = "任务运行类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "CheckPoint trigger seconds")
|
||||
private Integer checkPoint;
|
||||
|
||||
@Schema(description = "SavePoint strategy")
|
||||
private Integer savePointStrategy;
|
||||
|
||||
@Schema(description = "SavePointPath")
|
||||
private String savePointPath;
|
||||
|
||||
@Schema(description = "并行度")
|
||||
private Integer parallelism;
|
||||
|
||||
@Schema(description = "全局变量")
|
||||
private Boolean fragment;
|
||||
|
||||
@Schema(description = "insrt 语句集")
|
||||
private Boolean statementSet;
|
||||
|
||||
@Schema(description = "批处理模式")
|
||||
private Boolean batchModel;
|
||||
|
||||
@Schema(description = "flink集群实例id")
|
||||
private Long clusterId;
|
||||
|
||||
@Schema(description = "集群配置id")
|
||||
private Long clusterConfigurationId;
|
||||
|
||||
@Schema(description = "数据类型(1-数据库 2-中台库)(sql模式下)")
|
||||
private Integer sqlDbType;
|
||||
|
||||
@Schema(description = "数据库id(sql模式下)")
|
||||
private Long databaseId;
|
||||
|
||||
@Schema(description = "Jar ID")
|
||||
private Long jarId;
|
||||
|
||||
@Schema(description = "env id")
|
||||
private Long envId;
|
||||
|
||||
@Schema(description = "alert group id")
|
||||
private Long alertGroupId;
|
||||
|
||||
@Schema(description = "configuration json")
|
||||
private String configJson;
|
||||
|
||||
@Schema(description = "Job Note")
|
||||
private String note;
|
||||
|
||||
@Schema(description = "Job lifecycle")
|
||||
private Integer step;
|
||||
|
||||
@Schema(description = "job instance id")
|
||||
private Long jobInstanceId;
|
||||
|
||||
@Schema(description = "自动停止")
|
||||
private Boolean useAutoCancel;
|
||||
|
||||
@Schema(description = "打印流")
|
||||
private Boolean useChangeLog;
|
||||
|
||||
@Schema(description = "预览结果")
|
||||
private Boolean useResult;
|
||||
|
||||
@Schema(description = "预览行数")
|
||||
private Integer pvdataNum;
|
||||
|
||||
@Schema(description = "is enable")
|
||||
private Boolean enabled;
|
||||
|
||||
@Schema(description = "version id")
|
||||
private Integer versionId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
private String statement;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package net.srt.api.module.data.governance;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
/**
|
||||
* @ClassName DataAccessApi
|
||||
* @Author zrx
|
||||
* @Date 2022/10/26 11:39
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_GOVERNANCE_NAME, contextId = "data-governance-metadata")
|
||||
public interface DataMetadataApi {
|
||||
/**
|
||||
* 根据id获取采集任务
|
||||
*/
|
||||
@GetMapping(value = "api/data/governance/metadata/{id}")
|
||||
Result<DataGovernanceMetadataDto> getById(@PathVariable Integer id);
|
||||
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
package net.srt.api.module.data.governance;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataCollectDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataCollectRecordDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataPropertyDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName DataAccessApi
|
||||
* @Author zrx
|
||||
* @Date 2022/10/26 11:39
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_GOVERNANCE_NAME, contextId = "data-governance-metadata-collect")
|
||||
public interface DataMetadataCollectApi {
|
||||
/**
|
||||
* 根据id获取采集任务
|
||||
*/
|
||||
@GetMapping(value = "api/data/governance/metadata-collect/{id}")
|
||||
Result<DataGovernanceMetadataCollectDto> getById(@PathVariable Long id);
|
||||
|
||||
/**
|
||||
* 根据id获取采集任务
|
||||
*/
|
||||
@PostMapping(value = "api/data/governance/metadata-collect-record")
|
||||
DataGovernanceMetadataCollectRecordDto addCollectRecord(@RequestBody DataGovernanceMetadataCollectRecordDto collectRecordDto);
|
||||
|
||||
/**
|
||||
* 根据id获取采集任务
|
||||
*/
|
||||
@PutMapping(value = "api/data/governance/metadata-collect-record")
|
||||
void upCollectRecord(@RequestBody DataGovernanceMetadataCollectRecordDto collectRecordDto);
|
||||
|
||||
/**
|
||||
* 根据父级id和数据源id获取
|
||||
*/
|
||||
@GetMapping(value = "api/data/governance/metadata/datasource")
|
||||
Result<DataGovernanceMetadataDto> getByParentIdAndDatasourceId(@RequestParam Long parnetId, @RequestParam Long datasourceId);
|
||||
|
||||
/**
|
||||
* 根据父级id和数据源id获取
|
||||
*/
|
||||
@GetMapping(value = "api/data/governance/metadata/info")
|
||||
Result<DataGovernanceMetadataDto> getMetadataById(@RequestParam Long metadataId);
|
||||
|
||||
/**
|
||||
* 根据父级id和code以及modelId获取
|
||||
*/
|
||||
@GetMapping(value = "api/data/governance/metadata/child-info")
|
||||
Result<DataGovernanceMetadataDto> getByParentIdAndOtherInfo(@RequestParam Long parnetId, @RequestParam Long datasourceId, @RequestParam String code, @RequestParam Long metamodelId);
|
||||
|
||||
/**
|
||||
* 添加元数据
|
||||
*/
|
||||
@PostMapping(value = "api/data/governance/metadata")
|
||||
DataGovernanceMetadataDto addOrUpdateMetadata(@RequestBody DataGovernanceMetadataDto metadataDto);
|
||||
|
||||
|
||||
/**
|
||||
* 获取元数据属性
|
||||
*/
|
||||
@GetMapping(value = "api/data/governance/metadata-property")
|
||||
Result<DataGovernanceMetadataPropertyDto> getByPropertyIdAndMetadataId(@RequestParam Long propertyId, @RequestParam Long metadataId);
|
||||
|
||||
/**
|
||||
* 添加元数据属性
|
||||
*/
|
||||
@PostMapping(value = "api/data/governance/metadata-prpperty")
|
||||
void addOrUpdateMetadataProperty(@RequestBody DataGovernanceMetadataPropertyDto metadataPropertyDto);
|
||||
|
||||
@GetMapping(value = "api/data/governance/metadata/list")
|
||||
Result<List<DataGovernanceMetadataDto>> listParentIdAndDatasourceId(@RequestParam Long parentId, @RequestParam Long datasourceId, @RequestParam Long metamodelId);
|
||||
|
||||
@DeleteMapping(value = "api/data/governance/metadata")
|
||||
void deleteMetadata(@RequestParam Long id);
|
||||
|
||||
@GetMapping(value = "api/data/governance/by-datasourceId")
|
||||
Result<DataGovernanceMetadataCollectDto> getByDatasourceId(Long id);
|
||||
|
||||
@GetMapping(value = "api/data/governance/metadata/by-datasourceId")
|
||||
Result<DataGovernanceMetadataDto> getMetadataByDatasourceId(Long id);
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package net.srt.api.module.data.governance;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityConfigDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskColumnDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskTableDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName DataAccessApi
|
||||
* @Author zrx
|
||||
* @Date 2022/10/26 11:39
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_GOVERNANCE_NAME, contextId = "data-governance-quality")
|
||||
public interface DataQualityApi {
|
||||
|
||||
@GetMapping(value = "api/data/governance/quality-config/{id}")
|
||||
Result<DataGovernanceQualityConfigDto> getById(@PathVariable Long id);
|
||||
|
||||
@PostMapping(value = "api/data/governance/add-quality-task")
|
||||
Result<DataGovernanceQualityTaskDto> addQualityTask(@RequestBody DataGovernanceQualityTaskDto qualityTaskDto);
|
||||
|
||||
@PutMapping(value = "api/data/governance/update-quality-task")
|
||||
Result<String> updateQualityTask(@RequestBody DataGovernanceQualityTaskDto qualityTaskDto);
|
||||
|
||||
@PostMapping(value = "api/data/governance/add-quality-task-table")
|
||||
Result<DataGovernanceQualityTaskTableDto> addTaskTable(@RequestBody DataGovernanceQualityTaskTableDto qualityTaskTableDto);
|
||||
|
||||
@PutMapping(value = "api/data/governance/update-quality-task-table")
|
||||
Result<String> updateQualityTaskTable(@RequestBody DataGovernanceQualityTaskTableDto taskTable);
|
||||
|
||||
@PostMapping(value = "api/data/governance/add-quality-task-column")
|
||||
Result<String> addQualityTaskColumns(@RequestBody List<DataGovernanceQualityTaskColumnDto> columnDtos);
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
/**
|
||||
* 这里需要跟库信息保持一致
|
||||
*
|
||||
* @ClassName MetadataProperty
|
||||
* @Author zrx
|
||||
* @Date 2023/5/22 16:15
|
||||
*/
|
||||
public enum BuiltInMetamodel {
|
||||
|
||||
/**
|
||||
* 数据库
|
||||
*/
|
||||
SCHEMA(2L, "Schema", "数据库", "/src/assets/database.png"),
|
||||
/**
|
||||
* 数据表
|
||||
*/
|
||||
TABLE(3L, "Table", "数据表", "/src/assets/table.png"),
|
||||
/**
|
||||
* 表字段
|
||||
*/
|
||||
COLUMN(4L, "Column", "表字段", "/src/assets/column.png");
|
||||
|
||||
/**
|
||||
* 注意这里的 id,metamodelInfoId,code和name和数据库metadata_property是一一对应的
|
||||
*/
|
||||
private Long id;
|
||||
private String code;
|
||||
private String name;
|
||||
private String icon;
|
||||
|
||||
BuiltInMetamodel(Long id, String code, String name, String icon) {
|
||||
this.id = id;
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataPropertyDto;
|
||||
|
||||
/**
|
||||
* 这里需要跟库信息保持一致
|
||||
*
|
||||
* @ClassName MetadataProperty
|
||||
* @Author zrx
|
||||
* @Date 2023/5/22 16:15
|
||||
*/
|
||||
public enum BuiltInMetamodelProperty {
|
||||
|
||||
/**
|
||||
* 库注释
|
||||
*/
|
||||
SCHEMA_COMMENT(1L, 2L, "comment", "注释"),
|
||||
/**
|
||||
* 表注释
|
||||
*/
|
||||
TABLE_COMMENT(2L, 3L, "comment", "注释"),
|
||||
/**
|
||||
* 表空间
|
||||
*/
|
||||
TABLE_SPACE(3L, 3L, "tableSpace", "表空间"),
|
||||
/**
|
||||
* 字段注释
|
||||
*/
|
||||
COLUMN_COMMENT(4L, 4L, "comment", "注释"),
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
COLUMN_DATA_TYPE(5L, 4L, "dataType", "数据类型"),
|
||||
|
||||
/**
|
||||
* 数据长度
|
||||
*/
|
||||
COLUMN_DATA_LENGTH(6L, 4L, "dataLength", "数据长度"),
|
||||
|
||||
/**
|
||||
* 数据精度
|
||||
*/
|
||||
COLUMN_DATA_PRECISION(7L, 4L, "dataPrecision", "数据精度"),
|
||||
|
||||
/**
|
||||
* 小数位数
|
||||
*/
|
||||
COLUMN_DATA_SCALE(8L, 4L, "dataScale", "小数位数"),
|
||||
|
||||
/**
|
||||
* 是否主键
|
||||
*/
|
||||
COLUMN_COL_KEY(9L, 4L, "colKey", "是否主键"),
|
||||
|
||||
/**
|
||||
* 是否唯一
|
||||
*/
|
||||
COLUMN_UNI_KEY(10L, 4L, "uniKey", "是否唯一"),
|
||||
|
||||
/**
|
||||
* 是否可为空
|
||||
*/
|
||||
COLUMN_NULLABLE(11L, 4L, "nullable", "是否可为空"),
|
||||
/**
|
||||
* 是否递增
|
||||
*/
|
||||
COLUMN_AUTO_INCREMENT(12L, 4L, "autoIncrement", "是否递增"),
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
COLUMN_DATA_DEFAULT(13L, 4L, "dataDefault", "默认值"),
|
||||
|
||||
/**
|
||||
* 数据库类型
|
||||
*/
|
||||
SCHEMA_TYPE(14L, 2L, "databaseType", "数据库类型"),
|
||||
/**
|
||||
* 数据库ip
|
||||
*/
|
||||
SCHEMA_IP(15L, 2L, "ip", "数据库ip"),
|
||||
/**
|
||||
* 数据库端口
|
||||
*/
|
||||
SCHEMA_PORT(16L, 2L, "port", "数据库端口"),
|
||||
/**
|
||||
* 库名(服务名)
|
||||
*/
|
||||
SCHEMA_DATABASE(17L, 2L, "databaseName", "库名(服务名)"),
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
SCHEMA_USERNAME(18L, 2L, "username", "用户名"),
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
SCHEMA_PASSWORD(19L, 2L, "password", "密码"),
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
SCHEMA_JDBC_URL(20L, 2L, "jdbcUrl", "jdbc连接串");
|
||||
|
||||
/**
|
||||
* 注意这里的 id,metamodelInfoId,code和name和数据库metadata_property是一一对应的
|
||||
*/
|
||||
private Long id;
|
||||
private Long metamodelInfoId;
|
||||
private String code;
|
||||
private String name;
|
||||
|
||||
BuiltInMetamodelProperty(Long id, Long metamodelInfoId, String code, String name) {
|
||||
this.id = id;
|
||||
this.metamodelInfoId = metamodelInfoId;
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Long getMetamodelInfoId() {
|
||||
return metamodelInfoId;
|
||||
}
|
||||
|
||||
public static DataGovernanceMetadataPropertyDto buildProerty(BuiltInMetamodelProperty property, Long projectId, Long metadataId, String propertyVal) {
|
||||
DataGovernanceMetadataPropertyDto propertyDto = new DataGovernanceMetadataPropertyDto();
|
||||
propertyDto.setProjectId(projectId);
|
||||
propertyDto.setMetadataId(metadataId);
|
||||
propertyDto.setMetamodelPropertyId(property.getId());
|
||||
propertyDto.setProperty(propertyVal);
|
||||
return propertyDto;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
/**
|
||||
* @ClassName BuiltInQualityRule
|
||||
* @Author zrx
|
||||
* @Date 2023/5/29 22:21
|
||||
*/
|
||||
public enum BuiltInQualityRule {
|
||||
/**
|
||||
* 唯一性校验
|
||||
*/
|
||||
UNIQUENESS(1, "唯一性校验"),
|
||||
/**
|
||||
* 手机号格式检验
|
||||
*/
|
||||
PHONE_NUMBER(2, "手机号格式检验"),
|
||||
/**
|
||||
* 身份证号格式检验
|
||||
*/
|
||||
ID_CARD(3, "身份证号格式检验"),
|
||||
/**
|
||||
* 邮件格式检验
|
||||
*/
|
||||
MAIL(4, "邮件格式检验"),
|
||||
/**
|
||||
* 是否为日期格式
|
||||
*/
|
||||
DATE_FORMAT(5, "是否为日期格式"),
|
||||
/**
|
||||
* 是否为数字格式
|
||||
*/
|
||||
NUMBER_FORMAT(6, "是否为数字格式"),
|
||||
/**
|
||||
* 长度检验
|
||||
*/
|
||||
LENGTH_CHECK(7, "长度检验"),
|
||||
/**
|
||||
* 非空检验
|
||||
*/
|
||||
NON_NULL_CHECK(8, "非空检验"),
|
||||
/**
|
||||
* 关联一致性检验
|
||||
*/
|
||||
ASSOCIATION_CONSISTENCY(9, "关联一致性检验"),
|
||||
/**
|
||||
* 关联一致性检验
|
||||
*/
|
||||
TIMELINESS(10, "及时性");
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
BuiltInQualityRule(Integer id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public static BuiltInQualityRule getById(Integer id) {
|
||||
for (BuiltInQualityRule qualityRule : BuiltInQualityRule.values()) {
|
||||
if (qualityRule.getId().equals(id)) {
|
||||
return qualityRule;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
|
||||
/**
|
||||
* FlinkType
|
||||
*
|
||||
* @author zrx
|
||||
**/
|
||||
public enum DbType {
|
||||
|
||||
/**
|
||||
* 数据库
|
||||
*/
|
||||
DATABASE(1, "数据库"),
|
||||
/**
|
||||
* 数据库
|
||||
*/
|
||||
MIDDLE_DB(2, "中台库");
|
||||
|
||||
|
||||
private final Integer value;
|
||||
private final String longValue;
|
||||
|
||||
DbType(Integer value, String longValue) {
|
||||
this.value = value;
|
||||
this.longValue = longValue;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLongValue() {
|
||||
return longValue;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
/**
|
||||
* @ClassName MetadataCollectRunStatus
|
||||
* @Author zrx
|
||||
*/
|
||||
public enum MetadataCollectRunStatus {
|
||||
|
||||
/**
|
||||
* 运行中
|
||||
*/
|
||||
RUNNING(2,"运行中"),
|
||||
/**
|
||||
* 已完成
|
||||
*/
|
||||
SUCCESS(1,"成功"),
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
FAILED(0,"失败");
|
||||
|
||||
|
||||
|
||||
private Integer code;
|
||||
private String name;
|
||||
|
||||
MetadataCollectRunStatus(Integer code, String name) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 接入方式
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MetadataCollectType {
|
||||
/**
|
||||
* 一次性
|
||||
*/
|
||||
ONCE(1),
|
||||
/**
|
||||
* 周期性
|
||||
*/
|
||||
CRON(2);
|
||||
|
||||
private final Integer value;
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package net.srt.api.module.data.governance.constant;
|
||||
|
||||
|
||||
/**
|
||||
* FlinkType
|
||||
*
|
||||
* @author zrx
|
||||
**/
|
||||
public enum MetadataStrategyType {
|
||||
|
||||
/**
|
||||
* 数据库
|
||||
*/
|
||||
ALL(0, "全量"),
|
||||
/**
|
||||
* 数据库
|
||||
*/
|
||||
INCREASE(1, "增量");
|
||||
|
||||
|
||||
private final Integer value;
|
||||
private final String longValue;
|
||||
|
||||
MetadataStrategyType(Integer value, String longValue) {
|
||||
this.value = value;
|
||||
this.longValue = longValue;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLongValue() {
|
||||
return longValue;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据治理-元数据采集
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-04-01
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-元数据采集")
|
||||
public class DataGovernanceMetadataCollectDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "任务名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "数据库类型(1-数据库 2-中台库)")
|
||||
private Integer dbType;
|
||||
|
||||
@Schema(description = "数据库主键id")
|
||||
private Long databaseId;
|
||||
|
||||
@Schema(description = "入库策略,0-全量,1-增量")
|
||||
private Integer strategy;
|
||||
|
||||
@Schema(description = "任务类型 1一次性 2.周期性")
|
||||
private Integer taskType;
|
||||
|
||||
@Schema(description = "cron表达式(秒 分 时 日 月 星期 年,例如 0 0 3 * * ? 表示每天凌晨三点执行)")
|
||||
private String cron;
|
||||
|
||||
@Schema(description = "归属元数据的目录")
|
||||
private Long metadataId;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "是否已发布 0-否 1-是")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date releaseTime;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据治理-元数据采集任务记录
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-04-04
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-元数据采集任务记录")
|
||||
public class DataGovernanceMetadataCollectRecordDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "采集任务id")
|
||||
private Long metadataCollectId;
|
||||
|
||||
@Schema(description = "1-成功 0-失败 2-运行中")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "实时日志")
|
||||
private String realTimeLog;
|
||||
|
||||
@Schema(description = "错误日志")
|
||||
private String errorLog;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "项目(租户)id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据治理-元数据
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-03-29
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-元数据")
|
||||
public class DataGovernanceMetadataDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "父级id(默认0为顶级)")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "树状节点的路径")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "节点名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "节点英文名称")
|
||||
private String code;
|
||||
|
||||
private String icon;
|
||||
|
||||
private Integer ifLeaf;
|
||||
|
||||
@Schema(description = "对应的元模型id")
|
||||
private Long metamodelId;
|
||||
|
||||
@Schema(description = "详情")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "数据库类型(1-数据库 2-中台库)")
|
||||
private Integer dbType;
|
||||
|
||||
@Schema(description = "如果是外部系统接入的库表,需要此字段")
|
||||
private Long datasourceId;
|
||||
|
||||
@Schema(description = "采集任务id")
|
||||
private Long collectTaskId;
|
||||
|
||||
@Schema(description = "项目id(租户id)")
|
||||
private Long projectId;
|
||||
|
||||
private Integer orderNo;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据治理-元数据属性值
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-03-29
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-元数据属性值")
|
||||
public class DataGovernanceMetadataPropertyDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "属性id")
|
||||
private Long metamodelPropertyId;
|
||||
|
||||
@Schema(description = "元数据id")
|
||||
private Long metadataId;
|
||||
|
||||
@Schema(description = "属性值")
|
||||
private String property;
|
||||
|
||||
@Schema(description = "项目id(租户id)")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.api.module.data.governance.dto.quality.QualityConfigParam;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据治理-质量规则配置
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-05-29
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-质量规则配置")
|
||||
public class DataGovernanceQualityConfigDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "自增id")
|
||||
private Long id;
|
||||
|
||||
private Long categoryId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "规则id")
|
||||
private Integer ruleId;
|
||||
|
||||
@Schema(description = "个性化参数json")
|
||||
private QualityConfigParam param;
|
||||
@Schema(description = "当选择的规则类型为关联一致性的时候,返回此字段(前台用)")
|
||||
private String relMetadataStr;
|
||||
|
||||
@Schema(description = "元数据字段列表")
|
||||
private List<Integer> metadataIds;
|
||||
@Schema(description = "检测的元数据字段信息字符串(前台用)")
|
||||
private String metadataStrs;
|
||||
|
||||
@Schema(description = "状态,1-启用,0-关闭")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "任务类型,1-一次性任务,2-周期任务")
|
||||
private Integer taskType;
|
||||
|
||||
@Schema(description = "cron表达式")
|
||||
private String cron;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String note;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据治理-字段检测记录
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-06-23
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-字段检测记录")
|
||||
public class DataGovernanceQualityTaskColumnDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "质量任务id")
|
||||
private Long qualityTaskId;
|
||||
|
||||
@Schema(description = "表检测记录id")
|
||||
private Long qualityTaskTableId;
|
||||
|
||||
@Schema(description = "被检测的数据行")
|
||||
private String checkRow;
|
||||
|
||||
@Schema(description = "未通过详情")
|
||||
private String notPassInfo;
|
||||
|
||||
@Schema(description = "检测时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date checkTime;
|
||||
|
||||
@Schema(description = "0-不通过 1-通过")
|
||||
private Integer checkResult;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据治理-质量任务
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-06-23
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-质量任务")
|
||||
public class DataGovernanceQualityTaskDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "规则配置id")
|
||||
private Long qualityConfigId;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "运行状态( 1-等待中 2-运行中 3-正常结束 4-异常结束)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "检测条数")
|
||||
private Integer checkCount = 0;
|
||||
|
||||
@Schema(description = "检测通过数")
|
||||
private Integer passCount = 0;
|
||||
|
||||
@Schema(description = "未通过数")
|
||||
private Integer notPassCount = 0;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private Long projectId;
|
||||
private String errorLog;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package net.srt.api.module.data.governance.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.api.module.data.governance.dto.quality.QulaityColumn;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据治理-表检测记录
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-06-23
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-表检测记录")
|
||||
public class DataGovernanceQualityTaskTableDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "质量任务id")
|
||||
private Long qualityTaskId;
|
||||
|
||||
@Schema(description = "被检测的表id")
|
||||
private Long tableMetadataId;
|
||||
|
||||
@Schema(description = "被检测的表")
|
||||
private String tableName;
|
||||
|
||||
@Schema(description = "被检测的字段id")
|
||||
private List<QulaityColumn> columnInfo;
|
||||
|
||||
@Schema(description = "检测条数")
|
||||
private Integer checkCount = 0;
|
||||
|
||||
@Schema(description = "检测通过数")
|
||||
private Integer passCount = 0;
|
||||
|
||||
@Schema(description = "未通过数")
|
||||
private Integer notPassCount = 0;
|
||||
|
||||
@Schema(description = "检测时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date checkTime;
|
||||
@Schema(description = "开始时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date startTime;
|
||||
@Schema(description = "结束时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date endTime;
|
||||
private String errorLog;
|
||||
|
||||
@Schema(description = "运行状态( 1-等待中 2-运行中 3-正常结束 4-异常结束)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package net.srt.api.module.data.governance.dto.quality;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @ClassName QualityCheck
|
||||
* @Author zrx
|
||||
* @Date 2023/6/24 12:17
|
||||
*/
|
||||
@Data
|
||||
public class QualityCheck {
|
||||
@Schema(description = "数据库类型")
|
||||
private Integer databaseType;
|
||||
@Schema(description = "库名(服务名)")
|
||||
private String databaseName;
|
||||
@Schema(description = "用户名")
|
||||
private String userName;
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
@Schema(description = "jdbcUrl")
|
||||
private String jdbcUrl;
|
||||
@Schema(description = "个性化参数json")
|
||||
private QualityConfigParam param;
|
||||
private String tableName;
|
||||
@Schema(description = "规则id")
|
||||
private Integer ruleId;
|
||||
@Schema(description = "表id")
|
||||
private Long tableMetadataId;
|
||||
private List<QulaityColumn> qulaityColumns = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
QualityCheck that = (QualityCheck) o;
|
||||
return Objects.equals(jdbcUrl, that.jdbcUrl) &&
|
||||
Objects.equals(tableName, that.tableName) &&
|
||||
Objects.equals(ruleId, that.ruleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(jdbcUrl, tableName, ruleId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package net.srt.api.module.data.governance.dto.quality;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName QualityParam
|
||||
* @Author zrx
|
||||
* @Date 2023/5/28 8:56
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QualityConfigParam {
|
||||
//1-单字段唯一 2-组合字段唯一
|
||||
private Integer uniqueType;
|
||||
private Integer columnLength = 1;
|
||||
private Integer columnMetaId;
|
||||
private Integer timeLength = 1;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package net.srt.api.module.data.governance.dto.quality;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName QualityParam
|
||||
* @Author zrx
|
||||
* @Date 2023/5/28 8:56
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QualityParam {
|
||||
private String name;
|
||||
private String code;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package net.srt.api.module.data.governance.dto.quality;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName QulaityColumn
|
||||
* @Author zrx
|
||||
* @Date 2023/6/24 12:27
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QulaityColumn {
|
||||
@Schema(description = "字段id")
|
||||
private Integer columnMetadataId;
|
||||
@Schema(description = "字段")
|
||||
private String columnName;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package net.srt.api.module.data.service;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.api.module.data.service.dto.DataServiceApiAuthDto;
|
||||
import net.srt.api.module.data.service.dto.DataServiceApiConfigDto;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @ClassName DataAccessApi
|
||||
* @Author zrx
|
||||
* @Date 2022/10/26 11:39
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_SERVICE_NAME, contextId = "data-service-api")
|
||||
public interface DataServiceApi {
|
||||
/**
|
||||
* 根据id获取
|
||||
*/
|
||||
@GetMapping(value = "api/api-config/{id}")
|
||||
Result<DataServiceApiConfigDto> getById(@PathVariable Long id);
|
||||
|
||||
/**
|
||||
* 添加授权
|
||||
*/
|
||||
@PostMapping(value = "api/api-auth")
|
||||
Result<String> auth(@RequestBody DataServiceApiAuthDto apiAuthDto);
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package net.srt.api.module.data.service.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据服务-权限关联表
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-02-16
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据服务-权限关联表")
|
||||
public class DataServiceApiAuthDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "app的id")
|
||||
private Long appId;
|
||||
|
||||
@Schema(description = "分组id")
|
||||
private Long groupId;
|
||||
|
||||
@Schema(description = "api的id")
|
||||
private Long apiId;
|
||||
|
||||
@Schema(description = "调用次数 不限次数为-1")
|
||||
private Integer requestTimes;
|
||||
|
||||
@Schema(description = "已调用次数")
|
||||
private Integer requestedTimes;
|
||||
private Integer requestedSuccessTimes;
|
||||
private Integer requestedFailedTimes;
|
||||
|
||||
@Schema(description = "所属项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
|
||||
private Boolean hasActiveApply;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package net.srt.api.module.data.service.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据服务-api配置
|
||||
*
|
||||
* @author zrx 985134801@qq.com
|
||||
* @since 1.0.0 2023-01-28
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据服务-api配置")
|
||||
public class DataServiceApiConfigDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "分组id")
|
||||
private Long groupId;
|
||||
|
||||
@Schema(description = "api地址")
|
||||
private String path;
|
||||
|
||||
private String type;
|
||||
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String note;
|
||||
|
||||
@Schema(description = "sql语句")
|
||||
private String sqlText;
|
||||
private String sqlSeparator;
|
||||
private Integer sqlMaxRow;
|
||||
|
||||
private String sqlParam;
|
||||
|
||||
@Schema(description = "application/json 类API对应的json参数示例")
|
||||
private String jsonParam;
|
||||
private String responseResult;
|
||||
|
||||
@Schema(description = "参数类型")
|
||||
private String contentType;
|
||||
|
||||
@Schema(description = "是否发布 0-否 1-是")
|
||||
private Integer status;
|
||||
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date releaseTime;
|
||||
private Long releaseUserId;
|
||||
|
||||
@Schema(description = "1-数据库 2-中台库")
|
||||
private Integer sqlDbType;
|
||||
|
||||
@Schema(description = "数据库id")
|
||||
private Long databaseId;
|
||||
|
||||
@Schema(description = "是否私有 0-否 1-是")
|
||||
private Integer previlege;
|
||||
|
||||
@Schema(description = "是否开启事务 0-否 1-是")
|
||||
private Integer openTrans;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||
private Integer deleted;
|
||||
|
||||
@Schema(description = "创建者")
|
||||
private Long creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
|
||||
@Schema(description = "更新者")
|
||||
private Long updater;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
@Schema(description = "已调用次数")
|
||||
private Integer requestedTimes;
|
||||
private Integer requestedSuccessTimes;
|
||||
private Integer requestedFailedTimes;
|
||||
|
||||
private Long authId;
|
||||
|
||||
private String group;
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package net.srt.api.module.datax;
|
||||
|
||||
import net.srt.api.ServerNames;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
/**
|
||||
* @author : WangZhanpeng
|
||||
* @date : 2023/12/18 22:20
|
||||
*/
|
||||
@FeignClient(name = ServerNames.DATA_DATAX)
|
||||
public interface DataApi {
|
||||
|
||||
@GetMapping("/datax/run/{id}")
|
||||
public Result<String> run(Long id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,217 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>net.srt</groupId>
|
||||
<artifactId>srt-cloud</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<groupId>net.srt</groupId>
|
||||
<version>2.0.0</version>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>srt-cloud-data-governance</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.srt</groupId>
|
||||
<artifactId>srt-cloud-api</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<!--使用log42j-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.srt</groupId>
|
||||
<artifactId>srt-cloud-mybatis</artifactId>
|
||||
<version>2.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.whvcse</groupId>
|
||||
<artifactId>easy-captcha</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-springdoc-ui</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qcloud</groupId>
|
||||
<artifactId>cos_api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.qiniu</groupId>
|
||||
<artifactId>qiniu-java-sdk</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.huaweicloud</groupId>
|
||||
<artifactId>esdk-obs-java-bundle</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.minio</groupId>
|
||||
<artifactId>minio</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!--<finalName>${project.artifactId}</finalName>-->
|
||||
<!--生成可执行文件 linux,win系统,win首次执行需要先 app.bat install-->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>appassembler-maven-plugin</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<!-- 如果不配置 generate-daemons,则打包命令为 mvn clean package appassembler:assemble -->
|
||||
<!-- 如果配置了 generate-daemons,打包命令可以是 mvn clean package 也可以是 mvn clean package appassembler:assemble -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-jsw-scripts</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>generate-daemons</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
<configuration>
|
||||
<!-- flat与lib共同决定将项目用的的所有jar包复制到lib目录下 -->
|
||||
<repositoryLayout>flat</repositoryLayout>
|
||||
<!--从哪里copy配置文件-->
|
||||
<configurationSourceDirectory>src/main/resources</configurationSourceDirectory>
|
||||
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
|
||||
<!--是否copy配置文件-->
|
||||
<copyConfigurationDirectory>true</copyConfigurationDirectory>
|
||||
<!--配置文件存放在conf目录路径-->
|
||||
<configurationDirectory>conf</configurationDirectory>
|
||||
<!-- 打包的jar,以及maven依赖的jar放到这个目录里面 -->
|
||||
<repositoryName>lib</repositoryName>
|
||||
<!-- 可执行脚本的目录 -->
|
||||
<binFolder>bin</binFolder>
|
||||
<encoding>UTF-8</encoding>
|
||||
<logsDirectory>logs</logsDirectory>
|
||||
|
||||
<daemons>
|
||||
<daemon>
|
||||
<id>${project.artifactId}</id>
|
||||
<mainClass>net.srt.DataGovernanceApplication</mainClass>
|
||||
<platforms>
|
||||
<platform>jsw</platform>
|
||||
</platforms>
|
||||
<generatorConfigurations>
|
||||
<generatorConfiguration>
|
||||
<generator>jsw</generator>
|
||||
<includes>
|
||||
<include>linux-x86-32</include>
|
||||
<include>linux-x86-64</include>
|
||||
<include>windows-x86-32</include>
|
||||
<include>windows-x86-64</include>
|
||||
</includes>
|
||||
<configuration>
|
||||
<property>
|
||||
<name>configuration.directory.in.classpath.first</name>
|
||||
<value>conf</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>wrapper.ping.timeout</name>
|
||||
<value>120</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>set.default.REPO_DIR</name>
|
||||
<value>lib</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>wrapper.logfile</name>
|
||||
<value>logs/wrapper.log</value>
|
||||
</property>
|
||||
</configuration>
|
||||
</generatorConfiguration>
|
||||
</generatorConfigurations>
|
||||
<jvmSettings>
|
||||
<!-- jvm参数 -->
|
||||
<!--<systemProperties>
|
||||
<systemProperty>com.sun.management.jmxremote</systemProperty>
|
||||
<systemProperty>com.sun.management.jmxremote.port=1984</systemProperty>
|
||||
<systemProperty>com.sun.management.jmxremote.authenticate=false</systemProperty>
|
||||
<systemProperty>com.sun.management.jmxremote.ssl=false</systemProperty>
|
||||
</systemProperties>-->
|
||||
<extraArguments>
|
||||
<extraArgument>-server</extraArgument>
|
||||
<extraArgument>-Dfile.encoding=utf-8</extraArgument>
|
||||
<extraArgument>-Xms128m</extraArgument>
|
||||
<extraArgument>-Xmx1024m</extraArgument>
|
||||
<extraArgument>-XX:+PrintGCDetails</extraArgument><!--输出GC的详细日志-->
|
||||
<extraArgument>-XX:+PrintGCDateStamps</extraArgument><!--输出GC的时间戳-->
|
||||
<extraArgument>-Xloggc:logs/gc.log</extraArgument><!--日志文件的输出路径-->
|
||||
</extraArguments>
|
||||
</jvmSettings>
|
||||
</daemon>
|
||||
</daemons>
|
||||
<programs>
|
||||
<program>
|
||||
<mainClass>net.srt.DataGovernanceApplication</mainClass>
|
||||
<id>${project.artifactId}</id>
|
||||
</program>
|
||||
</programs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!--打包 日常调试打包可以把该组件注释掉,不然install的速度比较慢-->
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>${project.parent.basedir}/assembly/assembly-win.xml</descriptor>
|
||||
<descriptor>${project.parent.basedir}/assembly/assembly-linux.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- <plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,23 @@
|
|||
package net.srt;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* @ClassName : GovernanceApplication
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:16
|
||||
*/
|
||||
@EnableFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
public class GovernanceApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GovernanceApplication.class, args);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package net.srt.api;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.srt.api.module.data.governance.DataMetadataApi;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataDto;
|
||||
import net.srt.convert.MetadataConvert;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.service.MetadataService;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.api
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/25 19:38
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class MetadataApiImpl implements DataMetadataApi {
|
||||
private final MetadataService metadataService;
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataDto> getById(Integer id) {
|
||||
return Result.ok(MetadataConvert.INSTANCE.convertDto(metadataService.getById(id)));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
package net.srt.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.srt.api.module.data.governance.DataMetadataCollectApi;
|
||||
import net.srt.api.module.data.governance.constant.DbType;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataCollectDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataCollectRecordDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataPropertyDto;
|
||||
import net.srt.convert.MetadataCollectConvert;
|
||||
import net.srt.convert.MetadataCollectRecordConvert;
|
||||
import net.srt.convert.MetadataConvert;
|
||||
import net.srt.convert.MetadataPropertyConvert;
|
||||
import net.srt.entity.MetadataCollectEntity;
|
||||
import net.srt.entity.MetadataCollectRecordEntity;
|
||||
import net.srt.entity.MetadataEntity;
|
||||
import net.srt.entity.MetadataPropertyEntity;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.service.MetadataCollectRecordService;
|
||||
import net.srt.service.MetadataCollectService;
|
||||
import net.srt.service.MetadataPropertyService;
|
||||
import net.srt.service.MetadataService;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.nio.file.Watchable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.api
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/25 19:45
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class MetadataCollectApiImpl implements DataMetadataCollectApi {
|
||||
private final MetadataService metadataService;
|
||||
private final MetadataCollectService metadataCollectService;
|
||||
private final MetadataCollectRecordService metadataCollectRecordService;
|
||||
private final MetadataPropertyService metadataPropertyService;
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataCollectDto> getById(Long id) {
|
||||
return Result.ok(MetadataCollectConvert.INSTANCE.convertDto(metadataCollectService.getById(id)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataGovernanceMetadataCollectRecordDto addCollectRecord(DataGovernanceMetadataCollectRecordDto collectRecordDto) {
|
||||
MetadataCollectRecordEntity convert = MetadataCollectRecordConvert.INSTANCE.convert(collectRecordDto);
|
||||
metadataCollectRecordService.save(convert);
|
||||
collectRecordDto.setId(convert.getId());
|
||||
return collectRecordDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upCollectRecord(DataGovernanceMetadataCollectRecordDto collectRecordDto) {
|
||||
metadataCollectRecordService.updateById(MetadataCollectRecordConvert.INSTANCE.convert(collectRecordDto));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataDto> getByParentIdAndDatasourceId(Long parnetId, Long datasourceId) {
|
||||
LambdaQueryWrapper<MetadataEntity> wrapper= Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetadataEntity::getParentId,parnetId).eq(MetadataEntity::getDatasourceId,datasourceId).last("limit 1");
|
||||
return Result.ok(MetadataConvert.INSTANCE.convertDto(metadataService.getOne(wrapper)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataDto> getMetadataById(Long metadataId) {
|
||||
return Result.ok(MetadataConvert.INSTANCE.convertDto(metadataService.getById(metadataId)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataDto> getByParentIdAndOtherInfo(Long parnetId, Long datasourceId, String code, Long metamodelId) {
|
||||
LambdaQueryWrapper<MetadataEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetadataEntity::getParentId,parnetId).eq(datasourceId!=null,MetadataEntity::getDatasourceId,datasourceId)
|
||||
.eq(MetadataEntity::getCode,code)
|
||||
.eq(datasourceId==null,MetadataEntity::getDbType, DbType.MIDDLE_DB.getValue())
|
||||
.eq(MetadataEntity::getMetamodelId,metamodelId)
|
||||
.last("limit 1");
|
||||
return Result.ok(MetadataConvert.INSTANCE.convertDto(metadataService.getOne(wrapper)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataGovernanceMetadataDto addOrUpdateMetadata(DataGovernanceMetadataDto metadataDto) {
|
||||
MetadataEntity entity=MetadataConvert.INSTANCE.convert(metadataDto);
|
||||
if (metadataDto.getId()!=null){
|
||||
metadataService.updateById(entity);
|
||||
}else{
|
||||
metadataService.save(entity);
|
||||
}
|
||||
metadataDto.setId(entity.getId());
|
||||
return metadataDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataPropertyDto> getByPropertyIdAndMetadataId(Long propertyId, Long metadataId) {
|
||||
LambdaQueryWrapper<MetadataPropertyEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetadataPropertyEntity::getId,propertyId).eq(MetadataPropertyEntity::getMetadataId,metadataId).last("limit 1");
|
||||
return Result.ok(MetadataPropertyConvert.INSTANCE.convertDto(metadataPropertyService.getOne(wrapper)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addOrUpdateMetadataProperty(DataGovernanceMetadataPropertyDto metadataPropertyDto) {
|
||||
if (metadataPropertyDto.getId()!=null){
|
||||
metadataPropertyService .save(MetadataPropertyConvert.INSTANCE.convert(metadataPropertyDto));
|
||||
}else {
|
||||
metadataPropertyService.updateById(MetadataPropertyConvert.INSTANCE.convert(metadataPropertyDto));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<DataGovernanceMetadataDto>> listParentIdAndDatasourceId(Long parentId, Long datasourceId, Long metamodelId) {
|
||||
LambdaQueryWrapper<MetadataEntity> wrapper= Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetadataEntity::getParentId,parentId).eq(MetadataEntity::getDatasourceId,datasourceId).eq(MetadataEntity::getMetamodelId,metamodelId);
|
||||
return Result.ok(MetadataConvert.INSTANCE.convertDtoList(metadataService.list(wrapper)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMetadata(Long id) {
|
||||
metadataService.delete(id);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataCollectDto> getByDatasourceId(Long id) {
|
||||
LambdaQueryWrapper<MetadataCollectEntity> wrapper=Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetadataCollectEntity::getDatabaseId,id).last("limit 1");
|
||||
return Result.ok(MetadataCollectConvert.INSTANCE.convertDto(metadataCollectService.getOne(wrapper)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceMetadataDto> getMetadataByDatasourceId(Long id) {
|
||||
LambdaQueryWrapper<MetadataEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetadataEntity::getDatasourceId,id).last("limit 1");
|
||||
return Result.ok(MetadataConvert.INSTANCE.convertDto(metadataService.getOne(wrapper)));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package net.srt.api;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.srt.api.module.data.governance.DataQualityApi;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityConfigDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskColumnDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskDto;
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskTableDto;
|
||||
import net.srt.convert.QualityConfigConvert;
|
||||
import net.srt.convert.QualityTaskColumnConvert;
|
||||
import net.srt.convert.QualityTaskConvert;
|
||||
import net.srt.convert.QualityTaskTableConvert;
|
||||
import net.srt.entity.QualityTaskColumnEntity;
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.entity.QualityTaskTableEntity;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.service.QualityConfigService;
|
||||
import net.srt.service.QualityTaskColumnService;
|
||||
import net.srt.service.QualityTaskService;
|
||||
import net.srt.service.QualityTaskTableService;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.api
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/25 21:01
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class QualityApiImpl implements DataQualityApi {
|
||||
private final QualityConfigService qualityConfigService;
|
||||
private final QualityTaskService qualityTaskService;
|
||||
private final QualityTaskTableService taskTableService;
|
||||
private final QualityTaskColumnService taskColumnService;
|
||||
@Override
|
||||
public Result<DataGovernanceQualityConfigDto> getById(Long id) {
|
||||
return Result.ok(QualityConfigConvert.INSTANCE.convertDto(qualityConfigService.getById(id)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceQualityTaskDto> addQualityTask(DataGovernanceQualityTaskDto qualityTaskDto) {
|
||||
QualityTaskEntity entity= QualityTaskConvert.INSTANCE.covert(qualityTaskDto);
|
||||
qualityTaskService.save(entity);
|
||||
qualityTaskDto.setId(entity.getId());
|
||||
return Result.ok(qualityTaskDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> updateQualityTask(DataGovernanceQualityTaskDto qualityTaskDto) {
|
||||
QualityTaskEntity entity=QualityTaskConvert.INSTANCE.covert(qualityTaskDto);
|
||||
qualityTaskService.updateById(entity);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<DataGovernanceQualityTaskTableDto> addTaskTable(DataGovernanceQualityTaskTableDto qualityTaskTableDto) {
|
||||
QualityTaskTableEntity entity= QualityTaskTableConvert.INSTANCE.convert(qualityTaskTableDto);
|
||||
taskTableService.save(entity);
|
||||
qualityTaskTableDto.setId(entity.getId());
|
||||
return Result.ok(qualityTaskTableDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> updateQualityTaskTable(DataGovernanceQualityTaskTableDto taskTable) {
|
||||
QualityTaskTableEntity entity=QualityTaskTableConvert.INSTANCE.convert(taskTable);
|
||||
taskTableService.updateById(entity);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> addQualityTaskColumns(List<DataGovernanceQualityTaskColumnDto> columnDtos) {
|
||||
List<QualityTaskColumnEntity> columnEntities= QualityTaskColumnConvert.INSTANCE.convertListByDtos(columnDtos);
|
||||
taskColumnService.saveBatch(columnEntities);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package net.srt.constant;
|
||||
|
||||
|
||||
/**
|
||||
* FlinkType
|
||||
*
|
||||
* @author zrx
|
||||
**/
|
||||
public enum StandardDataType {
|
||||
|
||||
/**
|
||||
* 数字
|
||||
*/
|
||||
NUMBER(1, "数字","INT,LONG.NUMBER,BIGINT"),
|
||||
/**
|
||||
* 字符串
|
||||
*/
|
||||
STRING(2, "字符串","CHAR,VARCHAR,NVARCHAR,TEXT,LONGTEXT"),
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
DATE(3, "日期","DATE,DATETIME.TIMESTAMP"),
|
||||
/**
|
||||
* 小数
|
||||
*/
|
||||
NUMBER_SACLE(4, "小数","DOUBLE,NUMBER"),
|
||||
;
|
||||
|
||||
|
||||
private final Integer value;
|
||||
private final String longValue;
|
||||
private final String dbDataTypes;
|
||||
|
||||
StandardDataType(Integer value, String longValue,String dbDataTypes) {
|
||||
this.value = value;
|
||||
this.longValue = longValue;
|
||||
this.dbDataTypes = dbDataTypes;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLongValue() {
|
||||
return longValue;
|
||||
}
|
||||
|
||||
public String getDbDataTypes() {
|
||||
return dbDataTypes;
|
||||
}
|
||||
|
||||
public static StandardDataType getByCode(String value) {
|
||||
for (StandardDataType standardDataType : StandardDataType.values()) {
|
||||
if (standardDataType.getValue().equals(Integer.parseInt(value))) {
|
||||
return standardDataType;
|
||||
}
|
||||
}
|
||||
return StandardDataType.STRING;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.DatastandardConvert;
|
||||
import net.srt.entity.DatastandardEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.DatastandrdQuery;
|
||||
import net.srt.service.DatastandardService;
|
||||
import net.srt.vo.DatastandardVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName : DatastandardController
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 20:36
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data-standard")
|
||||
@AllArgsConstructor
|
||||
public class DatastandardController {
|
||||
@Autowired
|
||||
DatastandardService datastandardService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<DatastandardVo>> page(@Valid DatastandrdQuery query){
|
||||
PageResult<DatastandardVo> page = datastandardService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary ="信息")
|
||||
public Result<DatastandardVo> get(@PathVariable("id") Integer categoryId) {
|
||||
DatastandardEntity entity = datastandardService.getById(categoryId);
|
||||
return Result.ok(DatastandardConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/table-code/list")
|
||||
@Operation(summary = "查询表编码")
|
||||
public Result<List<DatastandardEntity>> getTableCode(){
|
||||
List<DatastandardEntity> list= datastandardService.getTableCode();
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody DatastandardVo vo) {
|
||||
datastandardService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody @Valid DatastandardVo vo){
|
||||
datastandardService.update1(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList) {
|
||||
datastandardService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.MetadataCollectConvert;
|
||||
import net.srt.entity.MetadataCollectEntity;
|
||||
import net.srt.entity.MetadataCollectQuery;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.service.MetadataCollectService;
|
||||
import net.srt.vo.MetadataCollectVO;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("metadata-collect")
|
||||
@Tag(name = "数据治理-元数据采集")
|
||||
@AllArgsConstructor
|
||||
public class MetadataCollectController {
|
||||
private final MetadataCollectService metadataCollectService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:page')")
|
||||
public Result<PageResult<MetadataCollectVO>> page(@Valid MetadataCollectQuery query){
|
||||
PageResult<MetadataCollectVO> page = metadataCollectService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:info')")
|
||||
public Result<MetadataCollectVO> get(@PathVariable("id") Long id){
|
||||
MetadataCollectEntity entity = metadataCollectService.getById(id);
|
||||
return Result.ok(MetadataCollectConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:save')")
|
||||
public Result<String> save(@RequestBody MetadataCollectVO vo){
|
||||
metadataCollectService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:update')")
|
||||
public Result<String> update(@RequestBody @Valid MetadataCollectVO vo){
|
||||
metadataCollectService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping("/release/{id}")
|
||||
@Operation(summary = "发布")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:release')")
|
||||
public Result<String> release(@PathVariable Long id){
|
||||
metadataCollectService.release(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping("/cancel/{id}")
|
||||
@Operation(summary = "取消发布")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:cancel')")
|
||||
public Result<String> cancel(@PathVariable Long id){
|
||||
metadataCollectService.cancel(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PostMapping("hand-run/{id}")
|
||||
@Operation(summary = "手动执行")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:hand-run')")
|
||||
public Result<String> handRun(@PathVariable Long id){
|
||||
metadataCollectService.handRun(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('data-governance:metadata-collect:delete')")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
metadataCollectService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.MetadataCollectRecordConvert;
|
||||
import net.srt.entity.MetadataCollectRecordEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.MetadataCollectRecordQuery;
|
||||
import net.srt.service.MetadataCollectRecordService;
|
||||
import net.srt.vo.MetadataCollectRecordVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("metadata-collect-record")
|
||||
@Tag(name = "数据治理-元数据采集任务记录")
|
||||
@AllArgsConstructor
|
||||
public class MetadataCollectRecordController {
|
||||
private final MetadataCollectRecordService metadataCollectRecordService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<MetadataCollectRecordVO>> page(@Valid MetadataCollectRecordQuery query){
|
||||
PageResult<MetadataCollectRecordVO> page = metadataCollectRecordService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetadataCollectRecordVO> get(@PathVariable Long id){
|
||||
MetadataCollectRecordEntity entity = metadataCollectRecordService.getById(id);
|
||||
return Result.ok(MetadataCollectRecordConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList) {
|
||||
metadataCollectRecordService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.framework.common.cache.bean.Neo4jInfo;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNode;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.service.MetadataService;
|
||||
import net.srt.vo.MetadataVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("metadata")
|
||||
@Tag(name = "数据治理-元数据")
|
||||
@AllArgsConstructor
|
||||
public class MetadataController {
|
||||
private final MetadataService metadataService;
|
||||
|
||||
/**
|
||||
* 根据父级id获取子节点信息
|
||||
*
|
||||
* @param parentId 父级id
|
||||
* @return 子节点信息列表
|
||||
*/
|
||||
@GetMapping("/list-child")
|
||||
@Operation(summary = "根据父级id获取信息")
|
||||
public Result<List<TreeNodeVo>> listByParentId(@RequestParam Long parentId){
|
||||
List<TreeNodeVo> treeNodeVos = metadataService.listByParentId(parentId);
|
||||
return Result.ok(treeNodeVos);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取目录树
|
||||
* @return 目录树数据
|
||||
*/
|
||||
@GetMapping("/list-floder")
|
||||
@Operation(summary = "获取目录树")
|
||||
public Result<List<TreeNodeVo>> listFloder(){
|
||||
List<TreeNodeVo> treeNodeVos = metadataService.listFloder();
|
||||
return Result.ok(treeNodeVos);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取库表目录树
|
||||
* @return 结果包含库表目录树节点列表
|
||||
*/
|
||||
@GetMapping("/list-db")
|
||||
@Operation(summary = "获取库表目录树")
|
||||
public Result<List<TreeNodeVo>> listDb(){
|
||||
List<TreeNodeVo> treeNodeVos = metadataService.listDb();
|
||||
return Result.ok(treeNodeVos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/list-keyword")
|
||||
@Operation(summary = "模糊查询")
|
||||
public Result<List<TreeNodeVo>> listByKeyword(String keyword){
|
||||
List<TreeNodeVo> treeNodeVos = metadataService.listByKeyword(keyword);
|
||||
return Result.ok(treeNodeVos);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetadataVO> get(@PathVariable("id") Long id){
|
||||
return Result.ok(metadataService.get(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetadataVO vo){
|
||||
metadataService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody @Valid MetadataVO vo) {
|
||||
metadataService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@PathVariable Long id) {
|
||||
metadataService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/neo4j")
|
||||
@Operation(summary = "更新neo4j的url")
|
||||
public Result<String> upNeo4jInfo(@RequestBody Neo4jInfo neo4jInfo){
|
||||
metadataService.upNeo4jInfo(neo4jInfo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@GetMapping("/neo4j")
|
||||
@Operation(summary = "获取neo4j的url")
|
||||
public Result<Neo4jInfo> getNeo4jInfo(){
|
||||
return Result.ok(metadataService.getNeo4jInfo());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.MetadataPropertyConvert;
|
||||
import net.srt.entity.MetadataPropertyEntity;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.service.MetadataPropertyService;
|
||||
import net.srt.vo.MetadataPropertyVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("metadata-property")
|
||||
@Tag(name = "数据治理-元数据属性值")
|
||||
@AllArgsConstructor
|
||||
public class MetadataPropertyController {
|
||||
private final MetadataPropertyService metadataPropertyService;
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetadataPropertyVo> get(@PathVariable("id") Long id) {
|
||||
MetadataPropertyEntity entity = metadataPropertyService.getById(id);
|
||||
return Result.ok(MetadataPropertyConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetadataPropertyVo vo){
|
||||
metadataPropertyService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody @Valid MetadataPropertyVo vo){
|
||||
metadataPropertyService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
metadataPropertyService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.MetadataStandardRelConvert;
|
||||
import net.srt.entity.MetadataStandardRelEntity;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.service.MetadataStandardRelService;
|
||||
import net.srt.vo.MetadataStandardRelVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("standard-rel")
|
||||
@Tag(name = "数据治理-元数据标准关联表")
|
||||
@AllArgsConstructor
|
||||
public class MetadataStandarRelController {
|
||||
private final MetadataStandardRelService metadataStandardRelService;
|
||||
|
||||
@GetMapping("/{metadataId}/{metadata-rel}")
|
||||
@Operation(summary = "根据metadataId获取标准字段")
|
||||
public Result<MetadataStandardRelVO> getMetadataRel(@PathVariable("metadataId") Long metadataId){
|
||||
MetadataStandardRelVO standardRelVO = metadataStandardRelService.getMetadataRel(metadataId);
|
||||
return Result.ok(standardRelVO);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetadataStandardRelVO> get(@PathVariable("id") Long id) {
|
||||
MetadataStandardRelEntity entity = metadataStandardRelService.getById(id);
|
||||
return Result.ok(MetadataStandardRelConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetadataStandardRelVO vo){
|
||||
metadataStandardRelService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping("/{metadataId}/{standardId}")
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@PathVariable Long metadataId,@PathVariable Long standardId){
|
||||
metadataStandardRelService.delete(metadataId,standardId);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.MetamodelConvert;
|
||||
import net.srt.entity.MetamodelEntity;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.service.MetamodelService;
|
||||
import net.srt.vo.MetamodelVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/metamodel")
|
||||
@Tag(name = "数据治理-元模型")
|
||||
@AllArgsConstructor
|
||||
public class MetamodelController {
|
||||
private final MetamodelService metamodelService;
|
||||
|
||||
/**
|
||||
* 获取元模型列表
|
||||
*/
|
||||
@GetMapping("list-tree")
|
||||
@Operation(summary = "获取元模型列表")
|
||||
public Result<List<TreeNodeVo>> listTree(){
|
||||
// 调用metamodelService的listTree方法获取元模型列表
|
||||
List<TreeNodeVo> TreeNodeVos = metamodelService.listTree();
|
||||
// 将元模型列表返回给客户端
|
||||
return Result.ok(TreeNodeVos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID获取信息
|
||||
* @param id ID值
|
||||
* @return 信息的Result对象
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetamodelVO> get(@PathVariable("id") Long id){
|
||||
MetamodelEntity entity = metamodelService.getById(id);
|
||||
return Result.ok(MetamodelConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存功能
|
||||
*
|
||||
* @param vo 要保存的信息
|
||||
* @return 保存结果
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetamodelVO vo){
|
||||
metamodelService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改操作
|
||||
*
|
||||
* @param vo 修改参数
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody MetamodelVO vo){
|
||||
metamodelService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据指定的ID删除数据
|
||||
* @param id 要删除的数据的ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@PathVariable Long id){
|
||||
metamodelService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.MetamodelPropertyConvert;
|
||||
import net.srt.entity.MetamodelPropertyEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.MetamodelpropertyQuery;
|
||||
import net.srt.service.MetamodelPropertyService;
|
||||
import net.srt.vo.MetamodelPropertyVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("metamodel-property")
|
||||
@Tag(name = "数据治理-元模型属性")
|
||||
@AllArgsConstructor
|
||||
public class MetamodelPropertyController {
|
||||
private final MetamodelPropertyService metamodelPropertyService;
|
||||
|
||||
/**
|
||||
* 根据id获取属性列表
|
||||
* @param id 属性id
|
||||
* @return 属性列表
|
||||
*/
|
||||
@GetMapping("/properties/{metaModelId}")
|
||||
@Operation(summary = "根据id获取属性列表")
|
||||
public Result<List<MetamodelPropertyVO>> properties(@PathVariable Long id){
|
||||
List<MetamodelPropertyVO> properties = metamodelPropertyService.properties(id);
|
||||
return Result.ok(properties);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询属性
|
||||
* @param query 属性查询对象
|
||||
* @return 分页结果
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<MetamodelPropertyVO>> page(@Valid MetamodelpropertyQuery query){
|
||||
PageResult<MetamodelPropertyVO> page = metamodelPropertyService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID获取信息
|
||||
*
|
||||
* @param id ID值
|
||||
* @return 信息的Result对象
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetamodelPropertyVO> get(@PathVariable("id") Long id){
|
||||
MetamodelPropertyEntity entity = metamodelPropertyService.getById(id);
|
||||
return Result.ok(MetamodelPropertyConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存功能
|
||||
*
|
||||
* @param vo 要保存的数据
|
||||
* @return 保存结果
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetamodelPropertyVO vo){
|
||||
metamodelPropertyService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param vo 要修改的数据
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody MetamodelPropertyVO vo){
|
||||
metamodelPropertyService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除功能
|
||||
*
|
||||
* @param idList 要删除的数据ID列表
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
metamodelPropertyService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.QualityConfigCategoryConvert;
|
||||
import net.srt.entity.QualityConfigCategoryEntity;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.service.QualityConfigCategoryService;
|
||||
import net.srt.vo.QualityConfigCategoryVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.controller
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/23 13:31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/quality-config-category")
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "数据治理-规则配置")
|
||||
public class QualityConfigCategoryController {
|
||||
private final QualityConfigCategoryService qualityConfigCategoryService;
|
||||
|
||||
@GetMapping("/list-tree")
|
||||
@Operation(summary = "获取规则配置数")
|
||||
public Result<List<TreeNodeVo>> listTree(){
|
||||
List<TreeNodeVo> list=qualityConfigCategoryService.listTree();
|
||||
return Result.ok(list);
|
||||
}
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<QualityConfigCategoryVo> get(@PathVariable("id") Long id){
|
||||
QualityConfigCategoryEntity entity=qualityConfigCategoryService.getById(id);
|
||||
return Result.ok(QualityConfigCategoryConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@GetMapping()
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody @Valid QualityConfigCategoryVo vo){
|
||||
qualityConfigCategoryService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody QualityConfigCategoryVo vo){
|
||||
qualityConfigCategoryService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@PathVariable Long id){
|
||||
qualityConfigCategoryService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.QualityConfigQuery;
|
||||
import net.srt.service.QualityConfigService;
|
||||
import net.srt.vo.QualityConfigVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.controller
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 19:31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/quality-config")
|
||||
@Tag(name = "数据治理-质量规则配置")
|
||||
@AllArgsConstructor
|
||||
public class QualityConfigController {
|
||||
private final QualityConfigService qualityConfigService;
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<QualityConfigVo>> page(@Valid QualityConfigQuery query){
|
||||
PageResult<QualityConfigVo> page= qualityConfigService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<QualityConfigVo> get(@PathVariable("id") Long id){
|
||||
return Result.ok(qualityConfigService.get(id));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody QualityConfigVo vo){
|
||||
qualityConfigService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody @Valid QualityConfigVo vo){
|
||||
qualityConfigService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping("/online/{id}")
|
||||
@Operation(summary = "启用")
|
||||
public Result<String> online(@PathVariable Long id){
|
||||
qualityConfigService.online(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping("/offline/{id}")
|
||||
@Operation(summary = "关闭")
|
||||
public Result<String> offline(@PathVariable Long id){
|
||||
qualityConfigService.offline(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping("/hand-run/{id}")
|
||||
@Operation(summary = "手动执行")
|
||||
public Result<String> handRun(@PathVariable Long id){
|
||||
qualityConfigService.handRun(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
qualityConfigService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.QualityRuleConvert;
|
||||
import net.srt.entity.QualityQueryEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.QualityRuleQuery;
|
||||
import net.srt.service.QualityRuleService;
|
||||
import net.srt.vo.QualityRuleVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.controller
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/20 19:49
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/quality-rule")
|
||||
@Tag(name = "数据治理-质量规则")
|
||||
@AllArgsConstructor
|
||||
public class QualityRuleController {
|
||||
private final QualityRuleService dataGovernanceQualityRuleService;
|
||||
@GetMapping("list")
|
||||
@Operation(summary = "查询列表")
|
||||
public Result<List<QualityRuleVo>> list(){
|
||||
List<QualityQueryEntity> list=dataGovernanceQualityRuleService.list();
|
||||
return Result.ok(QualityRuleConvert.INSTANCE.convertList(list));
|
||||
|
||||
}
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<QualityRuleVo>> page(@Valid QualityRuleQuery query){
|
||||
PageResult<QualityRuleVo> page=dataGovernanceQualityRuleService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "报存")
|
||||
public Result<String> save(@RequestBody QualityRuleVo vo){
|
||||
dataGovernanceQualityRuleService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.QualityTaskColumnQuery;
|
||||
import net.srt.service.QualityTaskColumnService;
|
||||
import net.srt.vo.QualityTaskColumnVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.controller
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/23 11:19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/quality-task-column")
|
||||
@Tag(name = "数据治理-列检测模块")
|
||||
@AllArgsConstructor
|
||||
public class QualityTaskColumnController {
|
||||
private final QualityTaskColumnService qualityTaskColumnService;
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<QualityTaskColumnVo>> page(@Valid QualityTaskColumnQuery query){
|
||||
PageResult<QualityTaskColumnVo> page = qualityTaskColumnService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idlist){
|
||||
qualityTaskColumnService.delete(idlist);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.QualityTaskConvert;
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.QualityTaskQuery;
|
||||
import net.srt.service.QualityTaskService;
|
||||
import net.srt.vo.QualityTaskVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.controller
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 11:29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/quality-task")
|
||||
@Tag(name = "数据治理-数据质量")
|
||||
@AllArgsConstructor
|
||||
public class QualityTaskController {
|
||||
private final QualityTaskService qualityTaskService;
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<QualityTaskVo>> page(@Valid QualityTaskQuery query){
|
||||
return Result.ok(qualityTaskService.pagea(query));
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<QualityTaskVo> get(@PathVariable("id") Long id){
|
||||
QualityTaskEntity entity=qualityTaskService.getById(id);
|
||||
return Result.ok(QualityTaskConvert.INSTANCE.covert(entity));
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
qualityTaskService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.QualityTaskTableConvert;
|
||||
import net.srt.entity.QualityTaskTableEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.QualityTableQuery;
|
||||
import net.srt.service.QualityTaskTableService;
|
||||
import net.srt.vo.QualityTaskTableVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.controller
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/22 19:34
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/quality-task-table")
|
||||
@Tag(name = "数据治理-表检测模块")
|
||||
@AllArgsConstructor
|
||||
public class QualityTaskTableController {
|
||||
private final QualityTaskTableService qualityTaskTableService;
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<QualityTaskTableVo>> page(@Valid QualityTableQuery query){
|
||||
PageResult<QualityTaskTableVo> pageResult =qualityTaskTableService.page(query);
|
||||
return Result.ok(pageResult);
|
||||
}
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<QualityTaskTableVo> get(@PathVariable("id") Long id){
|
||||
QualityTaskTableEntity entity=qualityTaskTableService.getById(id);
|
||||
return Result.ok(QualityTaskTableConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
private Result<String> delete(@RequestBody List<Long> idlist){
|
||||
qualityTaskTableService.delete(idlist);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.service.StandardService;
|
||||
import net.srt.vo.StandardManagementVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardController
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("standard-category")
|
||||
@Tag(name = "数据开发-调度中心目录")
|
||||
public class StandardController {
|
||||
@Autowired
|
||||
StandardService standardService;
|
||||
|
||||
@GetMapping("/list-tree")
|
||||
@Operation(summary = "查询文件分组树")
|
||||
public Result<List<TreeNodeVo>> listTree() {
|
||||
return Result.ok(standardService.listTree());
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody StandardManagementVo vo) {
|
||||
standardService.save1(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody StandardManagementVo vo) {
|
||||
standardService.update1(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(Long id) {
|
||||
standardService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.convert.StandardStopwatchConvert;
|
||||
import net.srt.entity.StandardStopwatchEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.query.StandardStopwatchQuery;
|
||||
import net.srt.service.StandardStopwatchService;
|
||||
import net.srt.vo.StandardStopwatchVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardStopwatchController
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-24 10:32
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/standard-code")
|
||||
@Tag(name="数据治理-标准码表数据")
|
||||
@AllArgsConstructor
|
||||
public class StandardStopwatchController {
|
||||
private final StandardStopwatchService standardStopwatchService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<StandardStopwatchVo>> page(@Valid StandardStopwatchQuery query){
|
||||
PageResult<StandardStopwatchVo> page = standardStopwatchService.page(query);
|
||||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<StandardStopwatchVo> get(@PathVariable("id") Long id){
|
||||
StandardStopwatchEntity entity = standardStopwatchService.getById(id);
|
||||
|
||||
return Result.ok(StandardStopwatchConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody StandardStopwatchVo vo){
|
||||
standardStopwatchService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody @Valid StandardStopwatchVo vo){
|
||||
standardStopwatchService.update(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
standardStopwatchService.delete(idList);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.DatastandardEntity;
|
||||
import net.srt.vo.DatastandardVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/20 19:50
|
||||
*/
|
||||
|
||||
@Mapper
|
||||
public interface DatastandardConvert {
|
||||
DatastandardConvert INSTANCE = Mappers.getMapper(DatastandardConvert.class);
|
||||
|
||||
|
||||
List<DatastandardVo> convertList(List<DatastandardEntity> list);
|
||||
|
||||
|
||||
DatastandardVo convert(DatastandardEntity entity);
|
||||
DatastandardEntity convert(DatastandardVo entity);
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataCollectDto;
|
||||
import net.srt.entity.MetadataCollectEntity;
|
||||
import net.srt.vo.MetadataCollectVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataCollectConvert {
|
||||
MetadataCollectConvert INSTANCE = Mappers.getMapper(MetadataCollectConvert.class);
|
||||
|
||||
MetadataCollectEntity convert(MetadataCollectVO vo);
|
||||
|
||||
MetadataCollectEntity convert(DataGovernanceMetadataCollectDto dto);
|
||||
|
||||
DataGovernanceMetadataCollectDto convertDto(MetadataCollectEntity entity);
|
||||
|
||||
MetadataCollectVO convert(MetadataCollectEntity entity);
|
||||
|
||||
List<MetadataCollectVO> convertList(List<MetadataCollectEntity> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataCollectRecordDto;
|
||||
import net.srt.entity.MetadataCollectRecordEntity;
|
||||
import net.srt.vo.MetadataCollectRecordVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataCollectRecordConvert {
|
||||
MetadataCollectRecordConvert INSTANCE = Mappers.getMapper(MetadataCollectRecordConvert.class);
|
||||
|
||||
MetadataCollectRecordEntity convert(MetadataCollectRecordVO vo);
|
||||
|
||||
MetadataCollectRecordEntity convert(DataGovernanceMetadataCollectRecordDto dto);
|
||||
|
||||
MetadataCollectRecordVO convert(MetadataCollectRecordEntity entity);
|
||||
|
||||
List<MetadataCollectRecordVO> convertList(List<MetadataCollectRecordEntity> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataDto;
|
||||
import net.srt.entity.MetadataEntity;
|
||||
import net.srt.vo.MetadataVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataConvert {
|
||||
MetadataConvert INSTANCE = Mappers.getMapper(MetadataConvert.class);
|
||||
|
||||
MetadataEntity convert(MetadataVO vo);
|
||||
|
||||
MetadataEntity convert(DataGovernanceMetadataDto dto);
|
||||
|
||||
MetadataVO convert(MetadataEntity entity);
|
||||
|
||||
DataGovernanceMetadataDto convertDto(MetadataEntity entity);
|
||||
|
||||
List<MetadataVO> convertList(List<MetadataEntity> list);
|
||||
|
||||
List<DataGovernanceMetadataDto> convertDtoList(List<MetadataEntity> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceMetadataPropertyDto;
|
||||
import net.srt.entity.MetadataPropertyEntity;
|
||||
import net.srt.vo.MetadataPropertyVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataPropertyConvert {
|
||||
MetadataPropertyConvert INSTANCE = Mappers.getMapper(MetadataPropertyConvert.class);
|
||||
|
||||
MetadataPropertyEntity convert(MetadataPropertyVo vo);
|
||||
|
||||
MetadataPropertyEntity convert(DataGovernanceMetadataPropertyDto dto);
|
||||
|
||||
MetadataPropertyVo convert(MetadataPropertyEntity entity);
|
||||
|
||||
DataGovernanceMetadataPropertyDto convertDto(MetadataPropertyEntity entity);
|
||||
|
||||
List<MetadataPropertyVo> convertList(List<MetadataPropertyEntity> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.MetadataStandardRelEntity;
|
||||
import net.srt.vo.MetadataStandardRelVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataStandardRelConvert {
|
||||
MetadataStandardRelConvert INSTANCE = Mappers.getMapper(MetadataStandardRelConvert.class);
|
||||
|
||||
MetadataStandardRelEntity convert(MetadataStandardRelVO vo);
|
||||
|
||||
MetadataStandardRelVO convert(MetadataStandardRelEntity entity);
|
||||
|
||||
List<MetadataStandardRelVO> convertList(List<MetadataStandardRelEntity> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.MetamodelEntity;
|
||||
import net.srt.vo.MetamodelVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
@Mapper
|
||||
public interface MetamodelConvert {
|
||||
MetamodelConvert INSTANCE = Mappers.getMapper(MetamodelConvert.class);
|
||||
|
||||
MetamodelEntity convert(MetamodelVO vo);
|
||||
|
||||
MetamodelVO convert(MetamodelEntity entity);
|
||||
|
||||
List<MetamodelVO> convertList(List<MetamodelEntity> list);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.MetamodelPropertyEntity;
|
||||
import net.srt.vo.MetamodelPropertyVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetamodelPropertyConvert {
|
||||
MetamodelPropertyConvert INSTANCE = Mappers.getMapper(MetamodelPropertyConvert.class);
|
||||
|
||||
MetamodelPropertyEntity convert(MetamodelPropertyVO vo);
|
||||
|
||||
MetamodelPropertyVO convert(MetamodelPropertyEntity entity);
|
||||
|
||||
List<MetamodelPropertyVO> convertList(List<MetamodelPropertyEntity> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.QualityConfigCategoryEntity;
|
||||
import net.srt.vo.QualityConfigCategoryVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 10:27
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityConfigCategoryConvert {
|
||||
QualityConfigCategoryConvert INSTANCE = Mappers.getMapper(QualityConfigCategoryConvert.class);
|
||||
|
||||
QualityConfigCategoryEntity convert(QualityConfigCategoryVo vo);
|
||||
QualityConfigCategoryVo convert(QualityConfigCategoryEntity entity);
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityConfigDto;
|
||||
import net.srt.entity.QualityConfigEntity;
|
||||
import net.srt.vo.QualityConfigVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 19:57
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityConfigConvert {
|
||||
QualityConfigConvert INSTANCE = Mappers.getMapper(QualityConfigConvert.class);
|
||||
|
||||
QualityConfigVo convert(QualityConfigEntity entity);
|
||||
|
||||
QualityConfigEntity convert(QualityConfigVo vo);
|
||||
|
||||
List<QualityConfigVo> convertList(List<QualityConfigEntity> list);
|
||||
|
||||
DataGovernanceQualityConfigDto convertDto(QualityConfigEntity entity);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.QualityQueryEntity;
|
||||
import net.srt.vo.QualityRuleVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/20 19:50
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityRuleConvert {
|
||||
|
||||
|
||||
QualityRuleConvert INSTANCE = Mappers.getMapper(QualityRuleConvert.class);
|
||||
|
||||
|
||||
List<QualityRuleVo> convertList(List<QualityQueryEntity> list);
|
||||
|
||||
QualityQueryEntity conver(QualityRuleVo vo);
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskColumnDto;
|
||||
import net.srt.entity.QualityTaskColumnEntity;
|
||||
import net.srt.vo.QualityTaskColumnVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/23 11:59
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityTaskColumnConvert {
|
||||
|
||||
|
||||
QualityTaskColumnConvert INSTANCE = Mappers.getMapper(QualityTaskColumnConvert.class);
|
||||
|
||||
|
||||
List<QualityTaskColumnVo> convertList(List<QualityTaskColumnEntity> list);
|
||||
|
||||
QualityTaskColumnEntity conver(QualityTaskColumnVo vo);
|
||||
|
||||
List<QualityTaskColumnEntity> convertListByDtos(List<DataGovernanceQualityTaskColumnDto> dtos);
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskDto;
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.vo.QualityTaskVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 11:42
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityTaskConvert {
|
||||
|
||||
|
||||
QualityTaskConvert INSTANCE = Mappers.getMapper(QualityTaskConvert.class);
|
||||
|
||||
List<QualityTaskVo> covertList(List<QualityTaskEntity> list);
|
||||
|
||||
QualityTaskVo covert(QualityTaskEntity entity);
|
||||
|
||||
QualityTaskEntity covert(DataGovernanceQualityTaskDto dto);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.api.module.data.governance.dto.DataGovernanceQualityTaskTableDto;
|
||||
import net.srt.entity.QualityTaskTableEntity;
|
||||
import net.srt.vo.QualityTaskTableVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.convert
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/22 20:49
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityTaskTableConvert {
|
||||
QualityTaskTableConvert INSTANCE = Mappers.getMapper(QualityTaskTableConvert.class);
|
||||
|
||||
List<QualityTaskTableVo> convertList(List<QualityTaskTableEntity> list);
|
||||
|
||||
QualityTaskTableVo convert(QualityTaskTableEntity entity);
|
||||
|
||||
QualityTaskTableEntity convert(DataGovernanceQualityTaskTableDto dto);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.StandardEntity;
|
||||
import net.srt.vo.StandardManagementVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardConvert
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-23 12:14
|
||||
*/
|
||||
@Mapper
|
||||
public interface StandardConvert {
|
||||
|
||||
StandardConvert INSTANCE = Mappers.getMapper(StandardConvert.class);
|
||||
|
||||
StandardEntity convert(StandardManagementVo vo);
|
||||
|
||||
StandardManagementVo convert(StandardEntity entity);
|
||||
|
||||
List<StandardManagementVo> convertList(List<StandardEntity> list);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.StandardStopwatchEntity;
|
||||
import net.srt.vo.StandardStopwatchVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardStopwatchConvert
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-24 10:33
|
||||
*/
|
||||
@Mapper
|
||||
public interface StandardStopwatchConvert {
|
||||
StandardStopwatchConvert INSTANCE = Mappers.getMapper(StandardStopwatchConvert.class);
|
||||
|
||||
StandardStopwatchEntity convert(StandardStopwatchVo vo);
|
||||
|
||||
StandardStopwatchVo convert(StandardStopwatchEntity entity);
|
||||
|
||||
List<StandardStopwatchVo> convertList(List<StandardStopwatchEntity> list);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.DatastandardEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @ClassName : DatastandardDao
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-21 11:09
|
||||
*/
|
||||
@Mapper
|
||||
public interface DatastandardDao extends BaseDao<DatastandardEntity> {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetadataCollectEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataCollectDao extends BaseDao<MetadataCollectEntity> {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetadataCollectRecordEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataCollectRecordDao extends BaseDao<MetadataCollectRecordEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetadataEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 14:39
|
||||
*/
|
||||
@Mapper
|
||||
public interface MetadataDao extends BaseDao<MetadataEntity> {
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetadataPropertyEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import net.srt.vo.MetamodelPropertyVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataPropertyDao extends BaseDao<MetadataPropertyEntity> {
|
||||
List<MetamodelPropertyVO> listPropertyById(@Param("id") Long id, @Param("metamodelId") Long metamodelId);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetadataStandardRelEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MetadataStandardRelDao extends BaseDao<MetadataStandardRelEntity> {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetamodelEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MetamodelDao extends BaseDao<MetamodelEntity> {
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.MetamodelPropertyEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MetamodelPropertyDao extends BaseDao<MetamodelPropertyEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.QualityConfigCategoryEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 9:47
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityConfigCategoryDao extends BaseDao<QualityConfigCategoryEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.QualityConfigEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 11:36
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityConfigDao extends BaseDao<QualityConfigEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.QualityQueryEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/20 19:50
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityRuleDao extends BaseDao<QualityQueryEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.QualityTaskColumnEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/22 21:37
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityTaskColumnDao extends BaseDao<QualityTaskColumnEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 11:38
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityTaskDao extends BaseDao<QualityTaskEntity> {
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.QualityTaskTableEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.dao
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/22 20:18
|
||||
*/
|
||||
@Mapper
|
||||
public interface QualityTaskTableDao extends BaseDao<QualityTaskTableEntity> {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.srt.entity.StandardEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @ClassName : standardMapper
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:30
|
||||
*/
|
||||
@Mapper
|
||||
public interface StandardDao extends BaseMapper<StandardEntity> {
|
||||
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package net.srt.dao;
|
||||
|
||||
import net.srt.entity.StandardStopwatchEntity;
|
||||
import net.srt.framework.mybatis.dao.BaseDao;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardStopwatchDao
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-24 10:33
|
||||
*/
|
||||
@Mapper
|
||||
public interface StandardStopwatchDao extends BaseDao<StandardStopwatchEntity> {
|
||||
void updateCodeNumByStandardId(@Param("standardId") Long standardId);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package net.srt.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName CompareResult
|
||||
* @Author zrx
|
||||
* @Date 2023/5/27 10:16
|
||||
*/
|
||||
@Data
|
||||
public class CompareResult {
|
||||
private String property;
|
||||
private String metadataVal;
|
||||
private String standardVal;
|
||||
private boolean standard;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package net.srt.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName StandardCheckDto
|
||||
* @Author zrx
|
||||
* @Date 2023/5/26 11:46
|
||||
*/
|
||||
@Data
|
||||
public class StandardCheckDto {
|
||||
//数据属性比对结果
|
||||
private List<CompareResult> compareResults;
|
||||
//是否关联了码表
|
||||
private Boolean relStandardCode;
|
||||
//是否有码表数据
|
||||
private Boolean hasStandardCode;
|
||||
private String fillNumSql;
|
||||
//符合标准数量
|
||||
private Object fillNum;
|
||||
private String notFillNumSql;
|
||||
//不符合标准数量
|
||||
private Object notFullNum;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @ClassName : DatastandardEntity
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-21 11:09
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("standard_management")
|
||||
public class DatastandardEntity extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Integer categoryId;
|
||||
private String engName;
|
||||
private String cnName;
|
||||
private Integer codeNum;
|
||||
private String dataType;
|
||||
private Integer dataLength;
|
||||
private Integer dataPrecision;
|
||||
private Integer nullable;
|
||||
private Integer standardCodeId;
|
||||
private Integer type;
|
||||
private String note;
|
||||
private Long projectId;
|
||||
private Integer status;
|
||||
private Integer ifStandardRel;
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metadata_collect")
|
||||
public class MetadataCollectEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据库类型(1-数据库 2-中台库)
|
||||
*/
|
||||
private Integer dbType;
|
||||
|
||||
/**
|
||||
* 数据库主键id
|
||||
*/
|
||||
private Long databaseId;
|
||||
|
||||
/**
|
||||
* 入库策略,0-全量,1-增量
|
||||
*/
|
||||
private Integer strategy;
|
||||
|
||||
/**
|
||||
* 任务类型 1一次性 2.周期性
|
||||
*/
|
||||
private Integer taskType;
|
||||
|
||||
/**
|
||||
* cron表达式(秒 分 时 日 月 星期 年,例如 0 0 3 * * ? 表示每天凌晨三点执行)
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String cron;
|
||||
|
||||
/**
|
||||
* 归属元数据的目录
|
||||
*/
|
||||
private Long metadataId;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 是否已发布 0-否 1-是
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Date releaseTime;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.common.query.Query;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "数据治理-元数据采集查询")
|
||||
public class MetadataCollectQuery extends Query {
|
||||
private String name;
|
||||
/**
|
||||
* 入库策略,0-全量,1-增量
|
||||
*/
|
||||
private Integer strategy;
|
||||
|
||||
/**
|
||||
* 任务类型 1一次性 2.周期性
|
||||
*/
|
||||
private Integer taskType;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metadata_collect_record")
|
||||
public class MetadataCollectRecordEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 采集任务id
|
||||
*/
|
||||
private Long metadataCollectId;
|
||||
|
||||
/**
|
||||
* 1-成功 0-失败 2-运行中
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 实时日志
|
||||
*/
|
||||
private String realTimeLog;
|
||||
|
||||
/**
|
||||
* 错误日志
|
||||
*/
|
||||
private String errorLog;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 项目(租户)id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.entity
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 14:36
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metadata")
|
||||
public class MetadataEntity extends BaseEntity {
|
||||
/**
|
||||
* 父级id(默认0为顶级)
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 树状节点的路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 节点英文名称
|
||||
*/
|
||||
private String code;
|
||||
|
||||
private Integer ifLeaf;
|
||||
/**
|
||||
* 对应的元模型id
|
||||
*/
|
||||
private Long metamodelId;
|
||||
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 数据库类型(1-数据库 2-中台库)
|
||||
*/
|
||||
private Integer dbType;
|
||||
|
||||
/**
|
||||
* 如果是外部系统接入的库表,需要此字段
|
||||
*/
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 采集任务id
|
||||
*/
|
||||
private Long collectTaskId;
|
||||
|
||||
/**
|
||||
* 项目id(租户id)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
|
||||
private Integer orderNo;
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metadata_property")
|
||||
public class MetadataPropertyEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
*/
|
||||
private Long metamodelPropertyId;
|
||||
|
||||
/**
|
||||
* 元数据id
|
||||
*/
|
||||
private Long metadataId;
|
||||
|
||||
/**
|
||||
* 属性值
|
||||
*/
|
||||
private String property;
|
||||
|
||||
/**
|
||||
* 项目id(租户id)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_standard")
|
||||
public class MetadataStandardEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 所属目录id
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 标准英文名称
|
||||
*/
|
||||
private String engName;
|
||||
|
||||
/**
|
||||
* 标准中文名称
|
||||
*/
|
||||
private String cnName;
|
||||
|
||||
/**
|
||||
* 编码数
|
||||
*/
|
||||
private Integer codeNum;
|
||||
|
||||
/**
|
||||
* 数据类型 数字,字符串,日期,小数
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private Integer dataLength;
|
||||
|
||||
/**
|
||||
* 精度
|
||||
*/
|
||||
private Integer dataPrecision;
|
||||
|
||||
/**
|
||||
* 非空 0-否 1-是
|
||||
*/
|
||||
private Integer nullable;
|
||||
|
||||
/**
|
||||
* 标准码表id
|
||||
*/
|
||||
private Integer standardCodeId;
|
||||
|
||||
/**
|
||||
* 1-标准字段 2-标准码表
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 项目(租户)id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metadata_standard_rel")
|
||||
public class MetadataStandardRelEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 元数据id
|
||||
*/
|
||||
private Long metadataId;
|
||||
|
||||
/**
|
||||
* 标准字段id
|
||||
*/
|
||||
private Long standardId;
|
||||
|
||||
/**
|
||||
* 真删除
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metamodel")
|
||||
public class MetamodelEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 父id(顶级为0)
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 代码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 是否内置元模型 0-否,1-是
|
||||
*/
|
||||
private Integer builtin;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 是否是目录 0-否 1-是
|
||||
*/
|
||||
private Integer ifLeaf;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 项目id(租户id)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
|
||||
private Integer orderNo;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metamodel_property")
|
||||
public class MetamodelPropertyEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 元模型id
|
||||
*/
|
||||
private Integer metamodelId;
|
||||
|
||||
/**
|
||||
* 属性名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 属性代码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 数据类型 1-数字 2-字符串
|
||||
*/
|
||||
private Integer dataType;
|
||||
|
||||
/**
|
||||
* 数据长度
|
||||
*/
|
||||
private Integer dataLength;
|
||||
|
||||
/**
|
||||
* 输入控件,1-文本框
|
||||
*/
|
||||
private Integer inputType;
|
||||
|
||||
/**
|
||||
* 允许为空 0-否 1-是
|
||||
*/
|
||||
private Integer nullable;
|
||||
|
||||
/**
|
||||
* 是否内置 0-否 1-是
|
||||
*/
|
||||
private Integer builtin;
|
||||
|
||||
/**
|
||||
* 项目id(租户id)
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 注释
|
||||
*/
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
private Integer orderNo;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.entity
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/24 9:20
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_quality_config_category")
|
||||
public class QualityConfigCategoryEntity extends BaseEntity {
|
||||
/**
|
||||
* 0-普通目录 1-规则配置目录
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 父级id(顶级为0)
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 目录名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 目录路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
private Integer orderNo;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 项目(租户)id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue