提交 aa080536 编写于 作者: 爱吃血肠's avatar 爱吃血肠

用户在线修改密码

上级 b451444c
......@@ -241,7 +241,7 @@ public class UserServiceImpl implements UserService {
throw new RuntimeException("原密码错误");
}
String password = Md5Util.md5Password(newPwd);
if(1 != userDao.updatePasswordByName(email,newPwd)){
if(1 != userDao.updatePasswordByName(email,password)){
throw new RuntimeException("更新密码通过用户名称即email,更新影响行数不唯一");
}
}
......
......@@ -39,4 +39,7 @@ public class Md5Util {
}
}
public static void main(String[]args){
System.out.println(Md5Util.md5Password("123456"));
}
}
......@@ -180,9 +180,9 @@
where name = #{name}
</update>
<!--通过用户名称查询用户信息-->
<select id="queryUserByUserName" resultType="java.lang.Integer">
<select id="selectPasswordByName" resultType="java.lang.Integer">
select
<include refid="t_user_Column" />
COUNT(*)
from t_user
where
t_user.name = #{name}
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册