Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-usercenter-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a6ddc043
authored
Mar 29, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增获取用户可见账号id接口
1 parent
0218ab2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
src/main/java/cn/com/glsx/usercenter/api/feign/OrganizationService.java
src/main/java/cn/com/glsx/usercenter/api/feign/fallback/OrganizationServiceFallbackImpl.java
src/main/java/cn/com/glsx/usercenter/api/feign/OrganizationService.java
View file @
a6ddc04
...
...
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Set
;
@FeignClient
(
name
=
"${feign.usercenter.name}"
,
...
...
@@ -104,4 +105,12 @@ public interface OrganizationService {
@GetMapping
(
value
=
"/orgTree"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
List
<
OrgTreeModel
>>
orgTree
(
@RequestBody
FindOrgRequest
request
);
/**
* 获取用户下级全部组织(本人、本人及下属角色时,也返回部门id)
*
* @return
*/
@GetMapping
(
value
=
"/getAllSubOrgIds"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
R
<
Set
<
Long
>>
getAllSubOrgIds
();
}
src/main/java/cn/com/glsx/usercenter/api/feign/fallback/OrganizationServiceFallbackImpl.java
View file @
a6ddc04
...
...
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Component;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Set
;
@Slf4j
@Component
...
...
@@ -73,4 +74,10 @@ public class OrganizationServiceFallbackImpl implements OrganizationService {
return
R
.
ok
();
}
@Override
public
R
<
Set
<
Long
>>
getAllSubOrgIds
()
{
log
.
warn
(
"熔断啦 {}"
,
cause
.
getMessage
());
return
R
.
ok
();
}
}
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