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

feature : 이벤트에 속한 옵션그룹 조회 (어드민용) #252

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

kim-wonjin
Copy link
Member

개요

작업사항

  • 해당 이벤트에 속하는 옵션그룹을 조회하는 어드민용 API 입니다.
"optionGroups": [
      {
        "optionGroupId": 1,
        "type": "Y/N",
        "name": "뒷풀이 참여 여부",
        "description": "공연이 끝난 후 오케이포차에서 진행하는 뒷풀이에 참여할 것인가요?",
        "options": [
          {
            "optionId": 1,
            "answer": "YES",
            "additionalPrice": "10000원"
          },
          {
            "optionId": 2,
            "answer": "NO",
            "additionalPrice": "0원"
          }
        ]
      },
      {
        "optionGroupId": 2,
        "type": "Y/N",
        "name": "뒷풀이 참여 여부2",
        "description": "공연이 끝난 후 오케이포차에서 진행하는 뒷풀이에 참여할 것인가요?",
        "options": [
          {
            "optionId": 3,
            "answer": "YES",
            "additionalPrice": "10000원"
          },
          {
            "optionId": 4,
            "answer": "NO",
            "additionalPrice": "0원"
          }
        ]
      },
      {
        "optionGroupId": 3,
        "type": "주관식",
        "name": "추천인이 누구인가요?",
        "description": "추천인 이름을 한명만 적어주세요",
        "options": [
          {
            "optionId": 5,
            "answer": "",
            "additionalPrice": "0원"
          }
        ]
      },
      {
        "optionGroupId": 4,
        "type": "Y/N",
        "name": "공연자인가요?",
        "description": "해당 공연의 공연자인지 체크해주세요",
        "options": [
          {
            "optionId": 6,
            "answer": "예",
            "additionalPrice": "0원"
          },
          {
            "optionId": 7,
            "answer": "아니요",
            "additionalPrice": "0원"
          }
        ]
      }
    ]

변경로직

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 265 Code Smells

16.3% 16.3% Coverage
0.0% 0.0% Duplication

@kim-wonjin kim-wonjin added For: API [이슈 대상] 외부 API Type: Feature [이슈 목적] 새로운 기능 추가 labels Jan 31, 2023
Copy link
Member

@cofls6581 cofls6581 left a comment

Choose a reason for hiding this comment

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

LGTM!고생하셨습니다

@@ -20,6 +21,11 @@ public OptionGroup queryOptionGroup(Long optionGroupId) {
.orElseThrow(() -> OptionGroupNotFoundException.EXCEPTION);
}

public List<OptionGroup> findAllByEventId(Long eventId) {
return optionGroupRepository.findAllByEvent_IdAndOptionGroupStatus(
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 Author

Choose a reason for hiding this comment

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

ticketItemRepository에 노경민씨가 만들어놓은거 보구 맞춘건데 같이뺄까여? @gengminy

Copy link
Member

Choose a reason for hiding this comment

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

매핑된 여러 Entity들을 통해서 조회하는 쿼리같은 경우 QueryDsl 써서 해결하는게 더 직관적이고 좋을 것 같다는 생각이 듭니당

Copy link
Member

@sanbonai06 sanbonai06 left a comment

Choose a reason for hiding this comment

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

LGTM ⭐

Copy link
Member

@ImNM ImNM left a comment

Choose a reason for hiding this comment

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

LGTM
그 상품에 관련한 옵션 조회는 이미 나온건감?

@kim-wonjin
Copy link
Member Author

넹!

@kim-wonjin kim-wonjin merged commit c396018 into dev Feb 1, 2023
@kim-wonjin kim-wonjin deleted the feature/241-get-event-options branch February 1, 2023 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For: API [이슈 대상] 외부 API Type: Feature [이슈 목적] 새로운 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 [feature] 이벤트 옵션 조회 (어드민용)
4 participants