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 : 티켓상품 옵션 조회 #234

Merged
merged 3 commits into from
Jan 30, 2023

Conversation

kim-wonjin
Copy link
Member

@kim-wonjin kim-wonjin commented Jan 29, 2023

개요

작업사항

  • 해당 티켓 상품의 옵션을 전체 조회합니다.
  • eventId 검증
  • 장바구니 생성시 요청값과 ៖답값 맞췄습니당
{
  "success": true,
  "status": 200,
  "data": {
    "optionGroups": [
      {
        "optionGroupId": 1,
        "type": "Y/N",
        "name": "뒷풀이 참여 여부",
        "description": "공연이 끝난 후 오케이포차에서 진행하는 뒷풀이에 참여할 것인가요?",
        "options": [
          {
            "optionId": 1,
            "answer": "예",
            "additionalPrice": "10000원"
          },
          {
            "optionId": 2,
            "answer": "아니요",
            "additionalPrice": "0원"
          }
        ]
      },
      {
        "optionGroupId": 3,
        "type": "주관식",
        "name": "추천인이 누구인가요?",
        "description": "추천인 이름을 한명만 적어주세요",
        "options": [
          {
            "optionId": 5,
            "answer": "",
            "additionalPrice": "0원"
          }
        ]
      }
    ]
  },
  "timeStamp": "2023-01-30T04:02:59.221643"
}

변경로직

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.

굿굿

Comment on lines 16 to 17
@RedissonLock(LockName = "티켓상품", identifier = "ticketItemId")
public GetTicketItemOptionResponse execute(Long eventId, Long ticketItemId) {
Copy link
Member

Choose a reason for hiding this comment

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

조회 용은 락 걸 필요 없을것 같아요
어차피 프론트 넘어가서 새로고침 안하면 똑같으니깐?

Comment on lines 41 to 44
TicketItem ticketItem = ticketItemAdaptor.queryTicketItem(ticketItemId);
ticketItem.checkEventId(eventId);
List<Long> optionGroupIds = ticketItem.getOptionGroupIds();
List<OptionGroup> optionGroups = optionGroupAdaptor.findAllByIds(optionGroupIds);
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.

으악 멍청이

@ImNM
Copy link
Member

ImNM commented Jan 30, 2023

@kim-wonjin

"optionGroups": [
      {
        "optionGroupId": 1,
        "type": "Y/N",
        "name": "뒷풀이 참여 여부",
        "description": "공연이 끝난 후 오케이포차에서 진행하는 뒷풀이에 참여할 것인가요?",
        "options": [
          {
            "optionId": 1,
            "answer": "YES",   ///.  <--- 예 아니요 로 응답해줘야되지않나 싶음...!
            "additionalPrice": "10000원"
          },
          {
            "optionId": 2,
            "answer": "NO",
            "additionalPrice": "0원"
          }
        ]
      },

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

@gengminy gengminy left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Comment on lines -28 to 29
public static CreateTicketOptionResponse from(OptionGroup optionGroup) {
public static TicketOptionResponse from(OptionGroup optionGroup) {

Copy link
Member

Choose a reason for hiding this comment

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

response dto의 static 메소드 명은 of 로 통일하는게 어떨까요?
dto -> of / vo -> from 으로 다들 쓰고 있는 거 같아요

Copy link
Member

Choose a reason for hiding this comment

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

from 매개변수 하나있을땨
of 여러개있을때
이렇게 쓰고있어요 전!

@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 253 Code Smells

17.7% 17.7% Coverage
0.0% 0.0% Duplication

@kim-wonjin kim-wonjin merged commit 93945f1 into dev Jan 30, 2023
@kim-wonjin kim-wonjin deleted the feature/225-get-ticket-item-options branch January 30, 2023 09:48
@kim-wonjin kim-wonjin changed the title Feature/225 get ticket item options feature(ticketItemOption) 티켓상품 옵션 조회 Jan 30, 2023
@kim-wonjin kim-wonjin changed the title feature(ticketItemOption) 티켓상품 옵션 조회 feature : 티켓상품 옵션 조회 Jan 30, 2023
@kim-wonjin kim-wonjin changed the title feature : 티켓상품 옵션 조회 feat : 티켓상품 옵션 조회 Jan 30, 2023
@kim-wonjin kim-wonjin added Type: Feature [이슈 목적] 새로운 기능 추가 For: API [이슈 대상] 외부 API labels Jan 30, 2023
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