diff --git a/src/main/java/com/eactive/eai/rms/common/acl/user/UserManService.java b/src/main/java/com/eactive/eai/rms/common/acl/user/UserManService.java index dec6171..33ff53c 100644 --- a/src/main/java/com/eactive/eai/rms/common/acl/user/UserManService.java +++ b/src/main/java/com/eactive/eai/rms/common/acl/user/UserManService.java @@ -41,6 +41,8 @@ import lombok.RequiredArgsConstructor; @Transactional(transactionManager = "transactionManagerForEMS") @RequiredArgsConstructor public class UserManService extends BaseService { + + private final String DEFAULT_PASSWORD_SUBFIX = "@!"; private final UserInfoService userInfoService; private final UserRoleService userRoleService; @@ -100,7 +102,7 @@ public class UserManService extends BaseService { userInfo.setRoleidnfiname(CommonConstants.DEPT_DEVELOPER); try { - userInfo.setPassword(DamoManager.getInstance().hash(DamoManager.SHA256,userUI.getUserId())); + userInfo.setPassword(DamoManager.getInstance().hash(DamoManager.SHA256,userUI.getUserId()+DEFAULT_PASSWORD_SUBFIX)); } catch (Exception e) { throw new RuntimeException("Error encrypting password", e); } @@ -141,7 +143,7 @@ public class UserManService extends BaseService { public void updatePassword(UserUI userUI) throws Exception { UserInfo userInfo = userInfoService.getById(userUI.getUserId()); - userInfo.setPassword(DamoManager.getInstance().hash(DamoManager.SHA256, userUI.getUserId())); + userInfo.setPassword(DamoManager.getInstance().hash(DamoManager.SHA256, userUI.getUserId()+DEFAULT_PASSWORD_SUBFIX)); userUIMapper.updateToEntity(userUI, userInfo); userInfoService.save(userInfo); }