Skip to content
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

[Feat/#81] 전체 수신거부 API 1차 구현 #88

Merged
merged 10 commits into from
Jun 23, 2024
Merged

[Feat/#81] 전체 수신거부 API 1차 구현 #88

merged 10 commits into from
Jun 23, 2024

Conversation

hun-ca
Copy link
Member

@hun-ca hun-ca commented Jun 23, 2024

🎫 연관 이슈

resolved #81

💁‍♂️ PR 내용

🙏 작업

🙈 PR 참고 사항

📸 스크린샷

🤖 테스트 체크리스트

  • 체크 미완료
  • 체크 완료

@hun-ca hun-ca added feature 새로운 기능을 만들 때 사용됩니다 test 테스트 관련 내용을 다룰 때 사용합니다 labels Jun 23, 2024
@hun-ca hun-ca self-assigned this Jun 23, 2024
@hun-ca hun-ca requested a review from belljun3395 as a code owner June 23, 2024 08:02
Copy link
Collaborator

@belljun3395 belljun3395 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가로 WorkbookSubscriptionControllerTest에 테스트 메서드를 WorkbookSubscriptionController와 통일하는건 어떨까요?

Comment on lines 17 to 20
@RequestMapping("/api/v1/workbooks")
@RequestMapping("/api/v1/")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkbookSubscriptionController인데 /workbooks를 제거한 이유가 있나요?
추가로 /를 남겨둔 이유가 잇나요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 컨트롤러의 API가 다 workbooks로 시작하진 않아서 일단 뺐습니다

import org.springframework.http.HttpStatus
import org.springframework.validation.annotation.Validated
import org.springframework.web.bind.annotation.*

@Validated
@RestController
@RequestMapping("/api/v1/workbooks")
@RequestMapping("/api/v1/")
class WorkbookSubscriptionController(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkBookSubscriptionController이 아니라 그냥 SubscriptionController로 하는건 어떤가요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러네

@Service
class MemberService {

fun getMemberId(dto: GetMemberIdDto): Long {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 단수 조회는 read, 복수 조회는 browse를 사용하는데 어떠신가요?
get도 충분히 이해할 수 있어서 통일할 필요는 없지만 코멘트 남깁니다

fun updateDeletedAtInAllSubscription(command: UpdateDeletedAtInAllSubscriptionCommand) {
dslContext.update(SUBSCRIPTION)
.set(SUBSCRIPTION.DELETED_AT, LocalDateTime.now())
.set(SUBSCRIPTION.UNSUBS_OPINION, command.opinion) // TODO: opinion row 마다 중복 해결
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opinion row 마다 중복 해결

이게 어떤 문제인가요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체 구독 내역에 업데이트(여러개 row에 업데이트)하기 때문에 요청으로 들어온 입력(구독취소 사유)이 해당 로우들에 동일하게 업뎃됨

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이건 뭐.. 어쩔 수 없지 않을까요..?
대신 dslContext.batchUpdate()로 배치 업데이트만..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일단 MVP떈 두고 추후 고려해보도록..

@hun-ca hun-ca requested a review from belljun3395 June 23, 2024 12:17
class MemberService {

fun readMemberId(dto: readMemberIdDto): Long {
return 1L // TODO: implemenets
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기는 나중에 구현하는건가요?

) {

@PostMapping("{workbookId}/subs")
@PostMapping("workbooks/{workbookId}/subs")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20번째 라인의 매핑은 /로 끝나는데 해당 매핑은 /로 안끝나니까 햇갈릴 수 있을꺼 같은데 통일하는게 어떤가요?

@hun-ca hun-ca merged commit 2baaf32 into main Jun 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 새로운 기능을 만들 때 사용됩니다 test 테스트 관련 내용을 다룰 때 사용합니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

수신거부 API추가(전체구독취소)
2 participants