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
提交
7ccbce20
提交
7ccbce20
编写于
3月 04, 2022
作者:
minghao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 设置用户密码
上级
2818113b
流水线
#42951
已取消 于阶段
变更
4
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
5 行增加
和
5 行删除
+5
-5
PasswordController.java
...account/account/server/controller/PasswordController.java
+1
-1
PasswordService.java
...cloud/account/account/server/service/PasswordService.java
+1
-1
HospitalSaasUserServiceImpl.java
...ount/server/service/impl/HospitalSaasUserServiceImpl.java
+1
-1
PasswordServiceImpl.java
...ount/account/server/service/impl/PasswordServiceImpl.java
+2
-2
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/PasswordController.java
浏览文件 @
7ccbce20
...
...
@@ -61,7 +61,7 @@ public class PasswordController extends AccountBaseController {
String
password
=
request
.
getPassword
();
if
(!
StringUtils
.
isEmpty
(
password
)
&&
!
StringUtils
.
isEmpty
(
oldPwd
))
{
if
(!
password
.
equals
(
oldPwd
))
{
passwordService
.
modifyPassword
(
mobile
,
oldPwd
,
password
);
passwordService
.
modifyPassword
(
mobile
,
oldPwd
,
password
,
false
);
return
PicaResponse
.
toResponse
();
}
else
{
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_PASSWORD_EQUAL
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/PasswordService.java
浏览文件 @
7ccbce20
...
...
@@ -13,7 +13,7 @@ public interface PasswordService {
* @param oldPwd 旧密码
* @param pwd 新密码
*/
void
modifyPassword
(
String
mobile
,
String
oldPwd
,
String
pwd
);
void
modifyPassword
(
String
mobile
,
String
oldPwd
,
String
pwd
,
Boolean
isForced
);
/**
* 忘记密码
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/HospitalSaasUserServiceImpl.java
浏览文件 @
7ccbce20
...
...
@@ -223,7 +223,7 @@ public class HospitalSaasUserServiceImpl implements HospitalSaasUserService {
/** 修改密码 */
if
(
StringUtils
.
isNotEmpty
(
req
.
getPassword
())
&&
StringUtils
.
isEmpty
(
accountExist
.
getPassword
()))
{
passwordService
.
modifyPassword
(
mobileEncrypt
,
accountExist
.
getPassword
(),
req
.
getPassword
());
passwordService
.
modifyPassword
(
mobileEncrypt
,
accountExist
.
getPassword
(),
req
.
getPassword
()
,
true
);
}
Map
map
=
new
HashMap
(
3
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/PasswordServiceImpl.java
浏览文件 @
7ccbce20
...
...
@@ -59,11 +59,11 @@ public class PasswordServiceImpl implements PasswordService {
@Override
@Transactional
public
void
modifyPassword
(
String
mobile
,
String
oldPwd
,
String
pwd
)
{
public
void
modifyPassword
(
String
mobile
,
String
oldPwd
,
String
pwd
,
Boolean
isForced
)
{
AccountInfoEntity
entity
=
accountInfoDetailMapper
.
selectByMobile
(
mobile
);
if
(
entity
!=
null
)
{
//added by joy begin 晓庆说 这批空密码用户不应该在设置密码处 修改密码,提示:引导客户去密码登录;
if
(
StringUtil
.
isEmpty
(
entity
.
getPassword
())){
if
(
!
isForced
&&
StringUtil
.
isEmpty
(
entity
.
getPassword
())){
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_PASSWORD_RESET
);
}
//added by joy end
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录