Commit 0810ed5a by 东州 翁 Committed by chenzg

debug了登录修改密码接口

parent a7e0e9ff
......@@ -183,7 +183,7 @@ public class LoginController {
if (entRegisterDto.getPwUpdateType() != 2) {
// String codeRedis =redisTemplate.get(phone).toString();
String codeRedis = (String) session.getAttribute(phone);
String codeRedis = session.getAttribute(phone).toString();
if (code == null) {
return ResultUtil.error("请填写验证码");
}
......@@ -193,10 +193,8 @@ public class LoginController {
QyzxEmpLogin qyzxEmpLogin = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
if (qyzxEmpLogin != null) {
qyzxEmpLogin.setPhone(phone);
qyzxEmpLogin.setPw(Md5.md5(pw));
qyzxEmpLogin.updateById();
return ResultUtil.success("修改密码成功");
}else {
......@@ -206,15 +204,15 @@ public class LoginController {
if (code == null) {
return ResultUtil.error("请填写原密码");
}
if (pw.trim() == code.trim()) {
if (pw.trim().equals(code.trim())) {
return ResultUtil.error("新密码与原密码相同!请更改重试");
}
QyzxEmpLogin qyzxEmpLogin = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
if (qyzxEmpLogin != null) {
if (qyzxEmpLogin.getPw() == Md5.md5(pw)) {
if (qyzxEmpLogin.getPw().equals(Md5.md5(pw))) {
qyzxEmpLogin.setPhone(phone);
qyzxEmpLogin.setPw(Md5.md5(pw));
qyzxEmpLogin.setPw(Md5.md5(code));
qyzxEmpLogin.updateById();
return ResultUtil.success("修改密码成功");
}else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment