Commit 5a416e44 by 吴迪

修改成手机查询个人信息

parent 4cbb8355
package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.office.common.exception.RRException;
import io.office.common.utils.IPUtils;
import io.office.modules.manage.dao.*;
......@@ -25,10 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.service.MemberService;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@Service("memberService")
......@@ -162,14 +161,20 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
if (!newPass.equals(affirmPass)) {
throw new RRException("两次密码信息不一致,请重新输入");
}
MemberEntity memberEntity = memberDao.selectById(id);
String passData = memberEntity.getPass();
String passMD5 = MD5Util.md5Encrypt32Lower(oldPass);
if (!passMD5.equals(passData)) {
throw new RRException("旧密码输入错误");
//根据手机号修改
UpdateWrapper<MemberEntity> memberEntityUpdateWrapper = new UpdateWrapper<MemberEntity>();
memberEntityUpdateWrapper.eq("phone",id);
MemberEntity memberEntity = memberDao.selectOne(memberEntityUpdateWrapper);
if(memberEntity!=null) {
String passData = memberEntity.getPass();
String passMD5 = MD5Util.md5Encrypt32Lower(oldPass);
if (!passMD5.equals(passData)) {
throw new RRException("旧密码输入错误");
}
//修改密码
memberDao.updateByIdPassWord(Long.valueOf(id), MD5Util.md5Encrypt32Lower(newPass));
}
//修改密码
memberDao.updateByIdPassWord(Long.valueOf(id), MD5Util.md5Encrypt32Lower(newPass));
}
@Override
......
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