数据开发模块
parent
d6c1ebf8cd
commit
388bc58081
|
@ -1,104 +1,104 @@
|
||||||
package net.srt.controller;
|
//package net.srt.controller;
|
||||||
|
//
|
||||||
|
//
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
//import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
//import lombok.AllArgsConstructor;
|
||||||
import net.srt.framework.common.cache.bean.Neo4jInfo;
|
//import net.srt.framework.common.cache.bean.Neo4jInfo;
|
||||||
import net.srt.framework.common.utils.Result;
|
//import net.srt.framework.common.utils.Result;
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
//import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
import net.srt.service.MetadataService;
|
//import net.srt.service.MetadataService;
|
||||||
import net.srt.vo.MetadataVo;
|
//import net.srt.vo.MetadataVo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
import javax.validation.Valid;
|
//import javax.validation.Valid;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @BelongsProject: srt_cloud
|
// * @BelongsProject: srt_cloud
|
||||||
* @BelongsPackage: net.srt.controller
|
// * @BelongsPackage: net.srt.controller
|
||||||
* @Author: jpz
|
// * @Author: jpz
|
||||||
* @CreateTime: 2023/12/24 14:24
|
// * @CreateTime: 2023/12/24 14:24
|
||||||
*/
|
// */
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
//import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
//import lombok.AllArgsConstructor;
|
||||||
import net.srt.service.MetadataService;
|
//import net.srt.service.MetadataService;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
@RestController
|
//@RestController
|
||||||
@RequestMapping("metadata")
|
//@RequestMapping("metadata")
|
||||||
@Tag(name = "数据治理-元数据")
|
//@Tag(name = "数据治理-元数据")
|
||||||
@AllArgsConstructor
|
//@AllArgsConstructor
|
||||||
public class MetadataController {
|
//public class MetadataController {
|
||||||
private final MetadataService metadataService;
|
// private final MetadataService metadataService;
|
||||||
@GetMapping("/list-chlid")
|
// @GetMapping("/list-chlid")
|
||||||
@Operation(summary = "根据父类id获取信息")
|
// @Operation(summary = "根据父类id获取信息")
|
||||||
public Result<List<TreeNodeVo>> listByPatenId(@RequestParam Long parentId){
|
// public Result<List<TreeNodeVo>> listByPatenId(@RequestParam Long parentId){
|
||||||
List<TreeNodeVo> list=metadataService.listByPatenId(parentId);
|
// List<TreeNodeVo> list=metadataService.listByPatenId(parentId);
|
||||||
return Result.ok(list);
|
// return Result.ok(list);
|
||||||
}
|
// }
|
||||||
@GetMapping("/list-floder")
|
// @GetMapping("/list-floder")
|
||||||
@Operation(summary = "获取目录树")
|
// @Operation(summary = "获取目录树")
|
||||||
public Result<List<TreeNodeVo>> listFloder(){
|
// public Result<List<TreeNodeVo>> listFloder(){
|
||||||
List<TreeNodeVo> list=metadataService.listFloder();
|
// List<TreeNodeVo> list=metadataService.listFloder();
|
||||||
return Result.ok(list);
|
// return Result.ok(list);
|
||||||
}
|
// }
|
||||||
@GetMapping("/list-db")
|
// @GetMapping("/list-db")
|
||||||
@Operation(summary = "获取库表目录树")
|
// @Operation(summary = "获取库表目录树")
|
||||||
public Result<List<TreeNodeVo>> listDb() {
|
// public Result<List<TreeNodeVo>> listDb() {
|
||||||
List<TreeNodeVo> list=metadataService.listDb();
|
// List<TreeNodeVo> list=metadataService.listDb();
|
||||||
return Result.ok(list);
|
// return Result.ok(list);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/list-keyword")
|
// @GetMapping("/list-keyword")
|
||||||
@Operation(summary = "模糊查询")
|
// @Operation(summary = "模糊查询")
|
||||||
public Result<List<TreeNodeVo>> listKeyword( String keyword) {
|
// public Result<List<TreeNodeVo>> listKeyword( String keyword) {
|
||||||
List<TreeNodeVo> list=metadataService.listKeyword(keyword);
|
// List<TreeNodeVo> list=metadataService.listKeyword(keyword);
|
||||||
return Result.ok(list);
|
// return Result.ok(list);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("{id}")
|
// @GetMapping("{id}")
|
||||||
@Operation(summary = "信息")
|
// @Operation(summary = "信息")
|
||||||
public Result<MetadataVo> get(@PathVariable("id") Long id){
|
// public Result<MetadataVo> get(@PathVariable("id") Long id){
|
||||||
return Result.ok(metadataService.get(id));
|
// return Result.ok(metadataService.get(id));
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PostMapping
|
// @PostMapping
|
||||||
@Operation(summary = "保存")
|
// @Operation(summary = "保存")
|
||||||
public Result<String> save(@RequestBody MetadataVo vo){
|
// public Result<String> save(@RequestBody MetadataVo vo){
|
||||||
metadataService.save(vo);
|
// metadataService.save(vo);
|
||||||
return Result.ok();
|
// return Result.ok();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PutMapping
|
// @PutMapping
|
||||||
@Operation(summary = "修改")
|
// @Operation(summary = "修改")
|
||||||
public Result<String> update(@RequestBody @Valid MetadataVo vo){
|
// public Result<String> update(@RequestBody @Valid MetadataVo vo){
|
||||||
metadataService.update(vo);
|
// metadataService.update(vo);
|
||||||
return Result.ok();
|
// return Result.ok();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@DeleteMapping("{id}")
|
// @DeleteMapping("{id}")
|
||||||
@Operation(summary = "删除")
|
// @Operation(summary = "删除")
|
||||||
public Result<String> delete(@PathVariable Long id){
|
// public Result<String> delete(@PathVariable Long id){
|
||||||
metadataService.delete(id);
|
// metadataService.delete(id);
|
||||||
return Result.ok();
|
// return Result.ok();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PostMapping("{neo4j}")
|
// @PostMapping("{neo4j}")
|
||||||
@Operation(summary = "更新neo4路径")
|
// @Operation(summary = "更新neo4路径")
|
||||||
public Result<String> updateNeo4j(@PathVariable Neo4jInfo neo4jInfo){
|
// public Result<String> updateNeo4j(@PathVariable Neo4jInfo neo4jInfo){
|
||||||
metadataService.updateNeo4j(neo4jInfo);
|
// metadataService.updateNeo4j(neo4jInfo);
|
||||||
return Result.ok();
|
// return Result.ok();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/neo4j")
|
// @GetMapping("/neo4j")
|
||||||
@Operation(summary = "获取neo4的路径")
|
// @Operation(summary = "获取neo4的路径")
|
||||||
public Result<Neo4jInfo> getNeo4j(){
|
// public Result<Neo4jInfo> getNeo4j(){
|
||||||
return Result.ok(metadataService.getNeo4j());
|
// return Result.ok(metadataService.getNeo4j());
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
package net.srt.service;
|
//package net.srt.service;
|
||||||
|
//
|
||||||
import net.srt.entity.MetadataEntity;
|
//import net.srt.entity.MetadataEntity;
|
||||||
import net.srt.framework.common.cache.bean.Neo4jInfo;
|
//import net.srt.framework.common.cache.bean.Neo4jInfo;
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
//import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
import net.srt.framework.mybatis.service.BaseService;
|
//import net.srt.framework.mybatis.service.BaseService;
|
||||||
import net.srt.vo.MetadataVo;
|
//import net.srt.vo.MetadataVo;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @BelongsProject: srt_cloud
|
// * @BelongsProject: srt_cloud
|
||||||
* @BelongsPackage: net.srt.service
|
// * @BelongsPackage: net.srt.service
|
||||||
* @Author: jpz
|
// * @Author: jpz
|
||||||
* @CreateTime: 2023/12/24 14:35
|
// * @CreateTime: 2023/12/24 14:35
|
||||||
*/
|
// */
|
||||||
|
//
|
||||||
public interface MetadataService extends BaseService<MetadataEntity> {
|
//public interface MetadataService extends BaseService<MetadataEntity> {
|
||||||
List<TreeNodeVo> listByPatenId(Long parentId);
|
// List<TreeNodeVo> listByPatenId(Long parentId);
|
||||||
|
//
|
||||||
List<TreeNodeVo> listFloder();
|
// List<TreeNodeVo> listFloder();
|
||||||
|
//
|
||||||
List<TreeNodeVo> listDb();
|
// List<TreeNodeVo> listDb();
|
||||||
|
//
|
||||||
List<TreeNodeVo> listKeyword(String keyword);
|
// List<TreeNodeVo> listKeyword(String keyword);
|
||||||
|
//
|
||||||
MetadataVo get(Long id);
|
// MetadataVo get(Long id);
|
||||||
|
//
|
||||||
void save(MetadataVo vo);
|
// void save(MetadataVo vo);
|
||||||
|
//
|
||||||
void update(MetadataVo vo);
|
// void update(MetadataVo vo);
|
||||||
|
//
|
||||||
void delete(Long id);
|
// void delete(Long id);
|
||||||
|
//
|
||||||
void updateNeo4j(Neo4jInfo neo4jInfo);
|
// void updateNeo4j(Neo4jInfo neo4jInfo);
|
||||||
|
//
|
||||||
Neo4jInfo getNeo4j();
|
// Neo4jInfo getNeo4j();
|
||||||
}
|
//}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package net.srt.service.impl;
|
//package net.srt.service.impl;
|
||||||
|
//
|
||||||
import io.swagger.v3.oas.annotations.servers.Server;
|
//import io.swagger.v3.oas.annotations.servers.Server;
|
||||||
import lombok.AllArgsConstructor;
|
//import lombok.AllArgsConstructor;
|
||||||
import net.srt.dao.MetadataDao;
|
//import net.srt.dao.MetadataDao;
|
||||||
import net.srt.entity.MetadataEntity;
|
//import net.srt.entity.MetadataEntity;
|
||||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
//import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
import net.srt.service.MetadataService;
|
//import net.srt.service.MetadataService;
|
||||||
@Server
|
//@Server
|
||||||
@AllArgsConstructor
|
//@AllArgsConstructor
|
||||||
public class MetadataServiceImpl extends BaseServiceImpl<MetadataDao, MetadataEntity> implements MetadataService {
|
//public class MetadataServiceImpl extends BaseServiceImpl<MetadataDao, MetadataEntity> implements MetadataService {
|
||||||
}
|
//}
|
||||||
|
|
|
@ -9,11 +9,6 @@
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>net.srt</groupId>
|
|
||||||
<artifactId>srt-cloud-api</artifactId>
|
|
||||||
<version>2.0.0</version>
|
|
||||||
</dependency>
|
|
||||||
<!--数据血缘-->
|
<!--数据血缘-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.srt</groupId>
|
<groupId>net.srt</groupId>
|
||||||
|
|
Loading…
Reference in New Issue