Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-control
Overview
Overview
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
常超
xzxt-control
Commits
62957687
Commit
62957687
authored
Sep 29, 2018
by
chent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录报错问题
parent
625a7a20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
src/main/java/com/cc/service/serviceimpl/UserServiceImpl.java
+11
-6
src/main/webapp/WEB-INF/view/login.jsp
+2
-2
No files found.
src/main/java/com/cc/service/serviceimpl/UserServiceImpl.java
View file @
62957687
...
@@ -35,13 +35,18 @@ public class UserServiceImpl implements UserService {
...
@@ -35,13 +35,18 @@ public class UserServiceImpl implements UserService {
public
XzxtRestResult
login
(
String
username
,
String
password
)
{
public
XzxtRestResult
login
(
String
username
,
String
password
)
{
//XzxtRestResult xzxtRestResult=new XzxtRestResult();
//XzxtRestResult xzxtRestResult=new XzxtRestResult();
User
user
=
userMapper
.
login
(
username
);
User
user
=
userMapper
.
login
(
username
);
if
(
user
.
getPassword
().
equals
(
password
)&&
user
.
getStatus
()
==
0
)
{
if
(
user
==
null
){
// 因为缓存切面的原因,在这里就抛出用户名不存在的异常
return
XzxtRestResult
.
build
(
202
,
"用户不存在"
);
return
XzxtRestResult
.
build
(
201
,
"登陆成功"
);
}
else
{
}
if
(
user
.
getPassword
().
equals
(
password
)&&
user
.
getStatus
()
==
0
)
{
else
{
// 因为缓存切面的原因,在这里就抛出用户名不存在的异常
return
XzxtRestResult
.
build
(
202
,
"登陆密码错误或者用户被锁定"
);
return
XzxtRestResult
.
build
(
201
,
"登陆成功"
);
}
else
{
return
XzxtRestResult
.
build
(
202
,
"登陆密码错误或者用户被锁定"
);
}
}
}
}
}
@Override
@Override
public
ResultMap
userAll
(
User
user
)
{
public
ResultMap
userAll
(
User
user
)
{
...
...
src/main/webapp/WEB-INF/view/login.jsp
View file @
62957687
...
@@ -32,11 +32,11 @@
...
@@ -32,11 +32,11 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label login-form"
><i
class=
"iconfont"
>

</i></label>
<label
class=
"layui-form-label login-form"
><i
class=
"iconfont"
>

</i></label>
<div
class=
"layui-input-inline login-inline"
>
<div
class=
"layui-input-inline login-inline"
>
<input
type=
"
text
"
name=
"password"
lay-verify=
"required"
placeholder=
"请输入你的密码"
autocomplete=
"off"
class=
"layui-input"
>
<input
type=
"
password
"
name=
"password"
lay-verify=
"required"
placeholder=
"请输入你的密码"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
<button
class=
"btn btn-warning pull-right"
lay-submit
lay-filter=
"login"
type=
"submit"
>
登录
</button>
<button
class=
"btn btn-warning pull-right"
lay-submit
lay-filter=
"login"
type=
"submit"
>
登录
</button>
<div
class=
"forgot"
><a
href=
"#"
class=
"forgot"
>
忘记帐号或者密码
</a></div>
<div
class=
"forgot"
><a
href=
"#"
class=
"forgot"
>
忘记帐号或者密码
</a></div>
</div>
</div>
</form>
</form>
...
...
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