260617_03_ENH: assign 검증 수정

This commit is contained in:
2026-06-17 16:25:21 +09:00
parent db18a687e3
commit f428e1241b

View File

@@ -340,12 +340,6 @@ public class AssignService {
errors.add(ExcelErrorDto.of(rowNumber, "사용자 ID", "존재하지 않는 사용자 ID입니다.")); errors.add(ExcelErrorDto.of(rowNumber, "사용자 ID", "존재하지 않는 사용자 ID입니다."));
} }
if (StringUtil.hasText(userId)
&& performanceId != null
&& performanceAssignRepository.existsByAssignUserAndPerformanceIdNot(userId, performanceId)) {
errors.add(ExcelErrorDto.of(rowNumber, "사용자 ID", "이미 다른 사업에 배정된 사용자입니다."));
}
return errors; return errors;
} }
@@ -369,11 +363,6 @@ public class AssignService {
throw BusinessException.notFound("USER_NOT_FOUND", "존재하지 않는 사용자 ID입니다.") throw BusinessException.notFound("USER_NOT_FOUND", "존재하지 않는 사용자 ID입니다.")
.with("userId", userId); .with("userId", userId);
} }
if (performanceAssignRepository.existsByAssignUserAndPerformanceIdNot(userId, performanceId)) {
throw BusinessException.conflict("ASSIGN_ALREADY_EXISTS", "이미 다른 공연에 배정된 사용자입니다.")
.with("performanceId", performanceId)
.with("assignUser", userId);
}
} }
private boolean hasReview(TPerformanceAssignEntity assign) { private boolean hasReview(TPerformanceAssignEntity assign) {