Skip to content

Commit

Permalink
保存帐号时如果没有密码就不处理密码
Browse files Browse the repository at this point in the history
  • Loading branch information
KeRan213539 committed Sep 25, 2020
1 parent d9977d1 commit 9af0368
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ public CompletableFuture<JsonResult> addSaveUser(AlitaUserAccount user) {
return ServiceUtil.buildFuture(JsonResult.badParameter("保存用户只支持新增,不支持修改!"));
}
user.initNewAccount();
user.setUserPwd(pwdEncoder.encode(user.getUserPwd()));
if(StringUtils.isNotBlank(user.getUserPwd())) {
user.setUserPwd(pwdEncoder.encode(user.getUserPwd()));
}
userService.save(user);
return ServiceUtil.buildFuture(JsonResult.successfu());
}
Expand Down

0 comments on commit 9af0368

Please sign in to comment.