-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FIX] 키워드 조회 API 로직 수정 #103
Conversation
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.
수고하셨습니다!!!
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 void deleteTask(Long taskId) { | ||
Task findTask = taskRepository.findByIdOrThrow(taskId); | ||
|
||
findTask.deleted(); | ||
findTask.getSubTasks().forEach(this::deleteSubTaskAndCard); | ||
} |
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.
p3;
@Transactional
이 빠져있는 것 같습니다!
taskRepository.save(Task.builder() | ||
.name(requestDto.getName()) | ||
.category(findCategory) | ||
.isDeleted(false) |
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.
p4;
false
는 Service에서 값으로 넣는 것 보다 entity 생성자에 들어가는 것이 조금 더 좋을 것 같네요!
private final SubTaskRepository subTaskRepository; | ||
|
||
@Override | ||
@Transactional |
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.
p2;
readOnly = true
option을 넣어주세요!
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.
확인입니다 !
@Column(name = "is_deleted", nullable = false) | ||
private boolean isDeleted; | ||
private Boolean isDeleted; |
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.
p4;
Wrapper class로 바꾼 이유가 궁금합니다! 기본적으로 Entity boolean
값은 원시 타입으로 해두는 것이 좋다고 생각하는데 이유가 있을까요?
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.
어라,,,? 뭐지 바꾼 기억이 없는데,,,ㅎ 다시 바꿔 놓겠습니다 !
List<SubTask> findByTaskId(Long taskId); | ||
|
||
default SubTask findByIdOrThrow(Long subTaskId) { | ||
return findById(subTaskId).orElseThrow( | ||
() -> new NotFoundException(ErrorCode.NOT_FOUND_SUB_TASK)); |
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.
p4;
repository마다 목록 조회 method 이름이 findAll
과 find
로 다른데 통일해도 좋을 것 같습니다!
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.
확인용 ~!
} | ||
|
||
@Override | ||
@Transactional |
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.
p2;
readOnly = true
를 넣어주세요!
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.
넵 ! 반영해서 올려놓겠습니다 !
private final CategoryRepository categoryRepository; | ||
|
||
@Override | ||
@Transactional |
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.
p2;
readOnly = true
를 넣어주세요!
//* 업무 전체 목록 조회 | ||
List<TaskGetResponseDto> getAllTask(Long memberId); | ||
|
||
//* 특정 카테고리 내 업무 목록 조회 | ||
List<TaskGetResponseDto> getByCategoryId(Long categoryId); | ||
|
||
//* 업무 수정 | ||
void updateTaskName(Long taskId, TaskUpdateRequestDto taskUpdateRequestDto); | ||
|
||
void createTaskName(TaskCreateRequestDto taskCreateRequestDto); | ||
void deleteTask(Long taskId); |
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.
p4;
주석은 삭제하거나 통일하는 것이 좋을 것 같습니다!
@JoinColumn(name = "folder_id") | ||
private Folder folder; | ||
|
||
@Column(nullable = false) |
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.
p3;
원시타입이므로 nullable=false
가 없어도 괜찮을 것 같아요!
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.
고생하셨습니다~!
📝 Summary
👩💻 Contents
📝 Review Note
📣 Related Issue
📬 Reference