Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
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
licc
data-server
Commits
1ecc72e4
Commit
1ecc72e4
authored
Mar 13, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
df6b5e42
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
LoginController.java
...n/wisenergy/web/admin/controller/app/LoginController.java
+6
-7
No files found.
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/LoginController.java
View file @
1ecc72e4
...
@@ -114,19 +114,18 @@ public class LoginController {
...
@@ -114,19 +114,18 @@ public class LoginController {
@ApiOperation
(
value
=
"获取用户登录token信息"
,
notes
=
"获取用户登录token信息"
,
httpMethod
=
"POST"
,
produces
=
"application/json; charset=UTF-8"
)
@ApiOperation
(
value
=
"获取用户登录token信息"
,
notes
=
"获取用户登录token信息"
,
httpMethod
=
"POST"
,
produces
=
"application/json; charset=UTF-8"
)
@PostMapping
(
"/info"
)
@PostMapping
(
"/info"
)
public
Map
info
(
HttpServletRequest
request
)
throws
Exception
{
public
Result
info
(
HttpServletRequest
request
)
throws
Exception
{
String
token
=
request
.
getHeader
(
"token"
);
String
token
=
request
.
getHeader
(
"token"
);
String
tokenKey
=
StringUtil
.
formatKeyWithPrefix
(
Constants
.
RedisKey
.
PROJECT_PRIFIX
,
Constants
.
RedisKey
.
TOKEN_PRIFIX
,
token
);
String
tokenKey
=
StringUtil
.
formatKeyWithPrefix
(
Constants
.
RedisKey
.
PROJECT_PRIFIX
,
Constants
.
RedisKey
.
TOKEN_PRIFIX
,
token
);
String
userDtoJson
=
redisUtils
.
getValue
(
tokenKey
);
String
userDtoJson
=
redisUtils
.
getValue
(
tokenKey
);
if
(
StringUtil
.
isBlank
(
userDtoJson
))
{
if
(
StringUtil
.
isBlank
(
userDtoJson
))
{
Map
map
=
new
HashMap
();
//
Map map = new HashMap();
map
.
put
(
"code"
,
"2001"
);
//
map.put("code", "2001");
map
.
put
(
"msg"
,
"未登录"
);
//
map.put("msg", "未登录");
return
map
;
return
ResultUtils
.
returnFail
(
"未登录"
)
;
}
}
UsersDto
usersDto
=
JSONObject
.
parseObject
(
userDtoJson
,
UsersDto
.
class
);
UsersDto
usersDto
=
JSONObject
.
parseObject
(
userDtoJson
,
UsersDto
.
class
);
return
ResultUtils
.
returnDataSuccess
(
usersDto
);
return
(
Map
)
ResultUtils
.
returnDataSuccess
(
userDtoJson
);
}
}
@ApiOperation
(
value
=
"二维码邀请注册"
,
notes
=
"二维码邀请注册"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"二维码邀请注册"
,
notes
=
"二维码邀请注册"
,
httpMethod
=
"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