Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
e1ad9c53
Commit
e1ad9c53
authored
Jul 15, 2022
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.树数量统计未包括自身数量
parent
72452dd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+1
-1
ElasticSearchClientConfig.java
...boot/module/jcs/biz/config/ElasticSearchClientConfig.java
+3
-6
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
e1ad9c53
...
@@ -1322,7 +1322,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
...
@@ -1322,7 +1322,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
return
companyList
.
stream
().
filter
(
a
->
companyList
.
stream
().
noneMatch
(
c
->
c
.
getId
().
toString
().
equals
(
a
.
getParentId
())))
return
companyList
.
stream
().
filter
(
a
->
companyList
.
stream
().
noneMatch
(
c
->
c
.
getId
().
toString
().
equals
(
a
.
getParentId
())))
.
peek
(
b
->
{
.
peek
(
b
->
{
b
.
setChildren
(
getCompanyBuildingChildrenTree
(
b
.
getId
().
toString
(),
companyList
));
b
.
setChildren
(
getCompanyBuildingChildrenTree
(
b
.
getId
().
toString
(),
companyList
));
b
.
setTotal
(
b
.
getChildren
().
stream
().
filter
(
c
->
c
.
getTotal
()
!=
null
).
mapToLong
(
BuildingTreeVo:
:
getTotal
).
sum
());
b
.
setTotal
(
b
.
getChildren
().
stream
().
filter
(
c
->
c
.
getTotal
()
!=
null
).
mapToLong
(
BuildingTreeVo:
:
getTotal
).
sum
()
+
b
.
getTotal
()
);
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/config/ElasticSearchClientConfig.java
View file @
e1ad9c53
...
@@ -41,12 +41,9 @@ public class ElasticSearchClientConfig {
...
@@ -41,12 +41,9 @@ public class ElasticSearchClientConfig {
final
String
[]
parts
=
StringUtils
.
split
(
url
,
":"
);
final
String
[]
parts
=
StringUtils
.
split
(
url
,
":"
);
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
HttpHost
httpHost
=
new
HttpHost
(
parts
[
0
],
Integer
.
parseInt
(
parts
[
1
]),
"http"
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
RestClientBuilder
builder
=
RestClient
.
builder
(
httpHost
);
builder
.
setHttpClientConfigCallback
(
new
RestClientBuilder
.
HttpClientConfigCallback
()
{
builder
.
setHttpClientConfigCallback
(
httpClientBuilder
->
{
@Override
httpClientBuilder
.
disableAuthCaching
();
public
HttpAsyncClientBuilder
customizeHttpClient
(
HttpAsyncClientBuilder
httpClientBuilder
)
{
return
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
);
httpClientBuilder
.
disableAuthCaching
();
return
httpClientBuilder
.
setDefaultCredentialsProvider
(
credentialsProvider
);
}
});
});
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
builder
.
setRequestConfigCallback
(
new
RestClientBuilder
.
RequestConfigCallback
()
{
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment