-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] 플로팅 버튼 정보 조회 api 추가 (#551) #552
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
OperationConfig
비회원인 경우는 무조건 isActive false, 활동/비활 기수의 경우 app-service의 floatingbutton 값에 따라 노출할 수 있도록 구현
|
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.
Pull Request Overview
This PR introduces a new API to retrieve information for the floating button feature, along with supporting domain changes for operation configuration.
- Added a new FloatingButtonResponse DTO and corresponding GET endpoint in HomeController
- Added an OperationConfig entity, repository, and service to provide configuration data for floating button
- Updated service and facade logic to determine the floating button’s active status based on user status, and adjusted filtering in app service entries
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| FloatingButtonResponse.java | New DTO created for floating button response data |
| HomeController.java | Added GET mapping and Swagger annotations for floating button info |
| OperationConfigRepository.java | Introduced repository method for fetching operation configs by category |
| AppServiceRepository.java | Updated query method for app service lookup |
| HomeFacade.java | Added method to assemble floating button info using operation configs and user status |
| WebSecurityConfig.java | Updated URL whitelist to include new floating button endpoint |
| OperationConfigType.java, OperationConfigCategory.java, OperationConfig.java | New domain classes and enums for operation configuration |
| OperationConfigService.java | Added service method to retrieve operation configuration for a specific category |
| AppServiceService.java | Updated filtering to exclude FLOATING_BUTTON and added retrieval method for app service info |
| AppServiceName.java | Added FLOATING_BUTTON constant to enum |
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.
운영용 설정 데이터를 확장성 있게 관리할 수 있도록 고민하신 게 보여 좋네요!
이후 추가할 데이터들 관리가 덕분에 용이해질 듯합니다~ 👏👏
Related issue 🛠
Work Description ✏️
1. 운영 관련 테이블 추가
OperationConfig를 추가했어요.operationConfigCategory와 해당 값의 타입을 명시할operationConfigType을 포함했어요.key와 사용처인operationConfigCategory와 같은 값은 DB에 존재할 수 없도록 제약 조건을 추가했어요.operationConfigCategory는FLOATING_BUTTONoperationConfigType은TEXTkey는titlevalue는플로팅 버튼 이름2. 플로팅 버튼 정보 조회 api
controller
AuthenticationPrincipal을 사용했어요.WebSecurityConfig에서는 비회원이어도 조회는 가능하도록 whiteList에 추가해두었어요.sopt-backend/src/main/java/org/sopt/app/presentation/home/HomeController.java
Lines 120 to 132 in f3c8a6c
facade
노출 여부는 다음과 같이 정리했어요.
isActive falseapp-service 테이블 FLOATING_BUTTON row의 active_user valueapp-service 테이블 FLOATING_BUTTON row의 inactive_user value노출 여부를 정했으면, 플로팅 버튼에 띄울 카테고리를 쿼리에 넣어 OperationConfig 테이블을 조회하여, Map 형태로 구성했어요.
빌드된 Map을 각 Dto에 주입하여 리턴하도록 했어요.
sopt-backend/src/main/java/org/sopt/app/facade/HomeFacade.java
Lines 113 to 142 in f3c8a6c
service
app-service의 플로팅 버튼만을 조회해오는 서비스 로직을 추가했어요.
직접적으로 badgeManager가 필요하진 않지만, app-service 테이블을 위의 api에서 활용하기 위해
FLOATING_BUTTON을 추가했어요.sopt-backend/src/main/java/org/sopt/app/application/app_service/AppServiceService.java
Lines 27 to 29 in f3c8a6c
sopt-backend/src/main/java/org/sopt/app/application/app_service/AppServiceName.java
Line 13 in f3c8a6c
OperationConfig를 조회하는 서비스 로직을 추가했어요. 조회하고 싶은OperationConfigCategory를 파라미터로 받아 플로팅 버튼에 해당하는 정보들을 가져오는 로직이예요.sopt-backend/src/main/java/org/sopt/app/application/app_service/OperationConfigService.java
Lines 15 to 23 in f3c8a6c
response dto
sopt-backend/src/main/java/org/sopt/app/presentation/home/response/FloatingButtonResponse.java
Lines 8 to 15 in f3c8a6c
additional
앱 서비스 진입 여부 조회 api에서 플로팅 버튼에 관련한 내용은 제외되도록 필터 메서드에 조건을 추가했어요.
sopt-backend/src/main/java/org/sopt/app/application/app_service/AppServiceService.java
Lines 19 to 21 in f3c8a6c
홈 화면의 서비스들 (솝탬프, 콕찌르기, 솝마디)이 dev, prod가 순서가 동일하지 않은 이슈가 있었는데, 이는 createdAt reversed로 정렬하고 있었어요. 이는 간단하게 createdAt을 수정해서 순서를 똑바로 맞춰줬어요.
FAB 딥링크는 임시로
home/soptamp로 지정했어요.Trouble Shooting ⚽️
Related ScreenShot 📷
Uncompleted Tasks 😅
To Reviewers 📢