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] 이벤트 API 기능 추가 #79

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

[Feat] 이벤트 API 기능 추가 #79

wants to merge 7 commits into from

Conversation

YoungjaeRo
Copy link
Member

@YoungjaeRo YoungjaeRo commented Feb 10, 2025

💡 작업 내용

  • EventStatistics 엔티티를 만들고 CommonEvent와 관계 매핑
  • 연관 관계 매핑 진행 후 bookmarkCount(visitCount) 기반으로 인기 이벤트 조회 기능 추가
  • EventStatistics 엔티티와 관련하여 CommonPlace를 기반으로 UserPlace가 생성되면 bookmarkCount가 증가하도록 구현
  • UserEvent에 대한 이벤트 수정 API 구현

💡 자세한 설명

(가능한 한 자세히 작성해 주시면 도움이 됩니다.)

📗 참고 자료 (선택)

📢 리뷰 요구 사항 (선택)

✅ 셀프 체크리스트

  • PR 제목을 형식에 맞게 작성했나요?
  • 브랜치 전략에 맞는 브랜치에 PR을 올리고 있나요?
  • Assignees, Reviewers, Labels 를 등록했나요?
  • 작업 도중 문서 수정이 필요한 경우 잘 수정했나요?
  • 불필요한 코드는 제거했나요?

@YoungjaeRo YoungjaeRo added the ✨ Feat 새 기능 추가 label Feb 10, 2025
@YoungjaeRo YoungjaeRo self-assigned this Feb 10, 2025
@YoungjaeRo YoungjaeRo changed the title Feature/75 [Feat] 이벤트 API 기능 추가 Feb 10, 2025
@supsup-hae supsup-hae self-requested a review February 10, 2025 08:40
@supsup-hae supsup-hae linked an issue Feb 10, 2025 that may be closed by this pull request
3 tasks
Copy link
Member

@supsup-hae supsup-hae left a comment

Choose a reason for hiding this comment

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

수고하셨습니다! 리뷰 확인바랍니다 :D

@PatchMapping(value = "/{id}", consumes = { MediaType.MULTIPART_FORM_DATA_VALUE })
public ResponseEntity<ApiResponse<EventResponseDto>> updateEvent(
@PathVariable Long id,
@RequestPart(value = "eventUpdateRequest") EventUpdateRequestDto request, // JSON을 받기 위해 @RequestPart로 변경
Copy link
Member

Choose a reason for hiding this comment

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

👏🏻

Copy link
Member

Choose a reason for hiding this comment

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

이벤트 삭제 API도 등록 해주실 수 있을까요?

/**
* EventStatistics의 bookmarkCount 증가
*/
eventStatisticsRepository.findByCommonEventId(commonPlace.getId())
Copy link
Member

Choose a reason for hiding this comment

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

👍

@@ -42,11 +46,21 @@ public EventResponseDto createUserEvent(EventRequestDto request, Long userId) {
return userEventConverter.toResponse(userEvent);
}

public EventResponseDto updateEvent(Long id, EventUpdateRequestDto request) {
public EventResponseDto updateEvent(Long id, EventUpdateRequestDto request, MultipartFile newImage) {
Copy link
Member

Choose a reason for hiding this comment

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

앗 회의 내용 기반으로 기능이 수정되어서 이제 이벤트에 여러개의 이미지가 등록될 수 있습니다! 아무래도 List<MultipartFile> newImageList 형식으로 수정이 필요할거 같아요. 그리고 매개 변수 변경에 따라 updateImage도 List를 이용해서 순차적으로 업데이트 되도록 변경해야할 거 같습니다! 기존의 uploadImage 로직을 참고해주세요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feat 새 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 이벤트 API 기능 추가
2 participants