Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
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 d1bdce02
authored
Oct 13, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:组织树支持查询所有
1 parent
e7f935bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrganizationServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrganizationServiceImpl.java
View file @
d1bdce0
...
...
@@ -13,6 +13,7 @@ import com.google.common.collect.Lists;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -44,8 +45,12 @@ public class OrganizationServiceImpl implements OrganizationService {
public
Result
<?>
getOrganizationTree
(
String
levelType
,
String
levelValue
)
{
// 如果传递了精确的id,只返回对应的tree内容;如果没有传递,返回所有tree内容
List
<
OrganizationTreeDTO
.
Result
>
rs
=
new
ArrayList
<>();
for
(
String
value
:
levelValue
.
split
(
","
))
{
rs
.
add
(
getOrganizationTreeByOrgId
(
levelType
,
value
));
if
(
StringUtils
.
isBlank
(
levelType
)
&&
StringUtils
.
isBlank
(
levelValue
))
{
rs
.
add
(
getOrganizationTreeByOrgId
(
levelType
,
levelValue
));
}
else
{
for
(
String
value
:
levelValue
.
split
(
","
))
{
rs
.
add
(
getOrganizationTreeByOrgId
(
levelType
,
value
));
}
}
return
Result
.
success
(
rs
);
}
...
...
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