Skip to content

Conversation

@GitJIHO
Copy link
Contributor

@GitJIHO GitJIHO commented Aug 26, 2025

#️⃣ 연관된 이슈

📚 배경

협업방식, 아키텍쳐, 패턴 등 기초 세팅을 완료한 상태.
서비스의 핵심인 DDIP event에 대한 골격 및 도메인 기능, 로직들을 개발한다.

📝 작업 내용

아키텍처 및 설정

Auth 시스템 개선

  • @Login 어노테이션을 메서드 단위에서 파라미터 단위 확인으로 변경
  • Token exception 메시지를 보다 포괄적으로 수정
  • WebConfig에 인터셉터와 리졸버 오버라이딩 추가

도메인 모델링

Entity 정의

  • DdipEventEntity: 띱 이벤트 엔티티
  • InteractionEntity: 상호작용 엔티티
  • PhotoEntity: 사진 엔티티

Domain 객체 구현

  • DdipEvent: 띱 이벤트 도메인 및 기본 도메인 메서드
  • Photo: 사진 도메인 및 기본 도메인 메서드
  • Interaction: 상호작용 도메인

Enum 타입 정의

  • ActionType: 액션 타입
  • ActorRole: 액터 역할
  • DdipStatus: 띱 상태
  • PhotoStatus: 사진 상태
  • MessageCode: 메시지 코드

인프라스트럭처 레이어

매핑 및 변환

  • DdipMapper: Entity ↔ Domain 매핑 구현

리포지토리 구현

  • Repository 포트 인터페이스 정의
  • JPA 상속 인터페이스 정의
  • Repository 어댑터 구현체 구현

프레젠테이션 레이어

API 구현

  • Presentation단 API 인터페이스 정의
  • Controller 구현체 구현
  • DTO들 정의

테스트 코드

  • DDIP Service 단위테스트 추가
  • DDIP 도메인 단위테스트 추가
  • DDIP Repository 단위테스트 추가
  • Auth 리졸버 변경사항에 맞춘 테스트코드 수정

기타 개선사항

  • Exception 정의 및 global handler 추가
  • QueryDSL용 gradle 의존성 추가 (추후 사용 예정)
  • 배치 로딩 처리 주석 처리 (추후 사용 예정)
  • LocationAPI 누락 파라미터 추가
  • 테스트코드 활용을 위해 builder 접근제한자를 public으로 변경
  • deviceType 설명 변경

📸 스크린샷

image

💬 리뷰 요구사항

  • 엔티티, 도메인을 분리하고 DDD 관점에서 어느정도 접근하고자 시도하였는데, 추가하거나 수정할 부분이 있을 수 있습니다
  • 변경이 필요한 엔티티 필드들이나 dto들이 있다면 말씀해주세요

✏ Git Close

close #22

GitJIHO added 30 commits August 26, 2025 22:33
@GitJIHO GitJIHO requested review from Dockerel and parknew0 August 26, 2025 14:00
@GitJIHO GitJIHO self-assigned this Aug 26, 2025
@GitJIHO GitJIHO added the ✨ Feature 새로운 기능 추가 및 구현하는 경우 label Aug 26, 2025
@GitJIHO GitJIHO linked an issue Aug 26, 2025 that may be closed by this pull request
10 tasks
@GitJIHO GitJIHO added the ✅ Test Code 테스트 관련 작업을 진행하는 경우 label Aug 26, 2025
@github-actions
Copy link

github-actions bot commented Aug 26, 2025

📊 Code Coverage Report

Overall Project 73.14% -0.36% 🍏
Files changed 97.34% 🍏

File Coverage
WebConfig.java 100% 🍏
AuthUserArgumentResolver.java 100% 🍏
AuthInterceptor.java 100% 🍏
DdipService.java 100% 🍏
DdipMapper.java 100% 🍏
DdipEventRepositoryImpl.java 68.29% -31.71%

@github-actions
Copy link

github-actions bot commented Aug 26, 2025

Test Results

204 tests   204 ✅  6s ⏱️
 35 suites    0 💤
 35 files      0 ❌

Results for commit b1739dd.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Dockerel Dockerel left a comment

Choose a reason for hiding this comment

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

코드 잘 봤습니다.

계층간 역할에 따라 나누는 방식에 대해 많이 배웠습니다. 특히 엔티티를 인프라단에 두고 매퍼를 두어 변환해서 사용하는 부분이 인상적이네요.

고생하셨습니다.

Comment on lines +4 to +7
Double sw_lat,
Double sw_lon,
Double ne_lat,
Double ne_lon,
Copy link
Contributor

Choose a reason for hiding this comment

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

혹시 이 부분은 어떤 필드인가요? 저번에 의논했던 메인화면에서 좌하단 좌표와 우상단 좌표인가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 노션을 보니 좌표값을 예시로 저런식으로 받아 우선 해당 방식으로 구현해두었습니다


@Override
public List<DdipEvent> findWithinBounds(double swLat, double swLon, double neLat, double neLon, String sort, Double userLat, Double userLon) {
// TODO: 실제 S2를 이용한 로직 구현 필요. 현재는 전체 다 반환
Copy link
Contributor

Choose a reason for hiding this comment

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

안그래도 해당 부분에 대해 찾아봤는데, 아마 범위안에 요청을 다 찾아서 거리별로 계산 후 정렬해줘야 할 것 같습니다. 실제 실무에서는 이렇게 비효율적인 방식으로 하진 않을 것 같은데 잘 모르겠네요 허허

일단 머지되면 이후에 제가 이 부분은 이어서 구현해보겠습니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵! 이 부분은 같이 한번 고민해보면 좋을 것 같아서 우선 주석처리 해두었습니다 !

@GitJIHO GitJIHO merged commit 5c1c4fe into main Sep 4, 2025
2 checks passed
@GitJIHO GitJIHO deleted the Feat/issue-#22 branch September 4, 2025 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 새로운 기능 추가 및 구현하는 경우 ✅ Test Code 테스트 관련 작업을 진행하는 경우

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: DDIP event 엔티티 설계 및 도메인 기능 개발

3 participants