Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
mazhicheng 2020-02-22 16:00:01 +08:00
commit 92553a56d2
2 changed files with 6 additions and 2 deletions

View File

@ -28,7 +28,9 @@ public class IamAccountServiceImpl extends BaseIamServiceImpl<IamAccountMapper,
@Override
public boolean createEntity(IamAccount iamAccount) {
// 生成加密盐并加密
IamSecurityUtils.encryptPwd(iamAccount);
if (V.notEmpty(iamAccount.getAuthSecret())){
IamSecurityUtils.encryptPwd(iamAccount);
}
// 保存
try{
return super.createEntity(iamAccount);

View File

@ -108,7 +108,9 @@ public class IamUserServiceImpl extends BaseIamServiceImpl<IamUserMapper, IamUse
.setAuthType(Cons.DICTCODE_AUTH_TYPE.PWD.name())
.setStatus(userAccountDTO.getStatus());
// 设置密码
IamSecurityUtils.encryptPwd(iamAccount);
if (V.notEmpty(iamAccount.getAuthSecret())){
IamSecurityUtils.encryptPwd(iamAccount);
}
boolean accountSuccess = iamAccountService.createEntity(iamAccount);
// 批量创建角色关联关系