提交 4786247c 编写于 作者:  Peijun.zhao's avatar Peijun.zhao

修改密码时 老密码null时报错

上级 e90274be
流水线 #32735 已失败 于阶段
in 0 second
......@@ -17,6 +17,7 @@ import com.pica.cloud.account.account.server.util.TokenUtils;
import com.pica.cloud.foundation.encryption.common.constants.EncryptConstants;
import com.pica.cloud.foundation.encryption.util.EncryptUtils;
import com.pica.cloud.foundation.redis.ICacheClient;
import com.pica.cloud.foundation.utils.utils.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -57,6 +58,12 @@ public class PasswordServiceImpl implements PasswordService {
public void modifyPassword(String mobile, String oldPwd, String pwd) {
AccountInfoEntity entity = accountInfoDetailMapper.selectByMobile(mobile);
if (entity != null) {
if(StringUtil.isEmpty(entity.getPassword())){
entity.setPassword("");
}
if(StringUtil.isEmpty(oldPwd)){
oldPwd = "";
}
if (entity.getPassword().equals(oldPwd)) {
Date currentTime = new Date();
AccountInfoEntity accountInfoEntity = new AccountInfoEntity();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册