Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
677cfef7
Commit
677cfef7
authored
Oct 18, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改消息提示
parent
a8b5fe46
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
AdminLoginController.java
src/main/java/com/egolm/film/login/AdminLoginController.java
+2
-2
MemberLoginController.java
...main/java/com/egolm/film/login/MemberLoginController.java
+2
-2
UserLoginController.java
src/main/java/com/egolm/film/login/UserLoginController.java
+2
-2
MemberTokenServiceImpl.java
...egolm/film/login/service/impl/MemberTokenServiceImpl.java
+4
-4
No files found.
src/main/java/com/egolm/film/login/AdminLoginController.java
View file @
677cfef7
...
...
@@ -31,7 +31,7 @@ public class AdminLoginController {
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
public
Object
login
(
String
username
,
String
password
)
{
XException
.
assertNotBlank
(
messages
.
get
(
"
sys.
err.user_pwd_null"
),
username
,
password
);
XException
.
assertNotBlank
(
messages
.
get
(
"err.user_pwd_null"
),
username
,
password
);
if
(
tokenService
.
isLogin
())
{
throw
new
XException
(
"用户已登录"
,
200
);
}
else
{
...
...
@@ -39,7 +39,7 @@ public class AdminLoginController {
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
().
setData
(
token
);
}
else
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_or_pwd"
));
throw
new
XException
(
messages
.
get
(
"err.user_or_pwd"
));
}
}
}
...
...
src/main/java/com/egolm/film/login/MemberLoginController.java
View file @
677cfef7
...
...
@@ -30,7 +30,7 @@ public class MemberLoginController {
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
public
Object
login
(
String
username
,
String
password
)
{
XException
.
assertNotBlank
(
messages
.
get
(
"
sys.
err.user_pwd_null"
),
username
,
password
);
XException
.
assertNotBlank
(
messages
.
get
(
"err.user_pwd_null"
),
username
,
password
);
if
(
tokenService
.
isLogin
())
{
throw
new
XException
(
""
,
200
);
}
else
{
...
...
@@ -38,7 +38,7 @@ public class MemberLoginController {
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
();
}
else
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_or_pwd"
));
throw
new
XException
(
messages
.
get
(
"err.user_or_pwd"
));
}
}
}
...
...
src/main/java/com/egolm/film/login/UserLoginController.java
View file @
677cfef7
...
...
@@ -30,7 +30,7 @@ public class UserLoginController {
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
public
Object
login
(
String
username
,
String
password
)
{
XException
.
assertNotBlank
(
messages
.
get
(
"
sys.
err.user_pwd_null"
),
username
,
password
);
XException
.
assertNotBlank
(
messages
.
get
(
"err.user_pwd_null"
),
username
,
password
);
if
(
tokenService
.
isLogin
())
{
throw
new
XException
(
""
,
200
);
}
else
{
...
...
@@ -38,7 +38,7 @@ public class UserLoginController {
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
().
setData
(
token
);
}
else
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_or_pwd"
));
throw
new
XException
(
messages
.
get
(
"err.user_or_pwd"
));
}
}
}
...
...
src/main/java/com/egolm/film/login/service/impl/MemberTokenServiceImpl.java
View file @
677cfef7
...
...
@@ -30,7 +30,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
try
{
member
=
memberService
.
getMemberByEmail
(
email
);
}
catch
(
Exception
e
)
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_pwd_err"
));
throw
new
XException
(
messages
.
get
(
"err.user_pwd_err"
));
}
Integer
state
=
member
.
getState
();
if
(
state
==
1
)
{
...
...
@@ -43,12 +43,12 @@ public class MemberTokenServiceImpl implements MemberTokenService {
session
.
setAttribute
(
TOKEN_NAME
,
token
);
return
token
;
}
else
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_pwd_err"
));
throw
new
XException
(
messages
.
get
(
"err.user_pwd_err"
));
}
}
else
if
(
state
==
2
)
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_disabled"
));
throw
new
XException
(
messages
.
get
(
"err.user_disabled"
));
}
else
{
throw
new
XException
(
messages
.
get
(
"
sys.
err"
));
throw
new
XException
(
messages
.
get
(
"err"
));
}
}
...
...
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