最新一版
parent
f6c5cd77b3
commit
8e16bf16a9
|
@ -11,9 +11,9 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
* @Author : FJJ
|
* @Author : FJJ
|
||||||
* @Date: 2023-12-20 11:16
|
* @Date: 2023-12-20 11:16
|
||||||
*/
|
*/
|
||||||
|
@EnableFeignClients
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
|
||||||
public class GovernanceApplication {
|
public class GovernanceApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(GovernanceApplication.class, 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);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +1,14 @@
|
||||||
package net.srt.standard.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 net.srt.vo.StandardManagementParam;
|
||||||
import net.srt.framework.common.page.PageResult;
|
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.Result;
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
import net.srt.vo.StandardManagementVo;
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
import net.srt.service.StandardService;
|
||||||
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
@ -24,26 +21,26 @@ import javax.validation.Valid;
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/data-standard")
|
@RequestMapping("/data-standard")
|
||||||
|
@Tag(name = "数据治理-标准管理")
|
||||||
|
@AllArgsConstructor
|
||||||
public class DatastandardController {
|
public class DatastandardController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private StandardService standardService;
|
private StandardService standardService;
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
public Result<PageResult<StandardManagementVo>> page(@Valid StandardManagementRequest query){
|
public Result<PageResult<StandardManagementVo>> page(@Valid StandardManagementParam query){
|
||||||
return Result.ok(standardService.pagea(query));
|
return Result.ok(standardService.pagea(query));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "保存")
|
@Operation(summary = "保存")
|
||||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:save')")
|
|
||||||
public Result<String > add(@RequestBody StandardManagementVo standardManagementVo){
|
public Result<String > add(@RequestBody StandardManagementVo standardManagementVo){
|
||||||
standardService.addStand(standardManagementVo);
|
standardService.addStand(standardManagementVo);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PutMapping
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:update')")
|
|
||||||
public Result<String > update(@RequestBody @Valid StandardManagementVo standardManagementVo){
|
public Result<String > update(@RequestBody @Valid StandardManagementVo standardManagementVo){
|
||||||
standardService.updateStand(standardManagementVo);
|
standardService.updateStand(standardManagementVo);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
|
@ -51,7 +48,6 @@ public class DatastandardController {
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:delete')")
|
|
||||||
public Result<String > delete(Long id){
|
public Result<String > delete(Long id){
|
||||||
standardService.delete(id);
|
standardService.delete(id);
|
||||||
return Result.ok();
|
return Result.ok();
|
|
@ -0,0 +1,41 @@
|
||||||
|
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.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;
|
||||||
|
|
||||||
|
@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));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,15 +1,10 @@
|
||||||
package net.srt.standard.controller;
|
package net.srt.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
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 net.srt.framework.common.utils.BeanUtil;
|
|
||||||
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.standard.domain.entity.DatagovernanceEntity;
|
import net.srt.service.StandardService;
|
||||||
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.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
|
@ -0,0 +1,18 @@
|
||||||
|
package net.srt.convert;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.vo.MetamodelVO;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
@Component
|
||||||
|
public interface MetamodelConvert {
|
||||||
|
MetamodelConvert INSTANCE = Mappers.getMapper(MetamodelConvert.class);
|
||||||
|
|
||||||
|
MetamodelEntity convert(MetamodelVO vo);
|
||||||
|
|
||||||
|
MetamodelVO convert(MetamodelEntity entity);
|
||||||
|
|
||||||
|
List<MetamodelVO> convertList(List<MetamodelEntity> list);
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import net.srt.entity.QualityQueryEntity;
|
||||||
import net.srt.vo.QualityRuleVo;
|
import net.srt.vo.QualityRuleVo;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ import java.util.List;
|
||||||
* @Author: jpz
|
* @Author: jpz
|
||||||
* @CreateTime: 2023/12/20 19:50
|
* @CreateTime: 2023/12/20 19:50
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Component
|
||||||
public interface QualityRuleConvert {
|
public interface QualityRuleConvert {
|
||||||
QualityRuleConvert INSTANCE = Mappers.getMapper(QualityRuleConvert.class);
|
QualityRuleConvert INSTANCE = Mappers.getMapper(QualityRuleConvert.class);
|
||||||
|
|
||||||
|
|
|
@ -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> {
|
||||||
|
}
|
|
@ -1,7 +1,8 @@
|
||||||
package net.srt.standard.mapper;
|
package net.srt.dao;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
import net.srt.entity.DatagovernanceEntity;
|
||||||
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,5 +12,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
* @Date: 2023-12-20 11:30
|
* @Date: 2023-12-20 11:30
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StandardMapper extends BaseMapper<DatagovernanceEntity> {
|
public interface StandardDao extends BaseDao<DatagovernanceEntity> {
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package net.srt.standard.domain.entity;
|
package net.srt.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.AllArgsConstructor;
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@TableName(value = "data_governance_quality_rule", autoResultMap = true)
|
@TableName(value = "data_governance_quality_rule")
|
||||||
public class QualityQueryEntity extends BaseEntity {
|
public class QualityQueryEntity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 名称
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MetamodelService extends BaseService<MetamodelEntity> {
|
||||||
|
List<TreeNodeVo> listTree();
|
||||||
|
}
|
|
@ -1,12 +1,11 @@
|
||||||
package net.srt.standard.service;
|
package net.srt.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import net.srt.framework.common.page.PageResult;
|
import net.srt.framework.common.page.PageResult;
|
||||||
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.standard.domain.vo.StandardManagementVo;
|
import net.srt.vo.StandardManagementVo;
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
import net.srt.entity.DatagovernanceEntity;
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
import net.srt.vo.StandardManagementParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ import java.util.List;
|
||||||
* @Date: 2023-12-20 11:31
|
* @Date: 2023-12-20 11:31
|
||||||
*/
|
*/
|
||||||
public interface StandardService extends BaseService<DatagovernanceEntity> {
|
public interface StandardService extends BaseService<DatagovernanceEntity> {
|
||||||
// Page<StandardManagementVo> listpage(StandardManagementRequest standardManagementRequest);
|
// Page<StandardManagementVo> listpage(StandardManagementParam standardManagementRequest);
|
||||||
|
|
||||||
List<TreeNodeVo> listTree();
|
List<TreeNodeVo> listTree();
|
||||||
|
|
||||||
|
@ -27,9 +26,9 @@ public interface StandardService extends BaseService<DatagovernanceEntity> {
|
||||||
|
|
||||||
void delete(Long id);
|
void delete(Long id);
|
||||||
|
|
||||||
PageResult<StandardManagementVo> pagea(StandardManagementRequest query);
|
PageResult<StandardManagementVo> pagea(StandardManagementParam query);
|
||||||
|
|
||||||
// PageResult<StandardManagementVo> list(StandardManagementRequest standardManagementRequest);
|
// PageResult<StandardManagementVo> list(StandardManagementParam standardManagementRequest);
|
||||||
//
|
//
|
||||||
// void add(StandardManagementVo standardManagement);
|
// void add(StandardManagementVo standardManagement);
|
||||||
}
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import net.srt.dao.MetamodelDao;
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
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 org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,16 @@
|
||||||
package net.srt.standard.service.impl;
|
package net.srt.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import net.srt.dao.StandardDao;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import net.srt.vo.StandardManagementParam;
|
||||||
import net.srt.framework.common.page.PageResult;
|
import net.srt.framework.common.page.PageResult;
|
||||||
import net.srt.framework.common.utils.BeanUtil;
|
import net.srt.framework.common.utils.BeanUtil;
|
||||||
import net.srt.framework.common.utils.BuildTreeUtils;
|
import net.srt.framework.common.utils.BuildTreeUtils;
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
import net.srt.vo.StandardManagementVo;
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
import net.srt.entity.DatagovernanceEntity;
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
import net.srt.service.StandardService;
|
||||||
import net.srt.standard.mapper.StandardMapper;
|
|
||||||
import net.srt.standard.service.StandardService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -25,9 +23,9 @@ import java.util.List;
|
||||||
* @Date: 2023-12-20 11:31
|
* @Date: 2023-12-20 11:31
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class StandardServiceImpl extends BaseServiceImpl<StandardMapper, DatagovernanceEntity> implements StandardService {
|
public class StandardServiceImpl extends BaseServiceImpl<StandardDao, DatagovernanceEntity> implements StandardService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private StandardMapper standardMapper;
|
private StandardDao standardDao;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -63,7 +61,7 @@ public class StandardServiceImpl extends BaseServiceImpl<StandardMapper, Datagov
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<StandardManagementVo> pagea(StandardManagementRequest query) {
|
public PageResult<StandardManagementVo> pagea(StandardManagementParam query) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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 com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.srt.QualittRule;
|
|
||||||
import net.srt.framework.common.utils.DateUtils;
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
package net.srt.standard.domain.dto;
|
package net.srt.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import net.srt.standard.domain.query.Query;
|
import net.srt.framework.common.query.Query;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName : StandardManagementRequest
|
* @ClassName : StandardManagementParam
|
||||||
* @Description :
|
* @Description :
|
||||||
* @Author : FJJ
|
* @Author : FJJ
|
||||||
* @Date: 2023-12-20 14:40
|
* @Date: 2023-12-20 14:40
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class StandardManagementRequest extends Query {
|
public class StandardManagementParam extends Query {
|
||||||
private String cnName;
|
private String cnName;
|
||||||
private String engName;
|
private String engName;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package net.srt.standard.domain.vo;
|
package net.srt.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
@ -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>
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 8093
|
port: 8094
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
mvc:
|
mvc:
|
||||||
|
|
Loading…
Reference in New Issue