Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
framework-tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 46c3d2a8
authored
Jul 16, 2024
by
henry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加pgql
1 parent
3cdc53ab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
6 deletions
framework-analysis/src/main/java/org/arch/analysis/controller/ArchMapController.java
framework-analysis/src/main/java/org/arch/analysis/dto/ArchMapDto.java
framework-analysis/src/main/java/org/arch/analysis/service/impl/ArchMapServiceImpl.java
framework-clouds/mybatis/pom.xml
pom.xml
framework-analysis/src/main/java/org/arch/analysis/controller/ArchMapController.java
View file @
46c3d2a
...
...
@@ -38,9 +38,9 @@ public class ArchMapController {
@PostMapping
(
"getOverAllBusAsset"
)
@OperLog
(
value
=
LogOperTypeEnum
.
QUERY
,
logTypeValue
=
LogTypeEnum
.
BUSI_LOG
,
operDes
=
"获取总体业务架构资产信息"
,
moduleName
=
"架构地图"
)
public
Result
getOverAllBusAsset
(
@RequestBody
ArchMapDto
mapDto
)
{
Stri
ng
parentAssetId
=
mapDto
.
getParentAssetId
();
lo
ng
parentAssetId
=
mapDto
.
getParentAssetId
();
String
archiType
=
mapDto
.
getArchiType
();
if
(
StringUtils
.
isEmpty
(
archiType
)
&&
StringUtils
.
isEmpty
(
parentAssetId
)
)
{
if
(
StringUtils
.
isEmpty
(
archiType
))
{
throw
new
NullPointerException
(
"架构类型、架构层级及元素名称不能为空;"
);
}
List
<
ArchMapVo
>
resultDatas
=
archMapService
.
getOverAllBusAsset
(
mapDto
);
...
...
framework-analysis/src/main/java/org/arch/analysis/dto/ArchMapDto.java
View file @
46c3d2a
...
...
@@ -23,7 +23,7 @@ public class ArchMapDto {
/**
* 父级资产编号
*/
private
Stri
ng
parentAssetId
;
private
lo
ng
parentAssetId
;
/**
* 架构类别 1:总体架构;2:系统架构
*/
...
...
framework-analysis/src/main/java/org/arch/analysis/service/impl/ArchMapServiceImpl.java
View file @
46c3d2a
...
...
@@ -37,12 +37,12 @@ public class ArchMapServiceImpl implements IArchMapService {
public
List
<
ArchMapVo
>
getAssetTree
(
ArchMapDto
mapDto
)
{
List
<
ArchMapVo
>
allDatas
=
archMapMapper
.
getOverAllBusAsset
(
mapDto
);
List
<
ArchMapVo
>
treeList
=
new
ArrayList
<>();
mapDto
.
setParentAssetId
(
"0"
);
mapDto
.
setParentAssetId
(
0
);
List
<
ArchMapVo
>
rootDatas
=
archMapMapper
.
getOverAllBusAsset
(
mapDto
);
if
(!
Collections
.
isEmpty
(
rootDatas
))
{
treeList
=
rootDatas
.
stream
()
.
filter
(
item
->
!
StringUtils
.
isEmpty
(
item
.
getParentAssetId
()))
.
filter
(
item
->
item
.
getParentAssetId
().
equals
(
"0"
))
.
filter
(
item
->
item
.
getParentAssetId
().
equals
(
0
))
.
peek
(
item
->
item
.
setChildren
(
getChildrens
(
item
,
allDatas
))).
collect
(
Collectors
.
toList
());
}
return
treeList
;
...
...
framework-clouds/mybatis/pom.xml
View file @
46c3d2a
...
...
@@ -41,7 +41,10 @@
<groupId>
com.mysql
</groupId>
<artifactId>
mysql-connector-j
</artifactId>
</dependency>
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
druid-spring-boot-starter
</artifactId>
...
...
pom.xml
View file @
46c3d2a
...
...
@@ -82,9 +82,16 @@
<configuration.version>
1.10
</configuration.version>
<mybatisPlus.version>
1.4.11
</mybatisPlus.version>
<openFeign.version>
3.1.5
</openFeign.version>
<pgsql.version>
42.1.1
</pgsql.version>
</properties>
<dependencyManagement>
<dependencies>
<!--设置具体的依赖-->
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<version>
${pgsql.version}
</version>
</dependency>
<dependency>
<groupId>
com.github.yulichang
</groupId>
<artifactId>
mybatis-plus-join-core
</artifactId>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment