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
6b00708c
Commit
6b00708c
authored
Nov 13, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取用户信息bug
parent
96a51172
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
PublicController.java
.../github/wxiaoqi/security/admin/rest/PublicController.java
+6
-6
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/PublicController.java
View file @
6b00708c
...
@@ -72,7 +72,7 @@ public class PublicController {
...
@@ -72,7 +72,7 @@ public class PublicController {
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
}
}
Integer
userid
=
Integer
.
parseInt
(
username
);
Integer
userid
=
Integer
.
parseInt
(
username
);
return
getAppUserInfoById
(
userid
);
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
userid
)
);
}
}
@RequestMapping
(
value
=
"/app/userinfo-by-id"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/userinfo-by-id"
,
method
=
RequestMethod
.
GET
)
...
@@ -81,7 +81,7 @@ public class PublicController {
...
@@ -81,7 +81,7 @@ public class PublicController {
if
(
id
==
null
)
{
if
(
id
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
return
ObjectRestResponse
.
paramIsEmpty
();
}
}
return
getAppUserInfoById
(
id
);
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
id
)
);
}
}
@RequestMapping
(
value
=
"/app/userinfo-by-username"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/userinfo-by-username"
,
method
=
RequestMethod
.
GET
)
...
@@ -98,15 +98,15 @@ public class PublicController {
...
@@ -98,15 +98,15 @@ public class PublicController {
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
}
}
}
}
return
getAppUserInfoById
(
appUserLogin
.
getId
(
));
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
appUserLogin
.
getId
()
));
}
}
private
ObjectRestResponse
<
AppUserDTO
>
getAppUserInfoById
(
Integer
userid
)
throws
IllegalAccessException
,
InvocationTargetException
{
private
AppUserDTO
getAppUserInfoById
(
Integer
userid
)
throws
IllegalAccessException
,
InvocationTargetException
{
AppUserDTO
userDTO
=
new
AppUserDTO
();
AppUserDTO
userDTO
=
new
AppUserDTO
();
//获取用户基础信息
//获取用户基础信息
AppUserVo
userVo
=
detailBiz
.
getUserInfoById
(
userid
);
AppUserVo
userVo
=
detailBiz
.
getUserInfoById
(
userid
);
if
(
userVo
==
null
)
{
if
(
userVo
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
USER_NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
USER_NOTEXIST_CODE
))
;
return
null
;
}
}
Integer
id
=
userVo
.
getId
();
Integer
id
=
userVo
.
getId
();
Integer
positionId
=
userVo
.
getPositionId
();
Integer
positionId
=
userVo
.
getPositionId
();
...
@@ -123,7 +123,7 @@ public class PublicController {
...
@@ -123,7 +123,7 @@ public class PublicController {
userDTO
.
setPositionName
(
userPosition
.
getName
());
userDTO
.
setPositionName
(
userPosition
.
getName
());
}
}
userDTO
.
setId
(
id
);
userDTO
.
setId
(
id
);
return
ObjectRestResponse
.
succ
(
userDTO
)
;
return
userDTO
;
}
}
@RequestMapping
(
value
=
"/userinfo-by-uid"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/userinfo-by-uid"
,
method
=
RequestMethod
.
GET
)
...
...
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