Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
beauty_ssm
提交
aa080536
B
beauty_ssm
项目概览
爱吃血肠
/
beauty_ssm
通知
9
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
beauty_ssm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
aa080536
编写于
5月 08, 2018
作者:
爱吃血肠
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户在线修改密码
上级
b451444c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
6 deletion
+9
-6
src/main/java/com/yingjun/ssm/service/impl/UserServiceImpl.java
...in/java/com/yingjun/ssm/service/impl/UserServiceImpl.java
+1
-1
src/main/java/com/yingjun/ssm/util/Md5Util.java
src/main/java/com/yingjun/ssm/util/Md5Util.java
+3
-0
src/main/resources/mapper/UserMapper.xml
src/main/resources/mapper/UserMapper.xml
+2
-2
src/main/webapp/WEB-INF/jsp/user/changePwd.jsp
src/main/webapp/WEB-INF/jsp/user/changePwd.jsp
+3
-3
未找到文件。
src/main/java/com/yingjun/ssm/service/impl/UserServiceImpl.java
浏览文件 @
aa080536
...
...
@@ -241,7 +241,7 @@ public class UserServiceImpl implements UserService {
throw
new
RuntimeException
(
"原密码错误"
);
}
String
password
=
Md5Util
.
md5Password
(
newPwd
);
if
(
1
!=
userDao
.
updatePasswordByName
(
email
,
newPw
d
)){
if
(
1
!=
userDao
.
updatePasswordByName
(
email
,
passwor
d
)){
throw
new
RuntimeException
(
"更新密码通过用户名称即email,更新影响行数不唯一"
);
}
}
...
...
src/main/java/com/yingjun/ssm/util/Md5Util.java
浏览文件 @
aa080536
...
...
@@ -39,4 +39,7 @@ public class Md5Util {
}
}
public
static
void
main
(
String
[]
args
){
System
.
out
.
println
(
Md5Util
.
md5Password
(
"123456"
));
}
}
src/main/resources/mapper/UserMapper.xml
浏览文件 @
aa080536
...
...
@@ -180,9 +180,9 @@
where name = #{name}
</update>
<!--通过用户名称查询用户信息-->
<select
id=
"
queryUserByUser
Name"
resultType=
"java.lang.Integer"
>
<select
id=
"
selectPasswordBy
Name"
resultType=
"java.lang.Integer"
>
select
<include
refid=
"t_user_Column"
/>
COUNT(*)
from t_user
where
t_user.name = #{name}
...
...
src/main/webapp/WEB-INF/jsp/user/changePwd.jsp
浏览文件 @
aa080536
...
...
@@ -54,15 +54,15 @@
</li>
<li
class=
"margin-b-19"
>
<label
class=
"infoName1 inputDes"
for=
"oldPwd"
>
原登录密码:
</label>
<input
class=
"info write-n"
type=
"
text
"
name=
"oldPwd"
id=
"oldPwd"
value=
""
placeholder=
""
/>
<input
class=
"info write-n"
type=
"
password
"
name=
"oldPwd"
id=
"oldPwd"
value=
""
placeholder=
""
/>
</li>
<li
class=
"margin-b-19"
>
<label
class=
"infoName1 inputDes"
for=
"newPwd"
>
新登录密码:
</label>
<input
class=
"info write-n"
type=
"
text
"
name=
"newPwd"
id=
"newPwd"
value=
""
placeholder=
""
/>
<input
class=
"info write-n"
type=
"
password
"
name=
"newPwd"
id=
"newPwd"
value=
""
placeholder=
""
/>
</li>
<li
class=
"margin-b-19"
>
<label
class=
"infoName1 inputDes"
for=
"pwdA"
>
再次输入新密码:
</label>
<input
class=
"info write-n"
type=
"
text
"
name=
"pwdA"
id=
"pwdA"
value=
""
placeholder=
""
/>
<input
class=
"info write-n"
type=
"
password
"
name=
"pwdA"
id=
"pwdA"
value=
""
placeholder=
""
/>
</li>
</ul>
<div
class=
"btn-bounce"
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录