Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
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 {
...
@@ -31,7 +31,7 @@ public class AdminLoginController {
@PostMapping
(
"login"
)
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
@ApiOperation
(
"登陆"
)
public
Object
login
(
String
username
,
String
password
)
{
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
())
{
if
(
tokenService
.
isLogin
())
{
throw
new
XException
(
"用户已登录"
,
200
);
throw
new
XException
(
"用户已登录"
,
200
);
}
else
{
}
else
{
...
@@ -39,7 +39,7 @@ public class AdminLoginController {
...
@@ -39,7 +39,7 @@ public class AdminLoginController {
if
(
token
!=
null
)
{
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
().
setData
(
token
);
return
Rjx
.
jsonOk
().
setData
(
token
);
}
else
{
}
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 {
...
@@ -30,7 +30,7 @@ public class MemberLoginController {
@PostMapping
(
"login"
)
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
@ApiOperation
(
"登陆"
)
public
Object
login
(
String
username
,
String
password
)
{
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
())
{
if
(
tokenService
.
isLogin
())
{
throw
new
XException
(
""
,
200
);
throw
new
XException
(
""
,
200
);
}
else
{
}
else
{
...
@@ -38,7 +38,7 @@ public class MemberLoginController {
...
@@ -38,7 +38,7 @@ public class MemberLoginController {
if
(
token
!=
null
)
{
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
();
return
Rjx
.
jsonOk
();
}
else
{
}
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 {
...
@@ -30,7 +30,7 @@ public class UserLoginController {
@PostMapping
(
"login"
)
@PostMapping
(
"login"
)
@ApiOperation
(
"登陆"
)
@ApiOperation
(
"登陆"
)
public
Object
login
(
String
username
,
String
password
)
{
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
())
{
if
(
tokenService
.
isLogin
())
{
throw
new
XException
(
""
,
200
);
throw
new
XException
(
""
,
200
);
}
else
{
}
else
{
...
@@ -38,7 +38,7 @@ public class UserLoginController {
...
@@ -38,7 +38,7 @@ public class UserLoginController {
if
(
token
!=
null
)
{
if
(
token
!=
null
)
{
return
Rjx
.
jsonOk
().
setData
(
token
);
return
Rjx
.
jsonOk
().
setData
(
token
);
}
else
{
}
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 {
...
@@ -30,7 +30,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
try
{
try
{
member
=
memberService
.
getMemberByEmail
(
email
);
member
=
memberService
.
getMemberByEmail
(
email
);
}
catch
(
Exception
e
)
{
}
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
();
Integer
state
=
member
.
getState
();
if
(
state
==
1
)
{
if
(
state
==
1
)
{
...
@@ -43,12 +43,12 @@ public class MemberTokenServiceImpl implements MemberTokenService {
...
@@ -43,12 +43,12 @@ public class MemberTokenServiceImpl implements MemberTokenService {
session
.
setAttribute
(
TOKEN_NAME
,
token
);
session
.
setAttribute
(
TOKEN_NAME
,
token
);
return
token
;
return
token
;
}
else
{
}
else
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_pwd_err"
));
throw
new
XException
(
messages
.
get
(
"err.user_pwd_err"
));
}
}
}
else
if
(
state
==
2
)
{
}
else
if
(
state
==
2
)
{
throw
new
XException
(
messages
.
get
(
"
sys.
err.user_disabled"
));
throw
new
XException
(
messages
.
get
(
"err.user_disabled"
));
}
else
{
}
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