-
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
테이블을 생성한 적이 있어요. 이번에 작성된 부분과 일부 겹치는 내용이 있어, 두 도메인 중 하나를 삭제하고 통합하는 것이 더 효율적일 것 같아요.
...e/clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRegisterController.java
Outdated
Show resolved
Hide resolved
...age/clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveRemoveController.java
Outdated
Show resolved
Hide resolved
...i/domain/memberManagement/executive/adapter/out/persistence/ExecutivePersistenceAdapter.java
Outdated
Show resolved
Hide resolved
src/main/java/page/clab/api/domain/memberManagement/executive/domain/Executive.java
Outdated
Show resolved
Hide resolved
src/main/java/page/clab/api/global/common/file/application/FileService.java
Show resolved
Hide resolved
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.
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.
@SongJaeHoonn 오탈자 수정 부탁드려요
Position 테이블이 멤버의 직책을 담당하는 것이라고 알고 있었는데, 직책 중 일반 회원, 코어팀도 포함되어 있어 운영진 정보만(회장, 부회장, 운영진) 관리하는 테이블을 하나 더 만들도록 했었습니다. 그런데 다시 보니 겹치는 부분이 상당히 많고, 직책 등록이 더욱 포괄적인 것 같아 |
...e/clab/api/domain/memberManagement/executive/adapter/out/persistence/ExecutiveJpaEntity.java
Show resolved
Hide resolved
Executive 도메인을 삭제하고 Position에 운영진 정보를 등록하고 조회하는 로직을 추가하려고 했으나,
그 이유는, 따라서, 검토해주시면 감사하겠습니다!! |
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.
운영진의 기존 서비스 가입 정보를 배제하고 새로 입력받아 랜딩 페이지에 게시하려는 것으로 이해했는데, 제가 해석한 내용이 맞는지 확인 부탁드려요.
랜딩 페이지에 게시되는 정보는 프로필 사진 정도만 변경되고, 학번, 이름, 이메일, 관심 분야 등 나머지 정보는 기존 가입 정보와 동일하게 유지되는 것이 더 적절하지 않을까 싶어요.
"PRESIDENT", 1, | ||
"VICE_PRESIDENT", 2, | ||
"OPERATION", 3 | ||
); |
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.
Enum 상수 값을 외부에서 하드코딩하여 사용하는 방식은 변경 사항이 생겼을 때 문제를 일으킬 가능성이 있어요. 예를 들어, ExecutivePosition
에 새로운 값이 추가되거나 기존 값이 변경되었을 때, PRIORITY
와 같은 별도의 맵을 수정하지 않으면 데이터 불일치로 인해 의도하지 않은 동작이 발생할 수 있어요.
대안으로, Enum 내부에 우선순위 정보를 포함시키는 방식을 제안해요.
제안
package page.clab.api.domain.memberManagement.executive.domain;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ExecutivePosition {
PRESIDENT("PRESIDENT", "회장", 1),
VICE_PRESIDENT("VICE_PRESIDENT", "부회장", 2),
GENERAL("GENERAL", "일반 운영진", 3);
private final String key;
private final String description;
private final int priority;
public static int getPriorityByKey(String key) {
for (ExecutivePosition position : values()) {
if (position.getKey().equals(key)) {
return position.getPriority();
}
}
throw new IllegalArgumentException("Invalid ExecutivePosition key: " + key);
}
}
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.
enum
이 수정이 되면 Map도 바뀌어야 하는데 일일이 찾아서 바꾸기 어렵겠네요,, 좋은 지적 감사합니다!
다만 ExecutivePosition
은 삭제하고 PositionType
을 사용하고 있어서, 방법 강구해서 수정해보도록 하겠습니다.
일단, 현재 랜딩페이지에서 관리되고 있는 운영진 정보는 클라이언트에서 관리되고 있습니다. 운영진 정보를 받을 때, 운영진들에게 프로필 사진과 이메일 등을 전달받는 것으로 알고 있었습니다. 또한 운영진 관리 기능을 구현할 때, 기존 가입 정보와 운영진 정보를 일치시키는 것을 생각하고 있긴 했습니다. 물론 이름이나 학번과 같은 경우에는 달라질 일이 없지만, 공공연하게 보여지는 이메일을 바꾸거나 관심분야를 다르게 설정할 수도 있지 않을까 싶어 함께 묶어 등록할 수 있도록 구현해 둔 것이었습니다. 이러한 이유로 |
해당 부분은 운영진 분들과도 논의해보는게 좋을 것 같아요. 실제로 이 기능을 이용하는 사용자는 운영진이니까요. |
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 20 out of 35 changed files in this pull request and generated 1 comment.
Files not reviewed (15)
- src/main/java/page/clab/api/domain/memberManagement/position/domain/PositionType.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/ExecutiveRetrievalController.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/adapter/in/web/ExecutiveUpdateController.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/external/memberManagement/position/application/port/ExternalRetrievePositionUseCase.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/domain/Executive.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/ExecutiveUpdateService.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/ExecutiveRetrievalService.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/UpdateExecutiveUseCase.java: Evaluated as low risk
- src/main/java/page/clab/api/domain/memberManagement/executive/application/port/in/RemoveExecutiveUseCase.java: Evaluated as low risk
@Schema(description = "이름", example = "홍길동") | ||
private String name; | ||
|
||
@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.
The example email provided in the Schema annotation has a typo: '[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.
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.
코파일럿에서 지적한 이메일 오탈자만 수정되면, 추가적으로 수정할 부분은 없을 것 같습니다.
Summary
효율적인 운영진 정보 관리를 위해, 운영진 CRUD를 구현했습니다.
Tasks
ETC
MemberManagement
카테고리의Executive
도메인을 새로 만들었습니다.현재
Member
entity처럼, PK가 학번인 경우 그 값은 고유하고 변경되지 않기 때문에Executive
의 PK도 학번(id)으로 설정했으며, 이 값은 변경할 수 없도록 했습니다.운영진 직급을 회장,부회장과 같은 문자열로 처리하려고 했으나, 유지보수의 용이성을 위해
Enum
으로 관리하도록 했습니다.정렬 순서는 PRESIDENT -> VICE_PRESIDENT -> GENERAL(학번 순) 입니다.
Screenshot