Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
4d634102
Commit
4d634102
authored
Nov 05, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
fc98498d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
16 deletions
+47
-16
UserFeign.java
...va/com/github/wxiaoqi/security/admin/feign/UserFeign.java
+7
-3
PublicController.java
.../github/wxiaoqi/security/admin/rest/PublicController.java
+40
-13
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
View file @
4d634102
...
...
@@ -37,6 +37,11 @@ public interface UserFeign {
@RequestMapping
(
value
=
"/public/userinfo-by-token"
)
public
ObjectRestResponse
<
UserDTO
>
userinfoByToken
(
@RequestParam
(
"token"
)
String
token
);
@RequestMapping
(
value
=
"/public/userinfo-by-uid"
)
public
ObjectRestResponse
<
UserDTO
>
userinfoByUid
(
@RequestParam
(
"uid"
)
Integer
uid
);
/**************************************************潮惠玩新的*******************************************************/
@RequestMapping
(
value
=
"/public/v2/userinfo-by-token"
)
ObjectRestResponse
<
UserDTO
>
userinfoByTokenV2
(
@RequestParam
(
"token"
)
String
token
,
@RequestParam
(
"flag"
)
boolean
flag
);
...
...
@@ -47,9 +52,8 @@ public interface UserFeign {
@ResponseBody
public
ObjectRestResponse
<
UserDTO
>
businessUserinfoByMobilePhone
(
@RequestParam
(
"mobilePhone"
)
String
mobilePhone
);
@RequestMapping
(
value
=
"/public/userinfo-by-uid"
)
public
ObjectRestResponse
<
UserDTO
>
userinfoByUid
(
@RequestParam
(
"uid"
)
Integer
uid
);
@RequestMapping
(
value
=
"/public/v2/userinfo-by-uid"
)
public
ObjectRestResponse
<
UserDTO
>
userinfoByUidV2
(
@RequestParam
(
"uid"
)
Integer
uid
);
/**
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/PublicController.java
View file @
4d634102
...
...
@@ -108,6 +108,46 @@ public class PublicController {
}
@RequestMapping
(
value
=
"/userinfo-by-uid"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
<
User
>
userinfoByUid
(
Integer
uid
)
throws
Exception
{
if
(
uid
==
null
||
uid
==
0
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
User
user
=
userBiz
.
getUserByUid
(
uid
);
if
(
user
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
));
}
return
ObjectRestResponse
.
succ
(
user
);
}
@RequestMapping
(
value
=
"v2/userinfo-by-uid"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
userinfoByUidV2
(
Integer
uid
)
throws
Exception
{
User
user
=
userBiz
.
selectOne
(
new
User
(){{
setId
(
uid
);
setIsDel
(
SYS_FALSE
);
setStatus
(
SYS_TRUE
);
}});
if
(
user
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
));
}
if
(
user
.
getDataCorporation
()
!=
null
){
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
.
CompanySearchDTO
companySearchDTO
=
new
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
.
CompanySearchDTO
();
companySearchDTO
.
setDataCorporationIds
(
Arrays
.
asList
(
user
.
getDataCorporation
().
split
(
","
)).
parallelStream
().
map
(
s
->
Integer
.
valueOf
(
s
)).
collect
(
Collectors
.
toList
()));
List
<
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
.
CompanySearchVO
>
companySearchVOList
=
branchCompanyBiz
.
getList
(
companySearchDTO
);
if
(
companySearchVOList
!=
null
&&
companySearchVOList
.
size
()
>
0
){
List
<
Integer
>
companyIds
=
companySearchVOList
.
stream
().
map
(
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
.
CompanySearchVO
::
getId
).
distinct
().
collect
(
Collectors
.
toList
());
user
.
setCompanyIds
(
companyIds
);
}
}
else
if
(
user
.
getDataCompany
()
!=
null
){
List
<
Integer
>
companyIds
=
Arrays
.
asList
(
user
.
getDataCompany
().
split
(
","
)).
parallelStream
().
map
(
s
->
Integer
.
valueOf
(
s
)).
collect
(
Collectors
.
toList
());
user
.
setCompanyIds
(
companyIds
);
}
return
new
ObjectRestResponse
<
User
>().
rel
(
true
).
data
(
user
);
}
@RequestMapping
(
value
=
"v2/userinfo-by-appUserId"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
userinfoByAppUserIdV2
(
Integer
appUserId
){
...
...
@@ -224,19 +264,6 @@ public class PublicController {
return
userDTO
;
}
@RequestMapping
(
value
=
"/userinfo-by-uid"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
<
User
>
userinfoByUid
(
Integer
uid
)
throws
Exception
{
if
(
uid
==
null
||
uid
==
0
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
User
user
=
userBiz
.
getUserByUid
(
uid
);
if
(
user
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
));
}
return
ObjectRestResponse
.
succ
(
user
);
}
@GetMapping
(
"/getByUserIds"
)
public
ObjectRestResponse
<
List
<
AppUserVo
>>
getByUserIds
(
@RequestParam
(
"ids"
)
List
<
Integer
>
ids
)
{
if
(
ids
==
null
)
{
...
...
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