Merge remote-tracking branch 'origin/dev' into dev
commit
172617c463
|
@ -32,6 +32,11 @@
|
|||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>1.5.0.Beta1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
<version>1.5.0.Beta1</version>
|
||||
</dependency>
|
||||
<!--使用log42j-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -11,11 +11,12 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
|||
* @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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
package net.srt;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Default (Template) Project
|
||||
* @BelongsPackage: net.srt
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/19 22:05
|
||||
*/
|
||||
@EnableFeignClients
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@EnableAsync
|
||||
public class QualittRule {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(QualittRule.class);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
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.StandardManagementQuery;
|
||||
import net.srt.service.DatastandardService;
|
||||
import net.srt.vo.StandardManagementVo;
|
||||
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<StandardManagementVo>> page(@Valid StandardManagementQuery query){
|
||||
PageResult<StandardManagementVo> page = datastandardService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary ="信息")
|
||||
public Result<StandardManagementVo> 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 DatastandardEntity entity) {
|
||||
datastandardService.save(entity);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.tags.Tags;
|
||||
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(){
|
||||
List<TreeNodeVo> TreeNodeVos = metamodelService.listTree();
|
||||
return Result.ok(TreeNodeVos);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetamodelVO> get(@PathVariable("id") Long id){
|
||||
MetamodelEntity entity = metamodelService.getById(id);
|
||||
return Result.ok(MetamodelConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetamodelVO vo){
|
||||
metamodelService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody MetamodelVO vo){
|
||||
metamodelService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@PathVariable Long id){
|
||||
metamodelService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
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;
|
||||
|
||||
@GetMapping("/properties/{metaModelId}")
|
||||
@Operation(summary = "根据id获取属性列表")
|
||||
public Result<List<MetamodelPropertyVO>> properties(@PathVariable Long id){
|
||||
List<MetamodelPropertyVO> properties = metamodelPropertyService.properties(id);
|
||||
return Result.ok(properties);
|
||||
}
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<MetamodelPropertyVO>> page(@Valid MetamodelpropertyQuery query){
|
||||
PageResult<MetamodelPropertyVO> page = metamodelPropertyService.page(query);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@Operation(summary = "信息")
|
||||
public Result<MetamodelPropertyVO> get(@PathVariable("id") Long id){
|
||||
MetamodelPropertyEntity entity = metamodelPropertyService.getById(id);
|
||||
return Result.ok(MetamodelPropertyConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
public Result<String> save(@RequestBody MetamodelPropertyVO vo){
|
||||
metamodelPropertyService.save(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
public Result<String> update(@RequestBody MetamodelPropertyVO vo){
|
||||
metamodelPropertyService.update(vo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
public Result<String> delete(@RequestBody List<Long> idList){
|
||||
metamodelPropertyService.delete(idList);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
|
@ -1,18 +1,21 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import cn.hutool.db.Page;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import oracle.ucp.proxy.annotation.Post;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
|
@ -26,9 +29,24 @@ import javax.validation.Valid;
|
|||
@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){
|
||||
return Result.ok(dataGovernanceQualityRuleService.pagea(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,47 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.tags.Tags;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @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));
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package net.srt.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import net.srt.entity.StandardEntity;
|
||||
import net.srt.framework.common.utils.BeanUtil;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.service.StandardService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
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
|
||||
private StandardService standardService;
|
||||
@GetMapping("list-tree")
|
||||
@Operation(summary = "查询文件分组树")
|
||||
public Result<List<TreeNodeVo>> listTree() {
|
||||
return Result.ok(standardService.listTree());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@Operation(summary = "根据id获取")
|
||||
public Result<TreeNodeVo> getById(@PathVariable Integer id) {
|
||||
StandardEntity entity = standardService.getById(id);
|
||||
TreeNodeVo nodeVo = BeanUtil.copyProperties(entity, TreeNodeVo::new);
|
||||
nodeVo.setLabel(entity.getName());
|
||||
nodeVo.setParentPath(entity.getPath().contains("/") ? entity.getPath().substring(0, entity.getPath().lastIndexOf("/")) : null);
|
||||
return Result.ok(nodeVo);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.entity.MetamodelEntity;
|
||||
import net.srt.vo.MetamodelVO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
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);
|
||||
|
||||
}
|
|
@ -4,6 +4,7 @@ import net.srt.entity.QualityQueryEntity;
|
|||
import net.srt.vo.QualityRuleVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -19,4 +20,7 @@ public interface QualityRuleConvert {
|
|||
|
||||
|
||||
List<QualityRuleVo> convertList(List<QualityQueryEntity> list);
|
||||
|
||||
QualityQueryEntity conver(QualityRuleVo vo);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package net.srt.convert;
|
||||
|
||||
import net.srt.controller.QualityTaskController;
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.vo.QualityTaskVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.swing.*;
|
||||
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);
|
||||
}
|
|
@ -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.mapstruct.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface MetamodelPropertyDao extends BaseDao<MetamodelPropertyEntity> {
|
||||
}
|
|
@ -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> {
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package net.srt.standard.mapper;
|
||||
package net.srt.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
||||
import net.srt.entity.StandardEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
|
@ -11,5 +11,5 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
* @Date: 2023-12-20 11:30
|
||||
*/
|
||||
@Mapper
|
||||
public interface StandardMapper extends BaseMapper<DatagovernanceEntity> {
|
||||
public interface StandardDao extends BaseMapper<StandardEntity> {
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package net.srt.standard.domain.entity;
|
||||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -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,70 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName("data_governance_metamodel_property")
|
||||
public class MetamodelPropertyEntity {
|
||||
|
||||
/**
|
||||
* 元模型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,54 @@
|
|||
package net.srt.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.entity
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 10:46
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@TableName(value = "data_governance_quality_task", autoResultMap = true)
|
||||
public class QualityTaskEntity {
|
||||
//id
|
||||
private Long id;
|
||||
//规则配置
|
||||
private Integer qualityConfigId;
|
||||
//名称
|
||||
private String name;
|
||||
//运行状态(1-等待中 2-运行中 3-正常结束 4-异常异常)
|
||||
private Integer status;
|
||||
//检测条数
|
||||
private Integer checkCount;
|
||||
//检测通过条数
|
||||
private Integer passCount;
|
||||
//未通过条数
|
||||
private Integer notPassCount;
|
||||
//开始时间
|
||||
private Date startTime;
|
||||
//结束时间
|
||||
private Date endTime;
|
||||
//错误日志
|
||||
private String errorLog;
|
||||
//项目id
|
||||
private Integer projectId;
|
||||
//版本号
|
||||
private Integer version;
|
||||
//删除标识 0:正常 1:删除
|
||||
private Integer deleted;
|
||||
//创建者
|
||||
private Integer creator;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//更新者
|
||||
private Integer updater;
|
||||
//更新时间
|
||||
private Date updateTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.query;
|
||||
|
||||
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 MetamodelpropertyQuery extends Query {
|
||||
private String name;
|
||||
private String code;
|
||||
private Long metamodelId;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package net.srt.query;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.common.query.Query;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.query
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 11:33
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "数据治理任务查询")
|
||||
public class QualityTaskQuery extends Query {
|
||||
private String name;
|
||||
private Integer status;
|
||||
@DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date startTime;
|
||||
@DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date endTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package net.srt.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.common.query.Query;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardManagementQuery
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 14:40
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema (description = "标准管理列表")
|
||||
public class StandardManagementQuery extends Query {
|
||||
private Integer categoryId;
|
||||
private String t;
|
||||
private String cnName;
|
||||
private String engName;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package net.srt.service;
|
||||
|
||||
import net.srt.entity.MetamodelPropertyEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.mybatis.service.BaseService;
|
||||
import net.srt.query.MetamodelpropertyQuery;
|
||||
import net.srt.vo.MetamodelPropertyVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MetamodelPropertyService extends BaseService<MetamodelPropertyEntity> {
|
||||
List<MetamodelPropertyVO> properties(Long id);
|
||||
|
||||
PageResult<MetamodelPropertyVO> page(MetamodelpropertyQuery query);
|
||||
|
||||
void save(MetamodelPropertyVO vo);
|
||||
|
||||
void delete(List<Long> idList);
|
||||
|
||||
void update(MetamodelPropertyVO vo);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package net.srt.service;
|
||||
|
||||
import net.srt.entity.MetamodelEntity;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.framework.mybatis.service.BaseService;
|
||||
import net.srt.vo.MetamodelVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MetamodelService extends BaseService<MetamodelEntity> {
|
||||
List<TreeNodeVo> listTree();
|
||||
|
||||
void save(MetamodelVO vo);
|
||||
|
||||
void update(MetamodelVO vo);
|
||||
|
||||
void delete(Long id);
|
||||
}
|
|
@ -13,5 +13,7 @@ import net.srt.vo.QualityRuleVo;
|
|||
* @CreateTime: 2023/12/20 19:53
|
||||
*/
|
||||
public interface QualityRuleService extends BaseService<QualityQueryEntity> {
|
||||
PageResult<QualityRuleVo> pagea(QualityRuleQuery query);
|
||||
PageResult<QualityRuleVo> page(QualityRuleQuery query);
|
||||
|
||||
void save(QualityRuleVo vo);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package net.srt.service;
|
||||
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.mybatis.service.BaseService;
|
||||
import net.srt.query.QualityTaskQuery;
|
||||
import net.srt.vo.QualityTaskVo;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.service
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 11:36
|
||||
*/
|
||||
public interface QualityTaskService extends BaseService<QualityTaskEntity> {
|
||||
PageResult<QualityTaskVo> pagea(QualityTaskQuery query);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package net.srt.service;
|
||||
|
||||
import net.srt.entity.StandardEntity;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.framework.mybatis.service.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardService
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:31
|
||||
*/
|
||||
public interface StandardService extends BaseService<StandardEntity> {
|
||||
|
||||
List<TreeNodeVo> listTree();
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package net.srt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import net.srt.convert.MetamodelPropertyConvert;
|
||||
import net.srt.dao.MetamodelPropertyDao;
|
||||
import net.srt.entity.MetamodelPropertyEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.srt.query.MetamodelpropertyQuery;
|
||||
import net.srt.service.MetamodelPropertyService;
|
||||
import net.srt.vo.MetamodelPropertyVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MetamodelPropertyServiceImpl extends BaseServiceImpl<MetamodelPropertyDao, MetamodelPropertyEntity> implements MetamodelPropertyService {
|
||||
|
||||
@Override
|
||||
public List<MetamodelPropertyVO> properties(Long id) {
|
||||
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, id).orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
||||
return MetamodelPropertyConvert.INSTANCE.convertList(baseMapper.selectList(wrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<MetamodelPropertyVO> page(MetamodelpropertyQuery query) {
|
||||
IPage<MetamodelPropertyEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||
return new PageResult<>(MetamodelPropertyConvert.INSTANCE.convertList(page.getRecords()),page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MetamodelPropertyEntity> getWrapper(MetamodelpropertyQuery query) {
|
||||
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, query.getMetamodelId())
|
||||
.like(StringUtil.isBlank(query.getName()),MetamodelPropertyEntity::getName,query.getName())
|
||||
.like(StringUtil.isBlank(query.getCode()),MetamodelPropertyEntity::getCode,query.getCode())
|
||||
.orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(MetamodelPropertyVO vo) {
|
||||
MetamodelPropertyEntity entity = MetamodelPropertyConvert.INSTANCE.convert(vo);
|
||||
entity.setBuiltin(0);
|
||||
entity.setProjectId(getProjectId());
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(MetamodelPropertyVO vo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<Long> idList) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
package net.srt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import net.srt.convert.MetamodelConvert;
|
||||
import net.srt.dao.MetamodelDao;
|
||||
import net.srt.entity.MetamodelEntity;
|
||||
import net.srt.framework.common.exception.ServerException;
|
||||
import net.srt.framework.common.utils.BeanUtil;
|
||||
import net.srt.framework.common.utils.BuildTreeUtils;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.srt.service.MetamodelService;
|
||||
import net.srt.vo.MetamodelVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
@Service
|
||||
public class MetamodelServiceImpl extends BaseServiceImpl<MetamodelDao, MetamodelEntity> implements MetamodelService {
|
||||
@Override
|
||||
public List<TreeNodeVo> listTree() {
|
||||
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
//查询当前项目下的元模型和公共的元模型
|
||||
wrapper.eq(MetamodelEntity::getProjectId, getProjectId())
|
||||
.or()
|
||||
.eq(MetamodelEntity::getProjectId, 0)
|
||||
.orderByAsc(MetamodelEntity::getOrderNo);
|
||||
List<MetamodelEntity> dataGovernanceMetamodelEntities = baseMapper.selectList(wrapper);
|
||||
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataGovernanceMetamodelEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
||||
newItem.setLabel(oldItem.getName());
|
||||
newItem.setValue(oldItem.getId());
|
||||
newItem.setDisabled(oldItem.getIfLeaf() == 1);
|
||||
if (newItem.getPath().contains("/")) {
|
||||
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
||||
}
|
||||
});
|
||||
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(MetamodelVO vo) {
|
||||
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
||||
entity.setPath(recursionPath(entity,null));
|
||||
entity.setProjectId(getProjectId());
|
||||
entity.setBuiltin(0);
|
||||
buildField(entity);
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(MetamodelVO vo) {
|
||||
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
||||
entity.setPath(recursionPath(entity,null));
|
||||
entity.setProjectId(getProjectId());
|
||||
entity.setBuiltin(0);
|
||||
buildField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(MetamodelEntity::getParentId,id).last("limit 1");
|
||||
if(baseMapper.selectOne(wrapper)!=null){
|
||||
throw new ServerException("存在子节点,不可删除!");
|
||||
}
|
||||
}
|
||||
|
||||
private void buildField(MetamodelEntity entity) {
|
||||
if(entity.getIfLeaf() == 0){
|
||||
entity.setIcon("/src/assets/model.png");
|
||||
}else {
|
||||
entity.setIcon("/src/assets/folder.png");
|
||||
}
|
||||
}
|
||||
|
||||
private String recursionPath(MetamodelEntity metamodelEntity,String path){
|
||||
if(StringUtil.isBlank(path)){
|
||||
path = metamodelEntity.getName();
|
||||
}
|
||||
if(metamodelEntity.getParentId()!=0){
|
||||
MetamodelEntity parent = getById(metamodelEntity.getParentId());
|
||||
path = parent.getName() + "/" + path;
|
||||
return recursionPath(parent,path);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
}
|
|
@ -26,22 +26,24 @@ import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
|||
@AllArgsConstructor
|
||||
public class QualityRuleServiceimpl extends BaseServiceImpl<QualityRuleDao, QualityQueryEntity> implements QualityRuleService {
|
||||
@Override
|
||||
public PageResult<QualityRuleVo> pagea(QualityRuleQuery query) {
|
||||
//查询分页
|
||||
public PageResult<QualityRuleVo> page(QualityRuleQuery query) {
|
||||
IPage<QualityQueryEntity> page=baseMapper.selectPage(getPage(query),getWrapper(query));
|
||||
//转换vo
|
||||
return new PageResult<>(QualityRuleConvert.INSTANCE.convertList(page.getRecords()),page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(QualityRuleVo vo) {
|
||||
QualityQueryEntity entity=QualityRuleConvert.INSTANCE.conver(vo);
|
||||
entity.setProjectId(getProjectId());
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QualityQueryEntity> getWrapper(QualityRuleQuery query) {
|
||||
if (query!=null){
|
||||
LambdaQueryWrapper<QualityQueryEntity> wrapper=Wrappers.lambdaQuery();
|
||||
wrapper.like(StringUtil.isNotBlank(query.getName()),QualityQueryEntity::getName,query.getName())
|
||||
.like(StringUtil.isNotBlank(query.getEngName()), QualityQueryEntity::getEngName, query.getEngName());
|
||||
.like(StringUtil.isNotBlank(query.getEngName()),QualityQueryEntity::getEngName,query.getName());
|
||||
return wrapper;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package net.srt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import net.srt.convert.QualityRuleConvert;
|
||||
import net.srt.convert.QualityTaskConvert;
|
||||
import net.srt.dao.QualityTaskDao;
|
||||
import net.srt.entity.QualityQueryEntity;
|
||||
import net.srt.entity.QualityTaskEntity;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.srt.query.QualityTaskQuery;
|
||||
import net.srt.service.QualityTaskService;
|
||||
import net.srt.vo.QualityTaskVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.service.impl
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 11:38
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class QualityTaskServiceimpl extends BaseServiceImpl<QualityTaskDao, QualityTaskEntity> implements QualityTaskService {
|
||||
@Override
|
||||
public PageResult<QualityTaskVo> pagea(QualityTaskQuery query) {
|
||||
//查询分页
|
||||
IPage<QualityTaskEntity> page =baseMapper.selectPage(getPage(query),getWrapper(query));
|
||||
return new PageResult<>(QualityTaskConvert.INSTANCE.covertList(page.getRecords()),page.getTotal());
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<QualityTaskEntity> getWrapper(QualityTaskQuery query) {
|
||||
LambdaQueryWrapper<QualityTaskEntity> wrapper= Wrappers.lambdaQuery();
|
||||
wrapper.like(StringUtil.isNotBlank(query.getName()),QualityTaskEntity::getName,query.getName())
|
||||
.eq(query.getStatus()!=null,QualityTaskEntity::getQualityConfigId,query.getStatus())
|
||||
.eq(query.getStartTime()!=null,QualityTaskEntity::getStartTime,query.getStartTime())
|
||||
.eq(query.getEndTime()!=null,QualityTaskEntity::getEndTime,query.getEndTime())
|
||||
.orderByDesc(QualityTaskEntity::getId);
|
||||
dataScopeWithOrgId(wrapper);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package net.srt.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.dao.StandardDao;
|
||||
import net.srt.entity.StandardEntity;
|
||||
import net.srt.framework.common.utils.BeanUtil;
|
||||
import net.srt.framework.common.utils.BuildTreeUtils;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.srt.service.StandardService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardServiceImpl
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:31
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class StandardServiceImpl extends BaseServiceImpl<StandardDao, StandardEntity> implements StandardService {
|
||||
|
||||
@Override
|
||||
public List<TreeNodeVo> listTree() {
|
||||
LambdaQueryWrapper<StandardEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
dataScopeWithoutOrgId(wrapper);
|
||||
wrapper.orderByAsc(StandardEntity::getOrderNo);
|
||||
List<StandardEntity> dataFileCategoryEntities = baseMapper.selectList(wrapper);
|
||||
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataFileCategoryEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
||||
newItem.setLabel(oldItem.getName());
|
||||
newItem.setValue(oldItem.getId());
|
||||
newItem.setDisabled(oldItem.getType() == 0);
|
||||
if (newItem.getPath().contains("/")) {
|
||||
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
||||
}
|
||||
});
|
||||
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
package net.srt.standard.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.BeanUtil;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
||||
import net.srt.standard.service.StandardService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* @ClassName : DatastandardController
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 20:36
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data-standard")
|
||||
public class DatastandardController {
|
||||
@Autowired
|
||||
private StandardService standardService;
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
public Result<PageResult<StandardManagementVo>> page(@Valid StandardManagementRequest query){
|
||||
return Result.ok(standardService.pagea(query));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:save')")
|
||||
public Result<String > add(@RequestBody StandardManagementVo standardManagementVo){
|
||||
standardService.addStand(standardManagementVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "修改")
|
||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:update')")
|
||||
public Result<String > update(@RequestBody @Valid StandardManagementVo standardManagementVo){
|
||||
standardService.updateStand(standardManagementVo);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:delete')")
|
||||
public Result<String > delete(Long id){
|
||||
standardService.delete(id);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package net.srt.standard.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import net.srt.framework.common.utils.BeanUtil;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
||||
import net.srt.standard.service.StandardService;
|
||||
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
|
||||
private StandardService standardService;
|
||||
@GetMapping("list-tree")
|
||||
@Operation(summary = "查询文件分组树")
|
||||
public Result<List<TreeNodeVo>> listTree() {
|
||||
return Result.ok(standardService.listTree());
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package net.srt.standard.domain.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.standard.domain.query.Query;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardManagementRequest
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 14:40
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class StandardManagementRequest extends Query {
|
||||
private String cnName;
|
||||
private String engName;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package net.srt.standard.domain.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @ClassName : Query
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 21:46
|
||||
*/
|
||||
@Data
|
||||
public class Query {
|
||||
@NotNull(message = "页码不能为空")
|
||||
@Min(value = 1, message = "页码最小值为 1")
|
||||
@Schema(description = "当前页码", required = true)
|
||||
Integer page;
|
||||
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Range(min = 1, max = 1000, message = "每页条数,取值范围 1-1000")
|
||||
@Schema(description = "每页条数", required = true)
|
||||
Integer limit;
|
||||
|
||||
@Schema(description = "排序字段")
|
||||
String order;
|
||||
|
||||
@Schema(description = "是否升序")
|
||||
boolean asc;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package net.srt.standard.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.framework.mybatis.service.BaseService;
|
||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardService
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:31
|
||||
*/
|
||||
public interface StandardService extends BaseService<DatagovernanceEntity> {
|
||||
// Page<StandardManagementVo> listpage(StandardManagementRequest standardManagementRequest);
|
||||
|
||||
List<TreeNodeVo> listTree();
|
||||
|
||||
void addStand(StandardManagementVo standardManagementVo);
|
||||
|
||||
void updateStand(StandardManagementVo standardManagementVo);
|
||||
|
||||
void delete(Long id);
|
||||
|
||||
PageResult<StandardManagementVo> pagea(StandardManagementRequest query);
|
||||
|
||||
// PageResult<StandardManagementVo> list(StandardManagementRequest standardManagementRequest);
|
||||
//
|
||||
// void add(StandardManagementVo standardManagement);
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
package net.srt.standard.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.BeanUtil;
|
||||
import net.srt.framework.common.utils.BuildTreeUtils;
|
||||
import net.srt.framework.common.utils.TreeNodeVo;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
||||
import net.srt.standard.mapper.StandardMapper;
|
||||
import net.srt.standard.service.StandardService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName : StandardServiceImpl
|
||||
* @Description :
|
||||
* @Author : FJJ
|
||||
* @Date: 2023-12-20 11:31
|
||||
*/
|
||||
@Service
|
||||
public class StandardServiceImpl extends BaseServiceImpl<StandardMapper, DatagovernanceEntity> implements StandardService {
|
||||
@Autowired
|
||||
private StandardMapper standardMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<TreeNodeVo> listTree() {
|
||||
LambdaQueryWrapper<DatagovernanceEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
dataScopeWithoutOrgId(wrapper);
|
||||
wrapper.orderByAsc(DatagovernanceEntity::getOrderNo);
|
||||
List<DatagovernanceEntity> dataFileCategoryEntities = baseMapper.selectList(wrapper);
|
||||
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataFileCategoryEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
||||
newItem.setLabel(oldItem.getName());
|
||||
newItem.setValue(oldItem.getId());
|
||||
newItem.setDisabled(oldItem.getType() == 0);
|
||||
if (newItem.getPath().contains("/")) {
|
||||
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
||||
}
|
||||
});
|
||||
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addStand(StandardManagementVo standardManagementVo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStand(StandardManagementVo standardManagementVo) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Long id) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StandardManagementVo> pagea(StandardManagementRequest query) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// @Override
|
||||
// public void add(StandardManagementVo standardManagement) {
|
||||
// UserDetail user = getUser();
|
||||
// standardManagement.setCreator(user.getUsername());
|
||||
// standardManagement.setCreateTime(new Date());
|
||||
// standardMapper.insert(standardManagement);
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package net.srt.vo;
|
||||
|
||||
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;
|
||||
|
||||
@Data
|
||||
@Schema(description = "数据治理-元数据属性值")
|
||||
public class MetadataPropertyVo 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,79 @@
|
|||
package net.srt.vo;
|
||||
|
||||
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;
|
||||
|
||||
@Data
|
||||
@Schema(description = "数据治理-元模型属性")
|
||||
public class MetamodelPropertyVO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "元模型id")
|
||||
private Integer metamodelId;
|
||||
|
||||
@Schema(description = "属性名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "属性代码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "数据类型 1-数字 2-字符串")
|
||||
private Integer dataType;
|
||||
|
||||
@Schema(description = "数据长度")
|
||||
private Integer dataLength;
|
||||
|
||||
@Schema(description = "输入控件,1-文本框")
|
||||
private Integer inputType;
|
||||
|
||||
@Schema(description = "允许为空 0-否 1-是")
|
||||
private Integer nullable;
|
||||
|
||||
@Schema(description = "是否内置 0-否 1-是")
|
||||
private Integer builtin;
|
||||
|
||||
@Schema(description = "项目id(租户id)")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "注释")
|
||||
private String comment;
|
||||
|
||||
@Schema(description = "序号")
|
||||
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;
|
||||
|
||||
@Schema(description = "元模型属性id")
|
||||
private Long metamodelPropertyId;
|
||||
@Schema(description = "元数据的属性值")
|
||||
private String value;
|
||||
@Schema(description = "元数据属性的主键id")
|
||||
private Long metadataPropertyId;
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package net.srt.vo;
|
||||
|
||||
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;
|
||||
|
||||
@Data
|
||||
@Schema(description = "数据治理-元模型")
|
||||
public class MetamodelVO 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 name;
|
||||
|
||||
@Schema(description = "代码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "路径")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "是否内置元模型 0-否,1-是")
|
||||
private Integer builtin;
|
||||
|
||||
@Schema(description = "图标")
|
||||
private String icon;
|
||||
|
||||
@Schema(description = "是否是目录 0-否 1-是")
|
||||
private Integer ifLeaf;
|
||||
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
}
|
|
@ -3,7 +3,6 @@ package net.srt.vo;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import net.srt.QualittRule;
|
||||
import net.srt.framework.common.utils.DateUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package net.srt.vo;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @BelongsProject: srt_cloud
|
||||
* @BelongsPackage: net.srt.vo
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2023/12/21 10:43
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "数据治理-质量任务")
|
||||
public class QualityTaskVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "主键id")
|
||||
private Long id;
|
||||
@Schema(description = "规则配置id")
|
||||
private Integer qualityConfigId;
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
@Schema(description = "运行状态(1-等待中 2-运行中 3-正常结束 4-异常结束)")
|
||||
private Integer status;
|
||||
@Schema(description = "检测条数")
|
||||
private Integer checkCount;
|
||||
@Schema(description = "检测通过条数")
|
||||
private Integer passCount;
|
||||
@Schema(description = "未通过条数")
|
||||
private Integer notPassCount;
|
||||
@Schema(description = "开始时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date startTime;
|
||||
@Schema(description = "结束时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date endTime;
|
||||
@Schema(description = "错误日志")
|
||||
private String errorLog;
|
||||
@Schema(description = "项目id")
|
||||
private Integer projectId;
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
@Schema(description = "删除标识 0:正常 1:删除")
|
||||
private Integer deleted;
|
||||
@Schema(description = "创建者")
|
||||
private Integer creator;
|
||||
@Schema(description = "创建时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date createTime;
|
||||
@Schema(description = "更新者")
|
||||
private Integer updater;
|
||||
@Schema(description = "更新时间")
|
||||
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
package net.srt.standard.domain.vo;
|
||||
package net.srt.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -17,8 +17,7 @@ import java.util.Date;
|
|||
*/
|
||||
@Data
|
||||
@Schema(description = "标准管理查询")
|
||||
@TableName(value = "standard_management")
|
||||
public class StandardManagementVo {
|
||||
public class StandardManagementVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableId("id")
|
||||
private Long id;
|
||||
|
@ -46,4 +45,5 @@ public class StandardManagementVo {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
private Integer ifStandardRel;
|
||||
private String group;
|
||||
}
|
|
@ -15,7 +15,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="net.srt.standard.mapper.StandardMapper">
|
||||
<!-- <select id="selectPage" resultType="net.srt.standard.domain.StandardManagementVoVo">-->
|
||||
<!-- select *-->
|
||||
<!-- from standard_management-->
|
||||
<!-- <where>-->
|
||||
<!-- <if test="cnName!= null">-->
|
||||
<!-- and cnName like concat('%', #{cnName}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="engName!= null">-->
|
||||
<!-- and engName like concat('%', #{engName}, '%')-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
<!-- </select>-->
|
||||
</mapper>
|
|
@ -15,7 +15,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -95,7 +95,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
|
@ -14,7 +14,7 @@ spring:
|
|||
discovery:
|
||||
server-addr: 101.34.77.101:8848
|
||||
# 命名空间,默认:public
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||
service: ${spring.application.name}
|
||||
group: srt2.0
|
||||
config:
|
||||
|
|
|
@ -9,6 +9,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|||
@SpringBootApplication
|
||||
@MapperScan("net.srt.Fink.mapper")
|
||||
@MapperScan("net.srt.Hadoop.mapper")
|
||||
@MapperScan("net.srt.disposition.mapper")
|
||||
public class DevelopmentApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DevelopmentApp.class);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package net.srt.Fink.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.Fink.dto.FinkAddDto;
|
||||
import net.srt.Fink.dto.FinkDto;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.Fink.service.FinkService;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Fink.vo.request.AddFink;
|
||||
import net.srt.Fink.vo.request.FinkRequest;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
|
@ -22,57 +22,44 @@ public class FinkController {
|
|||
|
||||
/**
|
||||
* 列表
|
||||
* @param page
|
||||
* @param limit
|
||||
* @param name
|
||||
* @param alias
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<FinkVo>> finkPage(
|
||||
@RequestParam Integer page,
|
||||
@RequestParam Integer limit,
|
||||
@RequestParam(value = "name", required = false) String name,
|
||||
@RequestParam(value = "alias", required = false) String alias) {
|
||||
FinkRequest finkRequest = new FinkRequest();
|
||||
finkRequest.setAlias(alias);
|
||||
finkRequest.setPage(page);
|
||||
finkRequest.setLimit(limit);
|
||||
finkRequest.setName(name);
|
||||
PageResult<FinkVo> pageResult = finkService.finkPage(finkRequest);
|
||||
public Result<PageResult<FinkVo>> finkPage(@Valid FinkDto finkDto) {
|
||||
PageResult<FinkVo> pageResult = finkService.finkPage(finkDto);
|
||||
return Result.ok(pageResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param finkVo
|
||||
* @param finkAddDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public Result devAdd(@RequestBody FinkVo finkVo){
|
||||
finkService.add(finkVo);
|
||||
public Result devAdd(@RequestBody FinkAddDto finkAddDto){
|
||||
finkService.add(finkAddDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param finkVo
|
||||
* 修改
|
||||
* @param finkAddDto
|
||||
* @return
|
||||
*/
|
||||
@PutMapping
|
||||
public Result devUpd(@RequestBody FinkVo finkVo){
|
||||
finkService.upd(finkVo);
|
||||
public Result devUpd(@RequestBody FinkAddDto finkAddDto){
|
||||
finkService.upd(finkAddDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param finkVo
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
public Result devDel(@RequestBody List<FinkVo> finkVo){
|
||||
finkService.del(finkVo);
|
||||
public Result devDel(@RequestBody List<Long> ids){
|
||||
finkService.del(ids);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
@ -82,8 +69,8 @@ public class FinkController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public Result<FinkVo> finkVoResult(@PathVariable Integer id){
|
||||
return Result.ok(finkService.findFinkVo(id));
|
||||
public Result<FinkEntity> FinkEntityResult(@PathVariable Integer id){
|
||||
return Result.ok(finkService.findFinkEntity(id));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
package net.srt.Fink.convert;
|
||||
|
||||
import net.srt.Fink.dto.FinkAddDto;
|
||||
import net.srt.Fink.dto.FinkDto;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FinkConvert {
|
||||
List<FinkVo> devList(List<FinkVo> list);
|
||||
FinkConvert INSTANCE = Mappers.getMapper(FinkConvert.class);
|
||||
|
||||
List<FinkVo> devList(List<FinkEntity> list);
|
||||
|
||||
FinkEntity convert(FinkAddDto vo);
|
||||
|
||||
FinkVo convert(FinkEntity entity);
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
package net.srt.Fink.convert;
|
||||
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@Service
|
||||
public class FinkConvertImp implements FinkConvert{
|
||||
@Override
|
||||
public List<FinkVo> devList(List<FinkVo> list) {
|
||||
if (list==null){
|
||||
return null;
|
||||
}
|
||||
ArrayList<FinkVo> finkVos = new ArrayList<>();
|
||||
for (FinkVo finkVo : list) {
|
||||
finkVos.add(finkVo);
|
||||
}
|
||||
return finkVos;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package net.srt.Fink.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
@Data
|
||||
public class FinkAddDto {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private String name;
|
||||
private String alias;
|
||||
private Integer type;
|
||||
private String hosts;
|
||||
private String jobManagerHost;
|
||||
private String flinkVersion;
|
||||
private Integer status;
|
||||
private String note;
|
||||
private Byte autoRegisters;
|
||||
private Integer clusterConfigurationId;
|
||||
private Integer taskId;
|
||||
private boolean enabled;
|
||||
private Integer version;
|
||||
private Integer deleted;
|
||||
private Integer creator;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
private Integer updater;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package net.srt.Fink.vo.request;
|
||||
package net.srt.Fink.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.query.Query;
|
||||
|
||||
@Data
|
||||
public class FinkRequest extends Query {
|
||||
public class FinkDto extends Query {
|
||||
private String name;
|
||||
private String alias;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package net.srt.Fink.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
@Data
|
||||
@TableName("cluster_info")
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class FinkEntity extends BaseEntity {
|
||||
|
||||
private Integer projectId;
|
||||
private String name;
|
||||
private String alias;
|
||||
private Integer type;
|
||||
private String hosts;
|
||||
private String jobManagerHost;
|
||||
private String flinkVersion;
|
||||
private Integer status;
|
||||
private String note;
|
||||
private Byte autoRegisters;
|
||||
private Integer clusterConfigurationId;
|
||||
private Integer taskId;
|
||||
private boolean enabled;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package net.srt.Fink.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
public interface FinkMapper extends BaseMapper<FinkVo> {
|
||||
public interface FinkMapper extends BaseMapper<FinkEntity> {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
package net.srt.Fink.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import net.srt.Fink.dto.FinkAddDto;
|
||||
import net.srt.Fink.dto.FinkDto;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Fink.vo.request.AddFink;
|
||||
import net.srt.Fink.vo.request.FinkRequest;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface FinkService extends IService<FinkVo> {
|
||||
PageResult<FinkVo> finkPage(FinkRequest finkRequest);
|
||||
public interface FinkService extends IService<FinkEntity> {
|
||||
PageResult<FinkVo> finkPage(FinkDto finkRequest);
|
||||
|
||||
void add(FinkVo finkVo);
|
||||
void add(FinkAddDto finkAddDto);
|
||||
|
||||
void upd(FinkVo finkVo);
|
||||
void upd(FinkAddDto finkAddDto);
|
||||
|
||||
void del(List<FinkVo> finkVo);
|
||||
void del(List<Long> finkDtos);
|
||||
|
||||
FinkVo findFinkVo(Integer id);
|
||||
FinkEntity findFinkEntity(Integer id);
|
||||
}
|
||||
|
|
|
@ -1,76 +1,66 @@
|
|||
package net.srt.Fink.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.srt.Fink.convert.FinkConvert;
|
||||
import net.srt.Fink.dto.FinkAddDto;
|
||||
import net.srt.Fink.dto.FinkDto;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.Fink.mapper.FinkMapper;
|
||||
import net.srt.Fink.service.FinkService;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Fink.vo.request.FinkRequest;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import net.srt.framework.security.cache.TokenStoreCache;
|
||||
import net.srt.framework.security.user.UserDetail;
|
||||
import net.srt.framework.security.utils.TokenUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class FinkServiceImpl extends BaseServiceImpl<FinkMapper,FinkVo> implements FinkService {
|
||||
public class FinkServiceImpl extends BaseServiceImpl<FinkMapper,FinkEntity> implements FinkService {
|
||||
|
||||
private FinkMapper finkMapper;
|
||||
|
||||
private FinkConvert finkConvert;
|
||||
@Override
|
||||
public PageResult<FinkVo> finkPage(FinkRequest finkRequest) {
|
||||
IPage<FinkVo> page = finkMapper.selectPage(getPage(finkRequest), getWrapper(finkRequest));
|
||||
return new PageResult<>(finkConvert.devList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
public PageResult<FinkVo> finkPage(FinkDto finkRequest) {
|
||||
LambdaQueryWrapper<FinkEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(finkRequest.getName()), FinkEntity::getName, finkRequest.getName());
|
||||
wrapper.like(StrUtil.isNotBlank(finkRequest.getAlias()), FinkEntity::getAlias, finkRequest.getAlias());
|
||||
IPage<FinkEntity> page = baseMapper.selectPage(getPage(finkRequest), wrapper);
|
||||
return new PageResult<>(FinkConvert.INSTANCE.devList(page.getRecords()), page.getTotal());
|
||||
|
||||
private LambdaQueryWrapper<FinkVo> getWrapper(FinkRequest query){
|
||||
LambdaQueryWrapper<FinkVo> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(query.getName()), FinkVo::getName, query.getName());
|
||||
wrapper.like(StrUtil.isNotBlank(query.getAlias()), FinkVo::getAlias, query.getAlias());
|
||||
dataScopeWithoutOrgId(wrapper);
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(FinkVo finkVo) {
|
||||
public void add(FinkAddDto finkAddDto) {
|
||||
Date date = new Date();
|
||||
finkVo.setCreateTime(date);
|
||||
finkMapper.insert(finkVo);
|
||||
finkAddDto.setCreateTime(date);
|
||||
FinkEntity finkEntity = FinkConvert.INSTANCE.convert(finkAddDto);
|
||||
baseMapper.insert(finkEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upd(FinkVo finkVo) {
|
||||
public void upd(FinkAddDto finkAddDto) {
|
||||
Date date = new Date();
|
||||
finkVo.setCreateTime(date);
|
||||
finkMapper.updateById(finkVo);
|
||||
finkAddDto.setCreateTime(date);
|
||||
FinkEntity finkEntity = FinkConvert.INSTANCE.convert(finkAddDto);
|
||||
baseMapper.updateById(finkEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void del(List<FinkVo> finkVo) {
|
||||
for (FinkVo vo : finkVo) {
|
||||
finkMapper.deleteById(vo.getId());
|
||||
public void del(List<Long> finkAddDtoList) {
|
||||
for (Long l : finkAddDtoList) {
|
||||
baseMapper.deleteById(l);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FinkVo findFinkVo(Integer id) {
|
||||
return finkMapper.selectById(id);
|
||||
public FinkEntity findFinkEntity(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("cluster_info")
|
||||
public class FinkVo {
|
||||
@TableId("id")
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private String name;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package net.srt.Fink.vo.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AddFink {
|
||||
private String name;
|
||||
private String alias;
|
||||
private Integer type;
|
||||
private String hosts;
|
||||
private boolean enabled;
|
||||
private String note;
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
package net.srt.Hadoop.controller;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.Hadoop.dto.HadoopAddDto;
|
||||
import net.srt.Hadoop.service.HadoopService;
|
||||
import net.srt.Hadoop.dto.HadoopDto;
|
||||
import net.srt.Hadoop.vo.HadoopVo;
|
||||
import net.srt.Hadoop.vo.request.HadoopRequest;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -21,7 +22,7 @@ public class HadoopController {
|
|||
@RequestParam Integer limit,
|
||||
@RequestParam(value = "name", required = false) String name,
|
||||
@RequestParam(value = "alias", required = false) String alias) {
|
||||
HadoopRequest hadoopRequest = new HadoopRequest();
|
||||
HadoopDto hadoopRequest = new HadoopDto();
|
||||
hadoopRequest.setPage(page);
|
||||
hadoopRequest.setLimit(limit);
|
||||
hadoopRequest.setName(name);
|
||||
|
@ -31,34 +32,34 @@ public class HadoopController {
|
|||
}
|
||||
/**
|
||||
* 添加
|
||||
* @param hadoopVo
|
||||
* @param HadoopAddDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
public Result hadoopAdd(@RequestBody HadoopVo hadoopVo){
|
||||
hadoopService.add(hadoopVo);
|
||||
public Result hadoopAdd(@RequestBody HadoopAddDto HadoopAddDto){
|
||||
hadoopService.add(HadoopAddDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param hadoopVo
|
||||
* @param HadoopAddDto
|
||||
* @return
|
||||
*/
|
||||
@PutMapping
|
||||
public Result hadoopUpd(@RequestBody HadoopVo hadoopVo){
|
||||
hadoopService.upd(hadoopVo);
|
||||
public Result hadoopUpd(@RequestBody HadoopAddDto HadoopAddDto){
|
||||
hadoopService.upd(HadoopAddDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param hadoopVo
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping
|
||||
public Result hadoopDel(@RequestBody List<HadoopVo> hadoopVo){
|
||||
hadoopService.del(hadoopVo);
|
||||
public Result hadoopDel(@RequestBody List<Long> ids){
|
||||
hadoopService.del(ids);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
@ -68,7 +69,7 @@ public class HadoopController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public Result<HadoopVo> hadoopVoResult(@PathVariable Integer id){
|
||||
public Result<HadoopVo> HadoopAddDtoResult(@PathVariable Integer id){
|
||||
return Result.ok(hadoopService.findHadoopVo(id));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,25 @@
|
|||
package net.srt.Hadoop.convert;
|
||||
|
||||
import net.srt.Fink.convert.FinkConvert;
|
||||
import net.srt.Fink.dto.FinkAddDto;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Hadoop.dto.HadoopAddDto;
|
||||
import net.srt.Hadoop.dto.HadoopDto;
|
||||
import net.srt.Hadoop.entity.HadoopEntity;
|
||||
import net.srt.Hadoop.vo.HadoopVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface HadoopConvert {
|
||||
List<HadoopVo> hadoopList(List<HadoopVo> list);
|
||||
HadoopConvert INSTANCE = Mappers.getMapper(HadoopConvert.class);
|
||||
List<HadoopVo> hadoopList(List<HadoopEntity> list);
|
||||
|
||||
HadoopEntity convert(HadoopAddDto dto);
|
||||
|
||||
HadoopVo convert(HadoopEntity entity);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
package net.srt.Hadoop.convert;
|
||||
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Hadoop.vo.HadoopVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@Service
|
||||
public class HadoopConvertImp implements HadoopConvert {
|
||||
|
||||
@Override
|
||||
public List<HadoopVo> hadoopList(List<HadoopVo> list) {
|
||||
if (list==null){
|
||||
return null;
|
||||
}
|
||||
ArrayList<HadoopVo> hadoopVos = new ArrayList<>();
|
||||
for (HadoopVo hadoopVo : list) {
|
||||
hadoopVos.add(hadoopVo);
|
||||
}
|
||||
return hadoopVos;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package net.srt.Hadoop.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HadoopAddDto {
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private String name;
|
||||
private String alias;
|
||||
private String type;
|
||||
private String configJson;
|
||||
private Boolean isAvailable;
|
||||
private String note;
|
||||
private Boolean enabled;
|
||||
private Integer version;
|
||||
private Integer deleted;
|
||||
private Integer creator;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
private Integer updater;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
private String config;
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package net.srt.Hadoop.vo.request;
|
||||
package net.srt.Hadoop.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import net.srt.framework.common.query.Query;
|
||||
|
||||
@Data
|
||||
public class HadoopRequest extends Query {
|
||||
public class HadoopDto extends Query {
|
||||
private String name;
|
||||
private String alias;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package net.srt.Hadoop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("hadoop_info")
|
||||
public class HadoopEntity extends BaseEntity {
|
||||
private Integer projectId;
|
||||
private String name;
|
||||
private String alias;
|
||||
private String type;
|
||||
private String configJson;
|
||||
private Boolean isAvailable;
|
||||
private String note;
|
||||
private Boolean enabled;
|
||||
private String config;
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package net.srt.Hadoop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.srt.Hadoop.entity.HadoopEntity;
|
||||
import net.srt.Hadoop.vo.HadoopVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
public interface HadoopMapper extends BaseMapper<HadoopVo> {
|
||||
public interface HadoopMapper extends BaseMapper<HadoopEntity> {
|
||||
}
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
package net.srt.Hadoop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Hadoop.dto.HadoopAddDto;
|
||||
import net.srt.Hadoop.entity.HadoopEntity;
|
||||
import net.srt.Hadoop.vo.HadoopVo;
|
||||
import net.srt.Hadoop.vo.request.HadoopRequest;
|
||||
import net.srt.Hadoop.dto.HadoopDto;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HadoopService extends IService<HadoopVo> {
|
||||
PageResult<HadoopVo> hadoopPage(HadoopRequest hadoopRequest);
|
||||
public interface HadoopService extends IService<HadoopEntity> {
|
||||
PageResult<HadoopVo> hadoopPage(HadoopDto hadoopRequest);
|
||||
|
||||
void add(HadoopVo hadoopVo);
|
||||
void add(HadoopAddDto HadoopAddDto);
|
||||
|
||||
HadoopVo findHadoopVo(Integer id);
|
||||
|
||||
void del(List<HadoopVo> hadoopVo);
|
||||
void del(List<Long> ids);
|
||||
|
||||
void upd(HadoopVo hadoopVo);
|
||||
void upd(HadoopAddDto HadoopAddDto);
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.Fink.vo.FinkVo;
|
||||
import net.srt.Fink.vo.request.FinkRequest;
|
||||
import net.srt.Hadoop.controller.HadoopController;
|
||||
import net.srt.Fink.convert.FinkConvert;
|
||||
import net.srt.Hadoop.convert.HadoopConvert;
|
||||
import net.srt.Hadoop.dto.HadoopAddDto;
|
||||
import net.srt.Hadoop.entity.HadoopEntity;
|
||||
import net.srt.Hadoop.mapper.HadoopMapper;
|
||||
import net.srt.Hadoop.service.HadoopService;
|
||||
import net.srt.Hadoop.vo.HadoopVo;
|
||||
import net.srt.Hadoop.vo.request.HadoopRequest;
|
||||
import net.srt.Hadoop.dto.HadoopDto;
|
||||
import net.srt.framework.common.page.PageResult;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -21,42 +21,39 @@ import java.util.List;
|
|||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class HadoopServiceImpl extends BaseServiceImpl<HadoopMapper, HadoopVo> implements HadoopService {
|
||||
private HadoopMapper hadoopMapper;
|
||||
private HadoopConvert hadoopList;
|
||||
public class HadoopServiceImpl extends BaseServiceImpl<HadoopMapper, HadoopEntity> implements HadoopService {
|
||||
@Override
|
||||
public PageResult<HadoopVo> hadoopPage(HadoopRequest hadoopRequest) {
|
||||
IPage<HadoopVo> page = hadoopMapper.selectPage(getPage(hadoopRequest), getWrapper(hadoopRequest));
|
||||
return new PageResult<>(hadoopList.hadoopList(page.getRecords()), page.getTotal());
|
||||
public PageResult<HadoopVo> hadoopPage(HadoopDto hadoopRequest) {
|
||||
LambdaQueryWrapper<HadoopEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(hadoopRequest.getName()), HadoopEntity::getName, hadoopRequest.getName());
|
||||
wrapper.like(StrUtil.isNotBlank(hadoopRequest.getAlias()), HadoopEntity::getAlias, hadoopRequest.getAlias());
|
||||
IPage<HadoopEntity> page = baseMapper.selectPage(getPage(hadoopRequest), wrapper);
|
||||
return new PageResult<>(HadoopConvert.INSTANCE.hadoopList(page.getRecords()), page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(HadoopVo hadoopVo) {
|
||||
|
||||
public void add(HadoopAddDto hadoopAddDto) {
|
||||
HadoopEntity convert = HadoopConvert.INSTANCE.convert(hadoopAddDto);
|
||||
baseMapper.insert(convert);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HadoopVo findHadoopVo(Integer id) {
|
||||
return hadoopMapper.selectById(id);
|
||||
HadoopEntity hadoopEntity = baseMapper.selectById(id);
|
||||
HadoopVo convert = HadoopConvert.INSTANCE.convert(hadoopEntity);
|
||||
return convert;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void del(List<HadoopVo> hadoopVo) {
|
||||
for (HadoopVo vo : hadoopVo) {
|
||||
hadoopMapper.deleteById(vo);
|
||||
public void del(List<Long> ids) {
|
||||
for (Long id : ids) {
|
||||
baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upd(HadoopVo hadoopVo) {
|
||||
hadoopMapper.updateById(hadoopVo);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<HadoopVo> getWrapper(HadoopRequest hadoopRequest){
|
||||
LambdaQueryWrapper<HadoopVo> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.like(StrUtil.isNotBlank(hadoopRequest.getName()), HadoopVo::getName, hadoopRequest.getName());
|
||||
wrapper.like(StrUtil.isNotBlank(hadoopRequest.getAlias()), HadoopVo::getAlias, hadoopRequest.getAlias());
|
||||
dataScopeWithoutOrgId(wrapper);
|
||||
return wrapper;
|
||||
public void upd(HadoopAddDto hadoopAddDto) {
|
||||
HadoopEntity convert = HadoopConvert.INSTANCE.convert(hadoopAddDto);
|
||||
baseMapper.updateById(convert);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("hadoop_info")
|
||||
public class HadoopVo {
|
||||
@TableId("id")
|
||||
private Integer id;
|
||||
private Integer projectId;
|
||||
private String name;
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package net.srt.disposition.controller;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.disposition.service.DataProductionService;
|
||||
import net.srt.disposition.vo.DataProductionTreeVo;
|
||||
import net.srt.disposition.vo.DispositionVo;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/catalogue")
|
||||
public class DataProductionTreeController {
|
||||
|
||||
private DataProductionService dataProductionService;
|
||||
|
||||
@GetMapping
|
||||
public Result<List<DataProductionTreeVo>> listResult(){
|
||||
List<DataProductionTreeVo> dispositionVos=dataProductionService.dataTreeList();
|
||||
return Result.ok(dispositionVos);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package net.srt.disposition.controller;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.disposition.dto.DispositionDto;
|
||||
import net.srt.disposition.service.DispositionService;
|
||||
import net.srt.disposition.vo.DispositionVo;
|
||||
import net.srt.framework.common.utils.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("sys-config")
|
||||
public class DispositionController {
|
||||
|
||||
private DispositionService dispositionService;
|
||||
|
||||
@GetMapping("/getAll")
|
||||
public Result<DispositionVo> getAll() {
|
||||
DispositionVo dispositionVo=dispositionService.getAll();
|
||||
return Result.ok(dispositionVo);
|
||||
}
|
||||
|
||||
@PostMapping("/updateSysConfigByJson")
|
||||
public Result upd(@RequestBody DispositionDto dispositionDto) {
|
||||
dispositionService.upd(dispositionDto);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.disposition.convert;
|
||||
|
||||
import net.srt.disposition.dto.DispositionDto;
|
||||
import net.srt.disposition.entity.DispositionEntity;
|
||||
import net.srt.disposition.vo.DispositionVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface DataProductionTreeConvert {
|
||||
DataProductionTreeConvert INSTANCE = Mappers.getMapper(DataProductionTreeConvert.class);
|
||||
DispositionVo convert(DispositionEntity entity);
|
||||
|
||||
DispositionEntity convert(DispositionDto vo);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package net.srt.disposition.convert;
|
||||
|
||||
import net.srt.disposition.dto.DispositionDto;
|
||||
import net.srt.disposition.entity.DispositionEntity;
|
||||
import net.srt.disposition.vo.DispositionVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface DispositionConvert {
|
||||
DispositionConvert INSTANCE = Mappers.getMapper(DispositionConvert.class);
|
||||
DispositionVo convert(DispositionEntity entity);
|
||||
|
||||
DispositionEntity convert(DispositionDto vo);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package net.srt.disposition.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@TableName("flink_job_configuration")
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DispositionDto {
|
||||
@TableId
|
||||
private Integer id;
|
||||
private String sqlSeparator;
|
||||
private String sqlSubmitJarPath;
|
||||
private String sqlSubmitJarMainAppClass;
|
||||
private boolean useRestAPI;
|
||||
private String jobIdWait;
|
||||
private String sqlSubmitJarParas;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package net.srt.disposition.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
|
||||
@Data
|
||||
@TableName("data_production_tree")
|
||||
public class DataProductionTreeEntity extends BaseEntity {
|
||||
private Long parentId;
|
||||
private Integer ifLeaf;
|
||||
private Long taskId;
|
||||
private String taskType;
|
||||
private String parentPath;
|
||||
private String path;
|
||||
private Integer orderNo;
|
||||
private String label;
|
||||
private Long metamodelId;
|
||||
private String name;
|
||||
private String icon;
|
||||
private String code;
|
||||
private Boolean builtin;
|
||||
private String description;
|
||||
private Long projectId;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package net.srt.disposition.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@TableName("flink_job_configuration")
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DispositionEntity {
|
||||
@TableId("id")
|
||||
private Integer id;
|
||||
private String sqlSeparator;
|
||||
private String sqlSubmitJarPath;
|
||||
private String sqlSubmitJarMainAppClass;
|
||||
private boolean useRestAPI;
|
||||
private String jobIdWait;
|
||||
private String sqlSubmitJarParas;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package net.srt.disposition.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.srt.disposition.entity.DataProductionTreeEntity;
|
||||
|
||||
public interface DataProductionMapper extends BaseMapper<DataProductionTreeEntity> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package net.srt.disposition.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.srt.disposition.entity.DispositionEntity;
|
||||
|
||||
public interface DispositionMapper extends BaseMapper<DispositionEntity> {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package net.srt.disposition.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import net.srt.disposition.entity.DataProductionTreeEntity;
|
||||
import net.srt.disposition.vo.DataProductionTreeVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DataProductionService extends IService<DataProductionTreeEntity> {
|
||||
List<DataProductionTreeVo> dataTreeList();
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package net.srt.disposition.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import net.srt.disposition.dto.DispositionDto;
|
||||
import net.srt.disposition.entity.DispositionEntity;
|
||||
import net.srt.disposition.vo.DispositionVo;
|
||||
|
||||
public interface DispositionService extends IService<DispositionEntity> {
|
||||
DispositionVo getAll();
|
||||
|
||||
void upd(DispositionDto dispositionDto);
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package net.srt.disposition.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.Fink.entity.FinkEntity;
|
||||
import net.srt.disposition.entity.DataProductionTreeEntity;
|
||||
import net.srt.disposition.mapper.DataProductionMapper;
|
||||
import net.srt.disposition.service.DataProductionService;
|
||||
import net.srt.disposition.vo.DataProductionTreeVo;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DataProductionServiceImpl extends BaseServiceImpl<DataProductionMapper, DataProductionTreeEntity> implements DataProductionService {
|
||||
@Override
|
||||
public List<DataProductionTreeVo> dataTreeList() {
|
||||
List<DataProductionTreeEntity> dataProductionTreeEntities = baseMapper.selectList(null);
|
||||
for (DataProductionTreeEntity dataProductionTreeEntity : dataProductionTreeEntities) {
|
||||
List<DataProductionTreeVo> dataProductionTreeVos=findDataProductTreeVoList(dataProductionTreeEntity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<DataProductionTreeVo> findDataProductTreeVoList(DataProductionTreeEntity dataProductionTreeEntity) {
|
||||
List<DataProductionTreeVo> dataProductionTreeVos=new ArrayList<>();
|
||||
QueryWrapper<DataProductionTreeEntity> dataProductionTreeEntityQueryWrapper = new QueryWrapper<>();
|
||||
dataProductionTreeEntityQueryWrapper.eq("parent_id",dataProductionTreeEntity.getId());
|
||||
List<DataProductionTreeEntity> dataProductionTreeEntities = baseMapper.selectList(dataProductionTreeEntityQueryWrapper);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package net.srt.disposition.service.impl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import net.srt.disposition.convert.DispositionConvert;
|
||||
import net.srt.disposition.dto.DispositionDto;
|
||||
import net.srt.disposition.entity.DispositionEntity;
|
||||
import net.srt.disposition.mapper.DispositionMapper;
|
||||
import net.srt.disposition.service.DispositionService;
|
||||
import net.srt.disposition.vo.DispositionVo;
|
||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class DispositionServiceImpl extends BaseServiceImpl<DispositionMapper, DispositionEntity> implements DispositionService {
|
||||
@Override
|
||||
public DispositionVo getAll() {
|
||||
DispositionEntity dispositionEntity = baseMapper.selectOne(null);
|
||||
DispositionVo convert = DispositionConvert.INSTANCE.convert(dispositionEntity);
|
||||
return convert;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upd(DispositionDto dispositionDto) {
|
||||
DispositionEntity convert = DispositionConvert.INSTANCE.convert(dispositionDto);
|
||||
baseMapper.updateById(convert);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package net.srt.disposition.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DataProductionTreeVo {
|
||||
private Long id;
|
||||
private Long parentId;
|
||||
private Integer ifLeaf;
|
||||
private Long taskId;
|
||||
private String taskType;
|
||||
private String parentPath;
|
||||
private String path;
|
||||
private Integer orderNo;
|
||||
private String label;
|
||||
private Long metamodelId;
|
||||
private String name;
|
||||
private String icon;
|
||||
private String code;
|
||||
private Boolean builtin;
|
||||
private String description;
|
||||
private Long projectId;
|
||||
private Long creator;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
private List<DataProductionTreeVo> dataProductionTreeVos;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package net.srt.disposition.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
public class DispositionVo {
|
||||
private Integer id;
|
||||
private String sqlSeparator;
|
||||
private String sqlSubmitJarPath;
|
||||
private String sqlSubmitJarMainAppClass;
|
||||
private boolean useRestAPI;
|
||||
private String jobIdWait;
|
||||
private String sqlSubmitJarParas;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
server:
|
||||
port: 8093
|
||||
port: 8094
|
||||
|
||||
spring:
|
||||
mvc:
|
||||
|
|
Loading…
Reference in New Issue