Skip to content

feat: 동아리 관리자 권한 위임 기능 추가#1548

Merged
dradnats1012 merged 5 commits into
feat/1509-koin-clubfrom
feat/1527-koin-club-empowerment
May 17, 2025
Merged

feat: 동아리 관리자 권한 위임 기능 추가#1548
dradnats1012 merged 5 commits into
feat/1509-koin-clubfrom
feat/1527-koin-club-empowerment

Conversation

@dradnats1012
Copy link
Copy Markdown
Contributor

🔥 연관 이슈

🚀 작업 내용

  1. 동아리 관리자 권한 위임 API 추가
  2. 동아리 생성 요청 시 슬랙에 알림 오도록 추가

💬 리뷰 중점사항

Copy link
Copy Markdown
Contributor

@duehee duehee left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~
코멘트 확인해주세요!

@Schema(description = "동아리 관리자 ID 리스트", requiredMode = REQUIRED)
@NotEmpty(message = "동아리 관리자는 필수 입력 사항입니다.")
List<InnerClubAdminRequest> clubAdmins,
List<InnerCluManagerRequest> clubAdmins,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

C

Suggested change
List<InnerCluManagerRequest> clubAdmins,
List<InnerClubManagerRequest> clubAdmins,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

헉 나이스입니다

) {
@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class)
public record InnerClubAdminRequest(
public record InnerCluManagerRequest(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

C

위랑 동일합니당

}

@Transactional
public void empowermentClubManager(EmpowermentClubManagerRequest request, Integer studentId){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A

컨벤션이 생겨서 메소드는 명사보단 동사가 좋을 거 같아요. empower는 어떨까요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

좋은 것 같아요 👍

Copy link
Copy Markdown
Contributor

@krSeonghyeon krSeonghyeon left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!


@Schema(description = "위임받는 매니저의 이메일", example = "example@koreatech.ac.kr", requiredMode = REQUIRED)
@NotEmpty(message = "위임받는 사람의 이메일을 입력해주세요.")
String changedManagerEmail
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A

이메일? 전화번호? 아이디? 확인해봐야할 것 같네요

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

user_id 방식으로 변경하겠습니당


public void sendSlackNotification(String clubName) {
ClubCreateEvent clubCreateEvent = new ClubCreateEvent(clubName);
eventPublisher.publishEvent(clubCreateEvent);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A

바로

eventPublisher.publishEvent(new ClubCreateEvent(clubName));

처럼 해도 괜찮을 거 같네요

Copy link
Copy Markdown
Collaborator

@Soundbar91 Soundbar91 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 ~

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;

public record EmpowermentClubManagerRequest(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

C

권한 위임 정의서에 현 관리자 아이디, 향후 관리자 아이디를 입력받고 있는 거 같은데 다른 부분일까요??

public ResponseEntity<ClubResponse> getClub(
@Parameter(in = PATH) @PathVariable Integer clubId
@Parameter(in = PATH) @PathVariable Integer clubId,
@Auth(permit = {STUDENT}) Integer studentId
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A

동아리 관리자 여부 때문에 넣으신건가용 ??
Auth어노테이션은 비로그인 유저에게 에러가 터질 거 같아서, UserId 어노테이션을 사용하면 좋을 거 같아요 ! (분신물 코드 보시면 도움이 될 것 같습니다)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

아 그 부분은 생각못했네요 👍

@dradnats1012 dradnats1012 merged commit a961c66 into feat/1509-koin-club May 17, 2025
3 checks passed
@dradnats1012 dradnats1012 deleted the feat/1527-koin-club-empowerment branch May 17, 2025 10:01
Soundbar91 added a commit that referenced this pull request May 17, 2025
* feat: 코인 동아리 테이블 추가 (#1514)

* feat: 코인 동아리 테이블 flyway 추가

* feat: 코인 동아리 Entity 클래스 추가

* feat: club_qna 테이블 추가 (#1516)

* feat: 동아리 QNA API (#1528)

* feat: 엔티티 생성 및 is_deleted 필드 추가

* feat: 특정 동아리의 QNA 생성 구현

* feat: 특정 동아리의 QNA 삭제 구현

* feat: 특정 동아리의 QNA 조회 구현

* chore: swagger 설명 추가

* chore: swagger 설명 추가

* feat: 인기 동아리 조회 API (#1529)

* feat: 인기 동아리 스케줄링 기능 구현

* feat: club_hot 테이블 추가 및 인기 동아리 조회 API 추가

* chore: 컬럼명 변경

* chore: 컬럼명 변경

* feat: 리뷰 반영 (동아리가 없는 경우 처리 추가)

* feat: 어드민 동아리 CRU API 추가 (#1525)

* feat: 어드민 카테고리 리스트 조회 API 추가

* feat: 동아리 페이지네이션 조회 API 추가

* fix: 정적 메소드 네이밍 변경

* feat: 동아리 상세 조회 API 추가

* fix: 동아리 상세 조회 응답값 필드 추가

* feat: 동이라 생성 API 추가

* feat: 코인 동아리 수정 API 뼈대 추가

* fix: ClubAdmin saveAll 파라미터 변경

* feat: clubSNS 추가

* feat: 동아리 상세 조회 응답값에 동아리 연락처 리스트 추가

* fix: 동아리 연락처 리스트 변수명 수정

* test: testFixture 추가

* feat: DomainType 동아리 추가

* feat: 수정 API 내부 구현

* test: 동아리 카테고리 테스트 추가

* test: 동아리 생성 단위 테스트 추가

* test: AdminClubCategoryTest 클래스 네이밍 변경 및 테스트 메소드 명 변경

* test: 동아리 상세 조회 테스트 추가

* test: AdminClubTest 클래스 네이밍 변경

* test: 동아리 수정 조회 테스트 추가

* test: 미사용 when 삭제

* test: 동아리 페이지 네이션 테스트 추가

* test: 동아리 페이지 네이션 테스트 수정

* test: 테스트 삭제

* fix: flyway 버저닝

* fix: 리뷰 반영

* fix: 동아리 관리자 수정 로직 롤백

* fix: 동아리 생성 오류 수정

* fix: 동아리 페이지네이션 조회 오류 수정

* feat: 1526-normal 동아리 (#1539)

* feat: 동아리 카테고리 전체 조회 API

* feat: 동아리 조회수 증가 메서드 추가

* feat: 동아리 상세조회 API 추가

* feat: 카테고리별 동아리 조회 API 추가

* feat: 동아리 좋아요/좋아요 취소 API 추가

* feat: 동아리 생성 요청 API 추가

* feat: 동아리 수정 API 추가

* feat: 동아리 상세 소개 수정 API 추가

* style: 라인 정렬

* refactor: 1차 리뷰 반영

* refactor: 2차 리뷰 반영

* fix: 어드민 코인 동아리 CRU API 수정사항 반영 (#1543)

* fix: 어드민 카테고리 API 경로 변경

* fix: 어드민 코인 동아리 생성 요청 DTO 스웨거 설정 변경

* feat: 동아리 생성 DTO 유효성 검증 어노테이션 추가

* feat: 어드민 코인 동아리 SNS 저장 로직 추가

* feat: 어드민 코인 동아리 SNS 업데이트 로직 추가

* feat: ClubSNS 유니크 제약 조건 추가

* fix: ClubSNS 유니크 설정 삭제

* build: flyway-check-dangerous-sql.yml CONSTRAINT 조건 삭제

* fix: 페이지 네이션 조회수 기준 정렬 삭제

* fix: 동아리 연락처 생성, 수정 로직 수정

* feat: 어드민 동아리 관리 API추가 (#1536)

* feat : flyway 추가

* feat : clubAdmin 내 isAccept 추가

* feat : 페이지네이션 Condition 추가

* feat : Repostitory 내 필요 메소드 추가

* feat : 동아리 활성화 수정 API 추가

* feat : 동아리어드민 관련 API 작성

* feat : 기존 코드 내 오류사항 수정

* chore : 공백 제거

* chore : Controller name 관련 수정

* chore : 쿼리문 코드블럭 형식 일치

* chore : 리뷰 반영 및 Summary 통일

* fix : NotEmpty 어노테이션 NotNull로 변경

* feat : Response, Request 수정 및 추가

* chore : Repository 정리 및 메소드 추가

* feat : 미승인 동아리 정보 확인 API 추가 및 미승인 동아리 Redis 페이징 적용

* chore : is_accept 삭제

* chore : 리뷰 반영

* feat : createdAt 정렬 구현

* chore : 동아리 관리자 api path 변경

* feat: 동아리 QNA 기획 수정사항 반영 (#1549)

* feat: QNA 생성 시 질문은 사용자만, 대답은 관리자만 가능하도록 수정

* feat: QNA 삭제 시 무조건 하드딜리트 되도록 수정

* feat: QNA 조회 시 isDeleted와 isAdmin 삭제

* feat: 일부 admin 표현을 manager로 변경

* chore: swagger 명세 변경

* chore: swagger 명세 변경

* feat: 동아리 관리자 권한 위임 기능 추가 (#1548)

* refactor: 동아리 상세 response 관리자 여부 추가

* feat: 동아리 생성 요청 시 슬랙 알림 기능 추가

* feat: 동아리 관리자 권한 위임 API 추가

* refactor: 리뷰 반영

* style: 라인 정렬

* fix: 메소드명 변경 미반영 수정

* build: flyway 버전 수정

* fix: ClubAdmin -> ClubManager으로 변경

* chore: 코드 포맷팅

* fix: ClubAdmin -> ClubManager으로 변경

* chore: 클래스 패키지명 변경

* fix: 클래스명 롤백

* fix: ClubAdmin -> ClubManager으로 변경

* fix: userid -> userId

* fix: userid -> userId

* fix: ClubAdmin -> ClubManager으로 변경

* fix: ClubAdmin -> ClubManager으로 변경

* fix: ClubAdmin -> ClubManager으로 변경

* fix: 클래스명 통일 & ClubAdmin -> ClubManager으로 변경

* fix: 예외 클래스 네이밍 오타 수정

* fix: 코드 컨벤션 네이밍 적용

* fix: 코드 컨벤션 네이밍 적용

---------

Co-authored-by: 김성현 <ya41921174@gmail.com>
Co-authored-by: 허준기 <112807640+dradnats1012@users.noreply.github.com>
Co-authored-by: 듀히 <149302959+duehee@users.noreply.github.com>
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.

4 participants