-
Notifications
You must be signed in to change notification settings - Fork 1
MOSU-32 feature: 학생 정보 목록 조회 #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
polyglot-k
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 별다르게 리뷰할게 없습니다! 견고하고 좋은 코드 같습니다 :) ✅
| for (FileRequest req : requests) { | ||
| fileUploadHelper.updateTag(req.s3Key()); | ||
| faqAttachmentRepository.save(req.toAttachmentEntity( | ||
| req.fileName(), req.s3Key(), faqId | ||
| )); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for..in이랑 .forEach() 랑 어떨 때 쓰시나요??
| private Predicate buildNameCondition(QProfileJpaEntity profile, String name) { | ||
| if (name != null && !name.isBlank()) { | ||
| return profile.userName.contains(name); | ||
| } | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
보통 선행 if에서 null을 return 하도록하는게 관례상 에러 기저를 먼저 잡는 느낌이라서 깔끔한거 같아요!
| private Predicate buildPhoneCondition(QProfileJpaEntity profile, String phone) { | ||
| if (phone != null && !phone.isBlank()) { | ||
| return profile.phoneNumber.contains(phone); | ||
| } | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도용
| @RequestParam(required = false) String name, | ||
| @RequestParam(required = false) String phone, | ||
| @RequestParam(defaultValue = "desc") String order, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public record StudentFilter(
String name,
String phone,
String order
) {
public StudentFilter {
if (order == null || order.isBlank()) {
order = "desc";
}
}
}getStudents( @ModelAttribute StudentFilter filter )이런식으로 필드를 합치는건 어떤가요?
✨ 구현한 기능
📢 논의하고 싶은 내용
🎸 기타