Skip to content

Commit

Permalink
1.0.1 (#202)
Browse files Browse the repository at this point in the history
* feat: 스페이스 회원 수 조회 추가

* refactor: 리뷰 내용 반영

* feat: template 간단정보 단건 조회 API

* feat: template 상세정보 단건 조회 API

* feat: 스페이스 초대하기/떠나기 API

* feat/Ls-22: 회고 생성 API 구현 (#29)

* chore: 엔티티 수정

* chore: 예약어 사용으로 인한 수정

* add: dto 추가

* feat: 회고 생성 로직 수정 및 구현

* chore: h2 설정을 위한 수정

* refactor: 리뷰 내용 반영

* chore: 내 회고폼 자동 추가로 변경

---------

Co-authored-by: Raymond <akdfhr2@gmail.com>

* fix: 팀장 검증 로직 도메인으로 이전

* feat: template 전체 조회

* feat: 템플릿 관련 API 구현 완료

* chore: @PreAuthorize 추가

* style: findByTemplateId -> findAllByTemplateId로 변경

* chore: QuestionType import 문 수정

* chore: generated 삭제

* style: findByIdOrThrow 메서드로 변경

* feat: ActionItem Entity 생성

* feat/LS-24: 특정 회고 질문 목록 조회 구현 (#33)

* add: 회고 관련 예외 추가

* add: dto 추가

* feat: 컨트롤러 및 스웨거 추가

* chore: 엔티티 변경 및 순서 추가

* feat: 회고 진행중 검증 로직 추가

* chore: 순서 컬럼 추가로 인한 변경

* feat: 특정 회고 질문 목록 조회 로직 구현

* chore: 질문타입 추가

* feat: ActionItemApi 생성

* style: dto에 swagger 어노테이션 추가

* feat/LS-26: 특정 회고 작성 API (#34)

* add: dto 추가

* feat: 회고 작성 로직 구현

* feat: 변환 로직 구현

* feat: 질문 관련 일급컬렉션 구현

* add: 예외 추가

* del: 컨버터 삭제

* del: 컨버터 삭제

* chore: Answers 로직 수정

* del: 컨버터 삭제

* chore: 예외 추가

* chore: 검증로직 추가

* feat: 액션 아이템 생성 API 작성

* chore: ActionItem BaseEntity 상속 추가

* style: 주석 삭제

* style: 줄바꿈 추가

* chore: SecurityConfig setHttp 수정

* feat: 회원 액션 아이템 조회 API 작성

* feat: 스페이스 액션 아이템 조회 API 작성

* feat: 액션 아이템 삭제 API 작성

* feat: SpaceCategory 검사 로직 추가

* refactor: ActionItem 엔티티에 작성자 검증 추가

* refactor: RetrospectRepository, SpaceRepository에 findByIdIn 메서드 추가

* refactor: getMemberActionItemList 메서드 IN 절로 변경

* refactor: getSpaceActionItemList IN절로 변경

* fix: swagger 오류 수정

* test: cors 오류 테스트

* chore: SecurityConfig cors 설정 추가

* Feat/LS-30: 회원가입, 로그인 응답 값 수정 & 회원 정보 얻기 API 구현 (#38)

* chore: 회원 가입 리턴값에 액세스 토큰 추가

* chore: 로그인 응답 값 수정

* feat: 회원 정보 얻기 API 작성

* docs: AuthApi 수정

* feat: 리프레시 토큰을 로그인, 회원가입 리턴값에 포함

* fix: 토큰 재발급 로직 수정

* feat/LS-33: 이미지 업로드 API 구현하기 (#40)

* feat: Ncp Object Storage 연결

* feat: Exnternal API 구축하기

* feat: Space 생성 시 배너 url 추가하기

* clean: 미사용 코드 제거

* fix: 누락된 MemberId 어노테이션 추가

* chore: 액세스 토큰 expiration 수정 (#42)

* chore: 깃허브 액션 플러그인 변경

* chore: 깃허브 액션 플러그인 변경

* chore/LS-35 : 여러 API 뷰에 맞게 수정 (#41)

* chore: 프론트 요청 사항 및 스웨거 수정

* chore: 마감일자 엔티티 추가

* chore: 전체 인원 조회를 위한 메서드 추가

* feat: 시간 객체 추가 및 시간 로직 구현

* fix: 컴포넌트 스캔 오류 해결

* feat: presigned URL 이미지 저장 로직 변경 (#50)

* feat: 스페이스 생성 시 필드 복수개로 변경 (#46)

* feat/LS-34 : 로깅 및 yml 통합 (#43)

* del: 안쓰는 파일 삭제

* feat: logback 설정

* feat: aop 로깅 구현

* feat: yml 세팅 및 cd 수정

* fix: 회원 가입이 필요한 상황에서의 응답 내용 수정

* fix: 경로수정

* feat: 스페이스 조회 API 배너 추가 (#56)

* fix: 파이프라인 checkout 오류 수정 (#57)

* feat: 생성된 스페이스 아이디 반환하기 (#59)

* chore: 패키지 구조 변경 (#61)

* chore: 경로수정

* chore: dto 경로수정

* chore: 예외 클래스 경로 수정

* chore: 경로 변경으로 인한 수정

* fix: 경로 수정

* feat/#52 : 회고 임시 저장 기능 구현 (#64)

* feat: 임시답변 조회 컨트롤러 로직 구현

* feat: 답변 enum 추가

* feat: 임시답변 조회 서비스 로직 구현

* feat: 답변 여부 검증 로직 및 질문-답변 매핑 로직 구현

* chore: 임시 저장 여부 추가

* feat: 회고작성 API : 임시 저장 기능 구현

* feat : 질문 수정 관련 로직 구현 (#65)

* feat: 기본 폼 조회 컨트롤러 구현

* feat: 폼 엔티티 수정

* feat: 기본 폼 조회 서비스 로직 구현

* chore: 회고 생성 - 커스텀 폼 삽입 로직 추가

* chore: 질문 엔티티 및 space 엔티티 수정

* fix: 컴파일 에러 해결

* fix: string 으로 변경

* fix: 필수 영역 수정 및 sql gitignore 설정 (#68)

* fix: 스페이스 떠나기 요청방식변경 (#70)

* Feat/#69 fix 스페이스 떠나기 요청방식변경 (#71)

* fix: 스페이스 떠나기 요청방식변경

* fix: 자잘한 이슈 수정

* feat: 템플릿 추천 로직 구현 (#73)

* feat: 추천템플릿 조회 및 설정 API 컨트롤러 로직 개발

* feat: 추천을 위한 enum 정의

* feat: 추천템플릿 조회 및 설정 API 서비스 로직 개발

* chore: 로그수집경로 설정 (#77)

* �chore: 회고 생성 플로우 변화로 인한 수정 (#75)

* chore: 추천 템플릿 설정 API 제거, 디폴트 템플릿 관련 로직 삭제

* chore: 템플릿 질문 조회 API 태그 데이터 추가

* chore: 회고 생성 시, 새로운 폼 생성일 경우 태그 추가

* fix: TEMPLATE 조회일 경우 스페이스 팀원 검증 로직 제외

* fix: 환경변수 경로 오류 수정 (#78)

* fix: 템플릿 간단 정보 조회 API 수정

* chore/rename-logfile (#79)

* fix: 환경변수 경로 오류 수정

* fix: 템플릿 상세 정보 단건 조회 api 수정

* fix: 모든 템플릿 정보 조회 api 수정

* chore: TemplateApi response 수정

* fix: 회고 작성 @transactional 추가

* fix/83: 템플릿 조회 리뷰 사항 반영 (#85)

* chore: 필요없는 로그 코드 삭제

* chore: 모든 템플릿 조회 FormType으로 변경

* chore: 기본 템플릿 아이디 리스트 삭제

* chore: application-dev 수정

* fix: 회고 임시 저장 조회 로직 npe 오류 해결 (#86)

* fix: 로그백 경로 수정 (#87)

* refactor: URI 추가 (#89)

* feat: 회고폼 수정 및 삭제 (#93)

* feat: 회고폼 수정 및 삭제 컨트롤러 구현

* feat: 회고폼 수정 및 삭제 서비스 로직 구현

* chore: 트랜잭션 추가

* chore/92: FormTag enum 추가, Form, TemplateMetadata 엔티티 수정 (#94)

* fix: FormTag 구조 수정

* chore: application-dev 수정

---------

Co-authored-by: Mingyu Song <100754581+mikekks@users.noreply.github.com>

* feat: 대표자 변경 API & 팀원 삭제 API (#96)

* feat: 대표자 변경 API & 팀원 삭제 API

* fix: 메소드명 오타 수정

* fix: 임포트 이슈 수정

* chore: 미사용 이미지 정리 스탭 추가 (#97)

* feat: 멤버 정보 변경 API 작성 (#101)

* feat: 멤버 정보 변경 API 작성

* feat: 멤버 정보 변경 API 작성

* chore: http method patch로 변경

* chore: answerContent 로 변경 (#104)

* feat: 회고 조회 응답 필드 추가하기 (#105) (#106)

* feat: 스페이스 삭제하기 API (#100)

* feat: 회고 분석 조회 API  (#108)

* feat: 분석 조회 컨트롤러 로직 구현

* add: getter 추가

* feat: 회고 분석 조회 서비스 로직 개발

* feat: 마감 검증 로직 구현

* feat: 이름 추출 로직 구현

* del: And 삭제

* feat: 스페이스에 속한 커스텀 폼 목록 조회 (#109)

* feat: 스페이스에 속한 커스텀 폼 목록 조회

* fix: schema example 수정

* chore: custom template response spaceId 제거

* feat:스페이스 팀원 목록 조회하기 (#107) (#110)

* chore: Tag 데이터 삭제 (#112)

* fix: create actionitem 수정 (#116)

* feat: 내가 작성한 회고 수정하기 (#118)

* feat:종료되지 않은 내가 작성한 회고 조회하기

* feat:종료되지 않은 내가 작성한 회고 수정하기

* feat: 회고 수정 및 삭제 로직 구현 (#119)

* feat: 회고 수정 및 삭제 로직 구현

* feat: 현재시간과 비교하는 검증 로직 추가

* feat: boolean -> enum 으로 수정

* test: 테스트코드 환경 세팅 (#121)

* �chore: enum 변경 및 스웨거 추가 (#123)

* chore: Type CUSTOM으로 변경

* chore: 스웨거 추가

* fix: 배포스크립트 수정

* fix: 스페이스 커스텀 폼 조회 응답에 폼아이디 추가 (#126)

* fix: 스페이스 커스텀 폼 조회 로직 수정 (#128)

* fix: 스페이스 커스텀 폼 조회 로직 수정

* chore: application-dev 수정

* feat/124: 실행 목표 조회 API 구현 (#129)

* feat: 스페이스의 완료 회고중 가장 최근에 시작된 회고의 액션 아이템 리스트 조회 구현

* chore: 최근 회고의 기준을 데드라인으로 변경

* chore: swagger에 설명 추가

* feat: 스페이스의 모든 실행 목표 API 조회 구현

* feat: 멤버의 실행 목표 controller, service 메서드 생성

* feat: 실행 목표 create, member와 관련한 실행 목표 조회 구현

* chore: 응답 변수명 변경

* chore: application-dev 수정

* chore: 멤버 실천 목표 응답 수정

* feat: 멤버 실행 목표 핀, 상태 기준 정렬 구현

* chore: 조회 DTO 이름 변경(prefix get 추가)

* fix: 스페이스 삭제시 회고와 액션아이템 삭제 (#131)

* fix: 스페이스 삭제시 회고와 액션아이템 삭제

* feat: 삭제쿼리 추가

* feat: 디폴트 폼 작업 진행 (#135)

* feat: 디폴트 폼 설정 API 구현

* chore: 회고 생성시 디폴트 폼 작업

* chore: 임시저장 예외케이스 수정 (#136)

* chore: 임시저장 예외케이스 수정

* chore: validation 수정

* chore: 회고 수정시 기존 임시답변 있을 경우 삭제 (#138)

* chore: 실행 목표 조회 로직 변경, 리뷰 사항 반영 (#139)

* chore: 실행 목표가 없는 회고 응답에서 제외

* chore: dto 이름 변경

* chore: 새로운 폼 저장 title ->formName으로 변경

* fix: 회원 정보 조회 응답 imageUrl 추가 (#141)

* fix: 회원 정보 조회 응답 imageUrl 추가

* fix: AuthApi 수정

* fix: yml 변경

* fix: 로그인, 회원가입 응답 데이터에 이미지 url 추가 (#144)

* feat: 회원가입 응답 값 수정

* feat: 로그인 응답 값 수정

* fix: 스페이스 정렬 순서 변경하기

* fix: 스페이스 정렬 순서 변경하기 (#146)

* fix: 스페이스 멤버 조회 오류 수정

* fix: 회고 작성자 수 조회 이슈 수정

* Fix: 실행 목표 생성, 조회, 삭제 API 수정 & 실행 목표 편집 API 추가 (#145)

* fix: 멤버 실행 목표 조회 쿼리 조인으로 변경

* feat: ActionItem에 actionItemOrder 추가

* fix: ActionItem 엔티티에 actionItemStatus 컬럼 삭제

* fix: createActionItem order 설정 추가

* fix: 개인 회고 조회 중복 제거

* refactor: 실행목표 편집 구현 전 dto req, res로 패키지 분리

* feat: 실행 목표 편집 API 구현

* fix: 멤버 실행 목표 조회, 스페이스별 실행 목표 조회에서 order 순으로 정렬 추가

* fix: 실행 목표 삭제 API 수정:

* fix: 최근 회고 찾기 order 순 정렬 추가

* docs: ActionItemApi에 설명 추가

* chore: 회원의 실행 목표 조회 join 쿼리로 변경

* style: exception messagea 수정

* chore: 스페이스 실행 목표 조회 join 쿼리로 변경

* feat: 스페이스 단건조회 리더 아이디 반환하기 (#148)

* feat: 기본 템플릿 조회 시 목적 태그 목록 응답하기 (#154)

* feat: 구글 시트 API를 활용한 사용자 설문 CRM 연동하기 (#152)

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: credentials 주입 테스트

* fix: 스페이스 떠나기 팀장확인 로직 변경 (#156)

* fix: 스페이스 조회시 리더 정보 응답하기 #157 (#158)

* feat: 회고 분석 생성 및 조회 API 구현 (#155)

* chore: openai 관련 yml 추가

* del: 필요없는 파일 제거

* add: 의존성 추가

* add: openai 관련 Dto 추가

* feat: 분석 관련 엔티티 추가

* feat: openai 관련 서비스 로직 구현

* feat: 분석 관련 서비스 로직 구현

* feat: 분석 데이터 정제를 위한 로직 구현

* bug: 테이블 이름 변경 (#162)

* hotfix: 스페이스 단건조회 오류 수정

* chore: 멤버 실행 목표 응답값 수정 (#163)

* chore: 멤버 실행 목표 응답값 수정

* chore: 작성 시간 추가

* chore: 답변이 없을 시 처리

* �chore: 추천 템플릿 조회 API 및 회고 수정 API 변경 (#164)

* fix: 로직 오류 수정

* chore: 단건 -> 리스트 수정

* �chore: fe 요청에 맞게 수정 (#166)

* chore: 필수 질문 제외 추가

* chore: 분석 여부 확인 로직 추가

* feat: 스페이스 아이디로 진행 중 회고에 실행 목표 추가 (#169)

* Chore/170: 실행목표 조회 API 응답 수정 (#171)

* fix: 멤버의 실행목표 조회 API 수정

* fix: 조회 API 응답값 수정

* feat: 배너가없는 스페이스 생성 시 디폴트이미지 추가

* fix: 스페이스 목록 조회 커서 기준 변경

* fix: 스페이스 목록 조회 커서 기준 변경

* fix: 스토리지 객체 유무 확인 로직 추가

* chore: formTag 추가 (#173)

* chore: 실행 목표 생성 응답 수정 (#175)

* chore: 회고 생성 API 수정 (#177)

* fix: 질문에 대한 답변 추출 로직 수정 (#180)

* feat: 퍼블릭 스페이스 정보 조회하기

* feat: 퍼블릭 스페이스 정보 조회하기

* feat: 애플로그인 (#181)

* test: apple auth

* chore: appleTest RequestBody => RequestParam으로 변경

* feat: apple 토큰 검증 코드 작성

* feat: apple 로그인 구현

* chore: application-prod.yml, dev.yml 수정

* chore: 불필요한 로그 삭제

* chore: LayerApplication 불필요한 주석 삭제

* chore: 필요없는 빈 주입 제거

* chore: AppleService 빈 주입 제거

---------

Co-authored-by: Raymond <akdfhr2@gmail.com>

* chore: test 코드 임시 주석 처리 (#182)

* chore: 테스트 코드 임시 주석처리, yml 변경 반영 (#183)

* chore: test 코드 임시 주석 처리

* chore: 임시 커밋

* chore: test yml 수정

* hotfix: test yml 수정

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* feat: 회고 마감 API 구현 (#186)

* fix: 회고 분석 팀원도 조회가능하도록 변경 (#188)

* feat: 회고 마감 배치 작업 및 배포스크립트 수정 (#189)

* feat: 회고 자동 마감 스케줄러 구현

* chore: 배포 스크립트 수정

* chore: 스크립트 수정

* chore: 스크립트 수정

* ch

* chore: 배포 스크립트 수정 후 테스트

* chore: 배포스크립트 수정

* chore: 배포 스크립트 수정 후 테스트

* chore: 스크립트 수정

* �chore: 스크립트 수정

* chore: 배포 스크립트 수정 후 테스트

* chore: 배포 스크립트 수정 후 테스트

* chore: 배포 스크립트 수정 후 테스트

* chore: 배포 스크립트 수정 후 테스트

* chore: 배포 스크립트 수정 후 테스트

* chore: docker 파일 추가

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* chore: 배포 스크립트 수정 및 테스트

* �feat: 회고 분석 기능 전면 수정 (#190)

* chore: AnalyDetailType 으로 이름 변경

* chore: 많이 언급된 키워드 추가

* feat: 개인 회고 ai 분석 구현

* feat: async 비동기 처리 로직 추가

* refactor: 비동기 처리 로직 개선

* chore: 엔티티 수정

* chore: 엔티티 수정으로 인한 로직 변경

* feat: 팀, 개인별 회고 분석 기능 구현

* chore: 개인 ai 분석 응답값 수정 (#192)

* chore: 분석 로직 수정 (#195)

* chore: 분석 조회 API에서 개인 회고, 팀 회고 분기처리

* chore: 분석 생성 API 수정

* feat: 배치 작업 내 AI 분석 생성 로직 구현

* chore: 임시 api 생성 (#196)

* chore: 스웨거설정 수정

* chore: 공백 제거

* chore: batch 모듈 런타임 오류 해결

* chore: batch 모듈 빌드

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* chore: formTag 생성 방식 변경 (#198)

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* test: k3s deploy action

* hotfix: 스페이스 조회 정렬 기준 변경

* feat: 내 분석 조회 API 구현 (#201)

* feat: dto 및 컨트롤러 정의

* feat: 내 분석 조회 로직 구현

* fix: 템플릿 상세 조회 로직 변경

* fix: 템플릿 상세 조회 로직 변경

* fix: 내가 참여한 회고가 아니더라도 분석 정보 조회 가능

---------

Co-authored-by: clean2001 <clearrworld@gmail.com>
Co-authored-by: Mingyu Song <100754581+mikekks@users.noreply.github.com>
Co-authored-by: Sejeong Kim <64718002+clean2001@users.noreply.github.com>
Co-authored-by: mikekks <thdalsrb79@naver.com>
  • Loading branch information
5 people committed Aug 29, 2024
1 parent 6911a5d commit ea9d31a
Show file tree
Hide file tree
Showing 20 changed files with 379 additions and 142 deletions.
4 changes: 3 additions & 1 deletion layer-api/src/main/java/org/layer/LayerApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
import org.springframework.scheduling.annotation.EnableAsync;

@OpenAPIDefinition(servers = {
@Server(url = "http://localhost:8080", description = "로컬서버"),
@Server(url = "https://stgapi.layerapp.io", description = "개발서버"),
@Server(url = "https://api.layerapp.io", description = "운영서버")})
@Server(url = "https://api.layerapp.io", description = "운영서버")
})
@SpringBootApplication
@EnableJpaAuditing
@EnableAspectJAutoProxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ public class ActionItemService {

@Transactional
public ActionItemCreateResponse createActionItem(Long memberId, Long retrospectId, String content) {
log.info("?");
log.info("?");

// 만드는 사람이 스페이스 리더인지 확인
Retrospect retrospect = retrospectRepository.findByIdOrThrow(retrospectId);
Space space = spaceRepository.findByIdOrThrow(retrospect.getSpaceId());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.layer.domain.analyze.service;

import static org.layer.domain.answer.entity.Answers.*;

import java.util.ArrayList;
import java.util.List;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.layer.domain.analyze.controller.dto.response.AnalyzeIndividualGetResponse;
import org.layer.domain.analyze.controller.dto.response.AnalyzeTeamGetResponse;
import org.layer.domain.analyze.controller.dto.response.AnalyzesGetResponse;
Expand All @@ -21,45 +19,44 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
import java.util.Optional;

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
@Slf4j
public class AnalyzeService {

private final AnalyzeRepository analyzeRepository;
private final MemberSpaceRelationRepository memberSpaceRelationRepository;
private final SpaceRepository spaceRepository;

private final AIAnalyzeService aiAnalyzeService;
private final AnalyzeRepository analyzeRepository;
private final MemberSpaceRelationRepository memberSpaceRelationRepository;
private final SpaceRepository spaceRepository;

@Transactional
@Async
public void createAnalyzeTemp(Long spaceId, Long retrospectId, List<Long> memberIds) {
aiAnalyzeService.createAnalyze(spaceId, retrospectId, memberIds);
}
private final AIAnalyzeService aiAnalyzeService;

public AnalyzesGetResponse getAnalyze(Long spaceId, Long retrospectId, Long memberId) {
// 해당 스페이스 팀원인지 검증
Team team = new Team(memberSpaceRelationRepository.findAllBySpaceId(spaceId));
team.validateTeamMembership(memberId);
@Transactional
@Async
public void createAnalyzeTemp(Long spaceId, Long retrospectId, List<Long> memberIds) {
aiAnalyzeService.createAnalyze(spaceId, retrospectId, memberIds);
}

Space space = spaceRepository.findByIdOrThrow(spaceId);
public AnalyzesGetResponse getAnalyze(Long spaceId, Long retrospectId, Long memberId) {
// 해당 스페이스 팀원인지 검증
Team team = new Team(memberSpaceRelationRepository.findAllBySpaceId(spaceId));
team.validateTeamMembership(memberId);

AnalyzeTeamGetResponse analyzeTeamGetResponse = null;
if(space.getCategory().equals(SpaceCategory.TEAM)) {
Analyze teamAnalyze = analyzeRepository.findByRetrospectIdAndAnalyzeTypeOrThrow(retrospectId,
AnalyzeType.TEAM);
analyzeTeamGetResponse = AnalyzeTeamGetResponse.of(teamAnalyze);
}
Space space = spaceRepository.findByIdOrThrow(spaceId);

Analyze individualAnalyze = analyzeRepository.findByRetrospectIdAndAnalyzeTypeAndMemberIdOrThrow(retrospectId,
AnalyzeType.INDIVIDUAL, memberId);
AnalyzeTeamGetResponse analyzeTeamGetResponse = null;
if (space.getCategory().equals(SpaceCategory.TEAM)) {
Analyze teamAnalyze = analyzeRepository.findByRetrospectIdAndAnalyzeTypeOrThrow(retrospectId,
AnalyzeType.TEAM);
analyzeTeamGetResponse = AnalyzeTeamGetResponse.of(teamAnalyze);
}

return AnalyzesGetResponse.of(analyzeTeamGetResponse, AnalyzeIndividualGetResponse.of(individualAnalyze));
}
Optional<Analyze> individualAnalyze = analyzeRepository.findByRetrospectIdAndAnalyzeTypeAndMemberId(retrospectId,
AnalyzeType.INDIVIDUAL, memberId);

return AnalyzesGetResponse.of(analyzeTeamGetResponse, individualAnalyze.map(AnalyzeIndividualGetResponse::of).orElse(null));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import jakarta.validation.Valid;
import org.layer.common.annotation.MemberId;
import org.layer.domain.member.controller.dto.CreateFeedbackRequest;
import org.layer.domain.member.controller.dto.GetMemberAnalyzesResponse;

import org.layer.domain.member.controller.dto.UpdateMemberInfoRequest;
import org.layer.domain.member.controller.dto.UpdateMemberInfoResponse;
import org.springframework.http.ResponseEntity;
Expand All @@ -17,4 +19,8 @@ public interface MemberApi {
@Operation(summary = "서비스 사용에 대한 피드백 남기기", method = "POST")
ResponseEntity<Void> createFeedback(@MemberId Long memberId, @Valid CreateFeedbackRequest createFeedbackRequest);


@Operation(summary = "내 회고 분석 조회", method = "GET")
ResponseEntity<GetMemberAnalyzesResponse> getMyAnalyzes(@MemberId Long memberId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.RequiredArgsConstructor;
import org.layer.common.annotation.MemberId;
import org.layer.domain.member.controller.dto.CreateFeedbackRequest;
import org.layer.domain.member.controller.dto.GetMemberAnalyzesResponse;
import org.layer.domain.member.controller.dto.UpdateMemberInfoRequest;
import org.layer.domain.member.controller.dto.UpdateMemberInfoResponse;
import org.layer.domain.member.service.MemberService;
Expand Down Expand Up @@ -31,4 +32,10 @@ public ResponseEntity<Void> createFeedback(@MemberId Long memberId, @Valid @Requ
memberService.createFeedback(memberId, createFeedbackRequest);
return null;
}
@Override
@GetMapping("/analyze")
public ResponseEntity<GetMemberAnalyzesResponse> getMyAnalyzes(@MemberId Long memberId) {

return ResponseEntity.ok(memberService.getMyAnalyzes(memberId));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.layer.domain.member.controller.dto;

import java.util.List;

public record GetMemberAnalyzesResponse(
List<GetMemberRecentAnalyzeResponse> recentAnalyzes,
List<GetMemberRecentGoodAnalyzeResponse> goodAnalyzes,
List<GetMemberRecentBadAnalyzeResponse> badAnalyzes,
List<GetMemberRecentImprovementAnalyzeResponse> improvementAnalyzes

) {

public static GetMemberAnalyzesResponse of(List<GetMemberRecentAnalyzeResponse> recentAnalyzes,
List<GetMemberRecentGoodAnalyzeResponse> goodAnalyzes,
List<GetMemberRecentBadAnalyzeResponse> badAnalyzes,
List<GetMemberRecentImprovementAnalyzeResponse> improvementAnalyzes) {

return new GetMemberAnalyzesResponse(recentAnalyzes, goodAnalyzes, badAnalyzes, improvementAnalyzes);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.layer.domain.member.controller.dto;

import java.time.LocalDateTime;

import org.layer.domain.retrospect.dto.SpaceRetrospectDto;

public record GetMemberRecentAnalyzeResponse(
Long spaceId,
String spaceName,
Long retrospectId,
String retrospectTitle,
LocalDateTime deadline
) {
public static GetMemberRecentAnalyzeResponse of(SpaceRetrospectDto spaceRetrospectDto) {
return new GetMemberRecentAnalyzeResponse(spaceRetrospectDto.getSpace().getId(),
spaceRetrospectDto.getSpace().getName(), spaceRetrospectDto.getRetrospect().getId(),
spaceRetrospectDto.getRetrospect().getTitle(), spaceRetrospectDto.getRetrospect().getDeadline());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.layer.domain.member.controller.dto;

import java.time.LocalDateTime;

import org.layer.domain.retrospect.dto.SpaceRetrospectDto;

public record GetMemberRecentBadAnalyzeResponse(
Long spaceId,
String spaceName,
Long retrospectId,
String retrospectTitle,
LocalDateTime deadline,
String badPoint
) {
public static GetMemberRecentBadAnalyzeResponse of(SpaceRetrospectDto spaceRetrospectDto, String badPoint) {
return new GetMemberRecentBadAnalyzeResponse(spaceRetrospectDto.getSpace().getId(),
spaceRetrospectDto.getSpace().getName(), spaceRetrospectDto.getRetrospect().getId(),
spaceRetrospectDto.getRetrospect().getTitle(), spaceRetrospectDto.getRetrospect().getDeadline(), badPoint);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package org.layer.domain.member.controller.dto;

import java.time.LocalDateTime;

import org.layer.domain.retrospect.dto.SpaceRetrospectDto;

public record GetMemberRecentGoodAnalyzeResponse(
Long spaceId,
String spaceName,
Long retrospectId,
String retrospectTitle,
LocalDateTime deadline,
String goodPoint
) {
public static GetMemberRecentGoodAnalyzeResponse of(SpaceRetrospectDto spaceRetrospectDto, String goodPoint) {
return new GetMemberRecentGoodAnalyzeResponse(spaceRetrospectDto.getSpace().getId(),
spaceRetrospectDto.getSpace().getName(), spaceRetrospectDto.getRetrospect().getId(),
spaceRetrospectDto.getRetrospect().getTitle(), spaceRetrospectDto.getRetrospect().getDeadline(), goodPoint);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.layer.domain.member.controller.dto;

import java.time.LocalDateTime;

import org.layer.domain.retrospect.dto.SpaceRetrospectDto;

public record GetMemberRecentImprovementAnalyzeResponse(
Long spaceId,
String spaceName,
Long retrospectId,
String retrospectTitle,
LocalDateTime deadline,
String improvementPoint
) {
public static GetMemberRecentImprovementAnalyzeResponse of(SpaceRetrospectDto spaceRetrospectDto, String improvementPoint) {
return new GetMemberRecentImprovementAnalyzeResponse(spaceRetrospectDto.getSpace().getId(),
spaceRetrospectDto.getSpace().getName(), spaceRetrospectDto.getRetrospect().getId(),
spaceRetrospectDto.getRetrospect().getTitle(), spaceRetrospectDto.getRetrospect().getDeadline(), improvementPoint);
}
}
Loading

0 comments on commit ea9d31a

Please sign in to comment.