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 : 크루상세조회 #46

Merged
merged 17 commits into from
Aug 2, 2024
Merged

Feat : 크루상세조회 #46

merged 17 commits into from
Aug 2, 2024

Conversation

jsilver01
Copy link
Member

@jsilver01 jsilver01 commented Aug 1, 2024

요약 (Summary)

  • 크루 카드를 눌렀을 때 상세 보기를 제공하는 api 입니다.
  • 피그마에 나와있는 값들은 반환합니다.

🔑 변경 사항 (Key Changes)

  • dto 가 조금 지저분해지는 것 같아서, 디렉토리를 조금 구분하였습니다.
  • 쿼리파람으로 아이디값을 받기 때문에 별도의 request dto 는 생성하지 않았습니다.
  • CrewController 와 CrewService 에서 코드 구현하였습니다.

📝 리뷰 요구사항 (To Reviewers)

  • 명세서와 동일하게 반환되는지

확인 방법

❗️application.yml 에 redirect-uri 를 배포된 서버 주소가 아니라 localhost 로 변경하셔야합니다.
코드를 실행시키고 다음 쿼리문을 실행해주세요. member 중 하나는 리뷰자의 정보로 수정하셔야합니다.

use likelion12;

INSERT INTO exercise (created_at, modified_at,exercise_name, status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '축구', 'ACTIVE');
INSERT INTO exercise (created_at, modified_at,exercise_name, status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '농구', 'ACTIVE');

INSERT INTO member (created_at, modified_at, email, member_img, member_name, gender,exercise_id,status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '[email protected]', '프로필 이미지', '김정은', 'F', 1,'ACTIVE');
INSERT INTO member (created_at, modified_at, email, member_img, member_name, gender,exercise_id,status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '[email protected]', '프로필 이미지', '김정은', 'F', 1,'ACTIVE');
INSERT INTO member (created_at, modified_at, email, member_img, member_name, gender,exercise_id,status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '[email protected]', '프로필 이미지', '김정은', 'F', 1,'ACTIVE');

INSERT INTO activity_region (created_at, modified_at, activity_region_name,status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '광진구','ACTIVE');
INSERT INTO facility (created_at, modified_at, facility_name, facility_address, facility_phone,facility_size, administer, 
weekday, weekend, status) VALUES
('2024-06-30 12:00:00.000000', '2024-06-30 12:30:00.000000', '광진구 체육관', '광진구 샬라샬라', '000-0000', '3층규모', '서울시','2024-06-30 12:30:00.000000','2024-06-30 12:30:00.000000','ACTIVE');

INSERT INTO crew (crew_cost, total_recruits, activity_region_id, created_at, exercise_id, facility_id, modified_at, comment, comment_simple, crew_img, crew_name, gender, level, status) VALUES
(1500, 50, 1, '2024-08-01 09:00:00', 1, 1, '2024-08-01 09:00:00', '크루1입니다~', '크루1', '크루1.png', '크루1', 'M', 'A', 'ACTIVE');

INSERT INTO crew (crew_cost, total_recruits, activity_region_id, created_at, exercise_id, facility_id, modified_at, comment, comment_simple, crew_img, crew_name, gender, level, status) VALUES
(1200, 40, 1, '2024-08-02 10:00:00', 1, 1, '2024-08-02 10:00:00', '크루2입니다~', '크루2', '크루2.png', '크루2', 'F', 'S', 'ACTIVE');
INSERT INTO crew (crew_cost, total_recruits, activity_region_id, created_at, exercise_id, facility_id, modified_at, comment, comment_simple, crew_img, crew_name, gender, level, status) VALUES
(1200, 40, 1, '2024-08-02 10:00:00', 2, 1, '2024-08-02 10:00:00', '크루3입니다~', '크루3', '크루3.png', '크루3', 'F', 'S', 'ACTIVE');


INSERT INTO member_crew (role, status, crew_id, member_id, created_at, modified_at) VALUES
('CAPTAIN', 'ACTIVE', 1, 1, '2024-08-01 09:00:00', '2024-08-01 09:00:00'), -- 첫 번째 크루, 첫 번째 멤버
('CREW', 'ACTIVE', 1, 2, '2024-08-01 09:00:00', '2024-08-01 09:00:00'), -- 첫 번째 크루, 두 번째 멤버
('CREW', 'ACTIVE', 1, 3, '2024-08-01 09:00:00', '2024-08-01 09:00:00'), -- 첫 번째 크루, 세 번째 멤버
('CREW', 'ACTIVE', 2, 1, '2024-08-02 10:00:00', '2024-08-02 10:00:00'), -- 두 번째 크루, 첫 번째 멤버
('CREW', 'ACTIVE', 2, 2, '2024-08-02 10:00:00', '2024-08-02 10:00:00'), -- 두 번째 크루, 두 번째 멤버
('CAPTAIN', 'ACTIVE', 2, 3, '2024-08-02 10:00:00', '2024-08-02 10:00:00'); -- 두 번째 크루, 세 번째 멤버

그 다음

https://kauth.kakao.com/oauth/authorize?client_id=220ac935aaf5aa43884ee21823d82237&redirect_uri=http://localhost:8080/auth/kakao/callback&response_type=code

이 주소로 토큰 발급받아 헤더에 넣어주세요

Get 요청을 아래의 주소로 보내주세요

http://localhost:8080/crew?crewId=1

여기서 crewId 값은 다른 값으로 대체되어도 됩니다.

스크린샷 2024-08-02 오전 4 30 02 스크린샷 2024-08-02 오전 4 30 17 스크린샷 2024-08-02 오전 4 30 32

다음과 같이 나오면 정상 작동입니다

@jsilver01 jsilver01 linked an issue Aug 1, 2024 that may be closed by this pull request
@hd0rable
Copy link
Member

hd0rable commented Aug 2, 2024

다 정상작동되는거 확인했습니다!! 수고하셨습니다아~~

@hd0rable hd0rable merged commit 158baf9 into develop Aug 2, 2024
@jsilver01 jsilver01 deleted the 20-be-크루상세조회 branch August 2, 2024 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 크루 상세 조회
2 participants