-
Notifications
You must be signed in to change notification settings - Fork 0
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: 운영진 관리 기능 구현 완료 #648
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
회장, 부회장, 운영진 등의 정보를 관리하기 위해 이전에 position
테이블을 생성한 적이 있어요. 이번에 작성된 부분과 일부 겹치는 내용이 있어, 두 도메인 중 하나를 삭제하고 통합하는 것이 더 효율적일 것 같아요.
"position은 다음과 같이 등록 가능<br>" + | ||
"- PRESIDENT : 회장<br>" + | ||
"- VICE_PRESIDENT : 부회장<br>" + | ||
"- GENERAL : 일반 운영진<br>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
@Operation(summary = "[A] 운영진 정보 삭제", description = "ROLE_ADMIN 이상의 권한이 필요함") | ||
@PreAuthorize("hasRole('ADMIN')") | ||
@DeleteMapping("/{id}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 API와 '운영진 정보 수정' API 모두 Path 변수의 명칭을 id
로 설정할 경우, 어떤 id
를 의미하는지 명확하지 않을 수 있어요. 다른 API와 일관성을 유지하면서 의미를 명확히 전달하기 위해 executiveId
로 변경할 것을 권장드려요.
@Override | ||
public Executive getById(String id) { | ||
ExecutiveJpaEntity jpaEntity = executiveRepository.findById(id) | ||
.orElseThrow(() -> new NotFoundException("학번이 " + id + "인 운영진이 존재하지 않습니다.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로깅 메시지의 통일성을 위해 [Executive] id: " + executiveId + "에 해당하는 운영진이 존재하지 않습니다.
로 수정 부탁드려요. 매개변수 명칭도 id
에서 executiveId
로 변경해주세요.
private String id; | ||
private String name; | ||
private String email; | ||
private String field; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 member
와 application
테이블에서 '관심 분야'를 나타내는 명칭으로 interests
를 사용하고 있어요. field
또는 interests
중 하나로 통일할 필요가 있어보여요.
Role.SUPER, | ||
Set.of("boards", "profiles", "activity-photos", "membership-fees", "notices", "weekly-activities", "members", | ||
"assignments", "submits") | ||
"assignments", "submits", "executives") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isUserAccessibleByCategory()
메서드에서 비로그인 사용자도 executives
경로에 접근할 수 있도록 허용하고 있지만, 현재 roleCategoryMap
에는 운영진 이상의 권한만 허용되어 있어요. GUEST
, USER
권한을 가진 사용자도 운영진 사진을 열람할 수 있도록 수정이 필요해요.
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 15 out of 30 changed files in this pull request and generated 1 comment.
Files not reviewed (15)
- src/main/java/page/clab/api/domain/memberManagement/executive/application/service/ExecutiveRetrievalService.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/service/ExecutiveRegisterService.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/service/ExecutiveUpdateService.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRegisterController.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/service/ExecutiveRemoveService.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRemoveController.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/port/in/UpdateExecutiveUseCase.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/port/in/RemoveExecutiveUseCase.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/port/in/RetrieveExecutiveUseCase.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/domain/Executive.java: Evaluated as low risk
- src/main/java/page/clab/api/global/common/file/api/FileController.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/exception/ExecutiveRegistrationException.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/port/in/RegisterExecutiveUseCase.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/dto/mapper/ExecutiveDtoMapper.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/dto/request/ExecutiveUpdateRequestDto.java: Evaluated as low risk
private String name; | ||
|
||
@NotNull(message = "{notNull.executive.email}") | ||
@Schema(description = "이메일", example = "[email protected]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the email example: "[email protected]" should be "[email protected]".
@Schema(description = "이메일", example = "clab.coreteam@gamil.com") | |
@Schema(description = "이메일", example = "clab.coreteam@gmail.com") |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Position 테이블이 멤버의 직책을 담당하는 것이라고 알고 있었는데, 직책 중 일반 회원, 코어팀도 포함되어 있어 운영진 정보만(회장, 부회장, 운영진) 관리하는 테이블을 하나 더 만들도록 했었습니다. 그런데 다시 보니 겹치는 부분이 상당히 많고, 직책 등록이 더욱 포괄적인 것 같아 |
Summary
효율적인 운영진 정보 관리를 위해, 운영진 CRUD를 구현했습니다.
Tasks
ETC
MemberManagement
카테고리의Executive
도메인을 새로 만들었습니다.현재
Member
entity처럼, PK가 학번인 경우 그 값은 고유하고 변경되지 않기 때문에Executive
의 PK도 학번(id)으로 설정했으며, 이 값은 변경할 수 없도록 했습니다.운영진 직급을 회장,부회장과 같은 문자열로 처리하려고 했으나, 유지보수의 용이성을 위해
Enum
으로 관리하도록 했습니다.정렬 순서는 PRESIDENT -> VICE_PRESIDENT -> GENERAL(학번 순) 입니다.
Screenshot