Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
b06baf81
提交
b06baf81
编写于
9月 11, 2019
作者:
rushui.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20190911 修改密码的处理方式
上级
052fc02f
流水线
#14353
已失败 于阶段
in 0 second
变更
4
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
7 行增加
和
9 行删除
+7
-9
LoginController.java
...ud/account/account/server/controller/LoginController.java
+0
-1
LoginServiceImpl.java
...account/account/server/service/impl/LoginServiceImpl.java
+1
-1
PasswordServiceImpl.java
...ount/account/server/service/impl/PasswordServiceImpl.java
+5
-6
RegisterServiceImpl.java
...ount/account/server/service/impl/RegisterServiceImpl.java
+1
-1
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/LoginController.java
浏览文件 @
b06baf81
...
...
@@ -13,7 +13,6 @@ import com.pica.cloud.account.account.server.service.LoginService;
import
com.pica.cloud.account.account.server.service.TokenService
;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
import
com.pica.cloud.account.account.server.util.CryptoUtil
;
import
com.pica.cloud.foundation.entity.PicaException
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
com.pica.cloud.foundation.redis.ICacheClient
;
import
io.swagger.annotations.Api
;
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/LoginServiceImpl.java
浏览文件 @
b06baf81
...
...
@@ -79,7 +79,7 @@ public class LoginServiceImpl implements LoginService {
if
(
accountInfoEntity
!=
null
)
{
String
oldPwd
=
accountInfoEntity
.
getPassword
();
String
password
=
request
.
getPassword
();
if
(
password
.
equals
(
EncryptCreateUtil
.
dencrypt
(
oldPwd
)
))
{
if
(
password
.
equals
(
oldPwd
))
{
//登陆成功,返回新的token
//通过账户id查询用户id
Date
currentTime
=
new
Date
();
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/PasswordServiceImpl.java
浏览文件 @
b06baf81
...
...
@@ -28,16 +28,16 @@ public class PasswordServiceImpl implements PasswordService {
@Override
public
void
modifyPassword
(
Integer
acctId
,
String
oldPwd
,
String
pwd
)
{
AccountInfoEntity
entity
=
accountInfoDetailMapper
.
selectByPrimaryKey
(
acctId
);
if
(
entity
.
getPassword
().
equals
(
EncryptCreateUtil
.
encrypt
(
oldPwd
)
))
{
if
(
entity
.
getPassword
().
equals
(
oldPwd
))
{
AccountInfoEntity
accountInfoEntity
=
new
AccountInfoEntity
();
accountInfoEntity
.
setId
(
acctId
);
accountInfoEntity
.
setModifiedId
(
acctId
);
accountInfoEntity
.
setModifiedTime
(
new
Date
());
accountInfoEntity
.
setPassword
(
EncryptCreateUtil
.
encrypt
(
pwd
)
);
accountInfoEntity
.
setPassword
(
pwd
);
accountInfoDetailMapper
.
updatePasswordByPrimaryKey
(
accountInfoEntity
);
//密码修改日志
LogPWDModifyEntity
logPWDModifyEntity
=
AccountLogEntityUtils
.
getLogPWDModifyEntity
(
acctId
,
entity
.
getMobilePhone
(),
EncryptCreateUtil
.
encrypt
(
oldPwd
),
EncryptCreateUtil
.
encrypt
(
pwd
)
,
AccountTypeEnum
.
LOG_TYPE_PASSWORD
.
getCode
());
oldPwd
,
pwd
,
AccountTypeEnum
.
LOG_TYPE_PASSWORD
.
getCode
());
picaLogUtils
.
info
(
logPWDModifyEntity
);
}
else
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_PASSWORD_ERROR
);
...
...
@@ -53,12 +53,11 @@ public class PasswordServiceImpl implements PasswordService {
accountInfoEntity
.
setId
(
accId
);
accountInfoEntity
.
setModifiedId
(
accId
);
accountInfoEntity
.
setModifiedTime
(
new
Date
());
accountInfoEntity
.
setPassword
(
EncryptCreateUtil
.
encrypt
(
request
.
getPassword
()
));
accountInfoEntity
.
setPassword
(
request
.
getPassword
(
));
accountInfoDetailMapper
.
updatePasswordByPrimaryKey
(
accountInfoEntity
);
//密码修改日志
LogPWDModifyEntity
logPWDModifyEntity
=
AccountLogEntityUtils
.
getLogPWDModifyEntity
(
accId
,
entity
.
getMobilePhone
(),
""
,
EncryptCreateUtil
.
encrypt
(
request
.
getPassword
()
),
AccountTypeEnum
.
LOG_TYPE_PASSWORD
.
getCode
());
""
,
request
.
getPassword
(
),
AccountTypeEnum
.
LOG_TYPE_PASSWORD
.
getCode
());
picaLogUtils
.
info
(
logPWDModifyEntity
);
}
else
{
//未注册,请先注册
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/RegisterServiceImpl.java
浏览文件 @
b06baf81
...
...
@@ -65,7 +65,7 @@ public class RegisterServiceImpl implements RegisterService {
AccountInfoEntity
accountInfo
=
new
AccountInfoEntity
();
accountInfo
.
setMobilePhone
(
EncryptCreateUtil
.
encrypt
(
baseRequest
.
getMobile
()));
if
(
StringUtils
.
isNotEmpty
(
baseRequest
.
getPassword
()))
{
accountInfo
.
setPassword
(
EncryptCreateUtil
.
encrypt
(
baseRequest
.
getPassword
()
));
accountInfo
.
setPassword
(
baseRequest
.
getPassword
(
));
}
else
{
accountInfo
.
setPassword
(
""
);
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录