261022_01_ENH: Class에서 record로 변경가능한 Dto들 record로 변경

This commit is contained in:
2026-10-22 10:14:05 +09:00
parent 70ddcdd9c3
commit 645cc71192
87 changed files with 798 additions and 858 deletions

View File

@@ -48,10 +48,10 @@ public class UserService {
userInfo.setUserId(userInfo.getUserId().toLowerCase());
List<DataVerificationDto> failList = validateUserDto(userInfo, roleList,
intranetUserList).stream().filter(dto -> !dto.isSuccess()).toList();
intranetUserList).stream().filter(dto -> !dto.success()).toList();
if (!failList.isEmpty()) {
DataVerificationDto firstFail = failList.get(0);
throw BusinessException.badRequest("WRONG_USER_DATA", firstFail.getErrMessage());
throw BusinessException.badRequest("WRONG_USER_DATA", firstFail.errMessage());
}
TUserEntity entity = TUserEntity.fromDto(userInfo, regUser, regDt);
@@ -90,8 +90,8 @@ public class UserService {
for (int i = 0; i < rows.size(); i++) {
UserUploadDto uploadDto = rows.get(i);
Integer roleCd = roleList.stream()
.filter(r -> java.util.Objects.equals(uploadDto.getUserRoleStr(), r.getRoleNm()))
.map(RoleInfoDto::getRoleCd)
.filter(r -> java.util.Objects.equals(uploadDto.getUserRoleStr(), r.roleNm()))
.map(RoleInfoDto::roleCd)
.findFirst()
.orElse(null);
@@ -359,7 +359,7 @@ public class UserService {
Integer userRole = dto.getUserRole();
if (roleList != null && !roleList.isEmpty()) {
boolean exists = roleList.stream()
.anyMatch(r -> userRole != null && userRole.equals(r.getRoleCd()));
.anyMatch(r -> userRole != null && userRole.equals(r.roleCd()));
if (!exists) {
result.add(new DataVerificationDto(
@@ -385,12 +385,12 @@ public class UserService {
intranetUserList);
validateUserList.forEach(validateResult -> {
if (!validateResult.isSuccess()) {
if (!validateResult.success()) {
errors.add(UserUploadErrorDto.of(
rowNumber,
dto.getUserId(),
validateResult.getFieldName(),
validateResult.getErrMessage()
validateResult.fieldName(),
validateResult.errMessage()
));
}
});