-
Notifications
You must be signed in to change notification settings - Fork 2
20260125 #204 회원 엔티티 구조 및 회원가입 로직 개선 #205
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
Merged
The head ref may contain hidden characters: "20260125_#204_\uD68C\uC6D0_\uC5D4\uD2F0\uD2F0_\uAD6C\uC870_\uBC0F_\uD68C\uC6D0\uAC00\uC785_\uB85C\uC9C1_\uAC1C\uC120"
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9913e7f
[BE] [REFACTOR] 회원 엔티티 구조 리팩터링, oauth2 관련 클래스 패키지 변경
discipline24 87a0956
[BE] [REFACTOR] 가독성을 위한 패키지 구조 리팩터링
discipline24 0883949
[BE] [REFACTOR] 폴더 구조 및 2차 리팩토링
discipline24 35ab9ce
[BE] [FEAT] 기존 회원 관련 메서드 리팩토링
discipline24 751ba5f
[BE] [FEAT] 스켈레톤 코드 추가 및 유지보수성 향상
discipline24 0829404
[BE] [FIX] 오류 수정
discipline24 8125c9d
[BE] [FIX] 토끼 리뷰 반영
discipline24 870405b
[BE] [FIX] 토끼리뷰 반영
discipline24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/org/sejongisc/backend/admin/controller/AdminAttendanceController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package org.sejongisc.backend.admin.controller; | ||
|
|
||
| public class AdminAttendanceController { | ||
| } |
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/org/sejongisc/backend/admin/controller/AdminBoardController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package org.sejongisc.backend.admin.controller; | ||
|
|
||
| public class AdminBoardController { | ||
| } |
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/org/sejongisc/backend/admin/controller/AdminDashboardController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package org.sejongisc.backend.admin.controller; | ||
|
|
||
| public class AdminDashboardController { | ||
| } |
4 changes: 4 additions & 0 deletions
4
backend/src/main/java/org/sejongisc/backend/admin/controller/AdminPointController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package org.sejongisc.backend.admin.controller; | ||
|
|
||
| public class AdminPointController { | ||
| } |
78 changes: 78 additions & 0 deletions
78
backend/src/main/java/org/sejongisc/backend/admin/controller/AdminUserController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| package org.sejongisc.backend.admin.controller; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Operation; | ||
| import io.swagger.v3.oas.annotations.tags.Tag; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.sejongisc.backend.admin.dto.AdminUserRequest; | ||
| import org.sejongisc.backend.user.dto.UserInfoResponse; // 기존 DTO 활용 | ||
| import org.sejongisc.backend.user.entity.Role; | ||
| import org.sejongisc.backend.user.entity.UserStatus; | ||
| import org.sejongisc.backend.user.service.UserService; | ||
| import org.springframework.http.MediaType; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.security.access.prepost.PreAuthorize; | ||
| import org.springframework.web.bind.annotation.*; | ||
| import org.springframework.web.multipart.MultipartFile; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.UUID; | ||
|
|
||
| @RestController | ||
| @RequiredArgsConstructor | ||
| @RequestMapping("/api/admin/users") | ||
| @Tag(name = "관리자 API", description = "운영진 및 개발자용 회원 관리 API") | ||
| public class AdminUserController { | ||
|
|
||
| private final UserService userService; | ||
|
|
||
| // --- [회장/운영진용] 회원 관리 API --- | ||
|
|
||
| @Operation(summary = "엑셀 명단 업로드 및 동기화", description = "엑셀 파일을 업로드하여 신규 회원을 등록하고, 기존 회원의 기수/직위를 갱신합니다.") | ||
| @PostMapping(value = "/upload-excel", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) | ||
| @PreAuthorize("hasAnyRole('PRESIDENT', 'SYSTEM_ADMIN')") // 회장, 개발자만 가능 | ||
| public ResponseEntity<?> uploadMemberExcel(@RequestPart("file") MultipartFile file) { | ||
| // 엑셀 파싱 및 DB 동기화 결과 반환 | ||
| //ExcelSyncResultDto result = adminUserService.syncMembersFromExcel(file); | ||
| //return ResponseEntity.ok(result); | ||
| return null; | ||
| } | ||
|
|
||
| @Operation(summary = "전체 회원 목록 조회", description = "모든 회원의 정보를 조회합니다. (회장/관리자용)") | ||
| @GetMapping("") | ||
| @PreAuthorize("hasAnyRole('SYSTEM_ADMIN', 'MANAGER')") | ||
| public ResponseEntity<List<UserInfoResponse>> getAllUsers(@RequestBody AdminUserRequest request) { | ||
| //return ResponseEntity.ok(userService.findAllUsers()); // TODO : 전체 조회, 기수별 조회, 이름 검색 등 기능 추가 (페이징은 추후 고려) | ||
| return null; | ||
| } | ||
discipline24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @Operation(summary = "회원 활동 상태 변경", description = "ACTIVE, INACTIVE, GRADUATED 등으로 상태를 변경합니다.") | ||
| @PatchMapping("/{userId}/status") | ||
| @PreAuthorize("hasAnyRole('SYSTEM_ADMIN', 'MANAGER')") | ||
| public ResponseEntity<?> updateUserStatus( | ||
| @PathVariable UUID userId, | ||
| @RequestParam UserStatus status) { | ||
| //userService.updateUserStatus(userId, status); | ||
| return ResponseEntity.ok(Map.of("message", "사용자 상태가 " + status + "(으)로 변경되었습니다.")); | ||
| } | ||
|
|
||
| // --- [시스템 관리자용 or 회장용] 권한 및 계정 제어 API --- | ||
| // TODO : 회장 권한 논의 필요 | ||
| @Operation(summary = "회원 권한 변경", description = "특정 유저의 Role(PRESIDENT, VICE_PRESIDENT, TEAM_LEADER)을 변경합니다.)") | ||
| @PatchMapping("/{userId}/role") | ||
| @PreAuthorize("hasRole('SYSTEM_ADMIN')") | ||
| public ResponseEntity<?> updateUserRole( | ||
| @PathVariable UUID userId, | ||
| @RequestParam Role role) { | ||
| //userService.updateUserRole(userId, role); | ||
| return ResponseEntity.ok(Map.of("message", "사용자 권한이 " + role + "(으)로 변경되었습니다.")); | ||
| } | ||
|
|
||
| @Operation(summary = "회원 강제 탈퇴", description = "시스템에서 유저를 완전히 삭제합니다. (시스템 관리자용)") | ||
| @DeleteMapping("/{userId}") | ||
| @PreAuthorize("hasRole('SYSTEM_ADMIN')") | ||
| public ResponseEntity<?> forceDeleteUser(@PathVariable UUID userId) { | ||
| //userService.deleteUserWithOauth(userId); | ||
| return ResponseEntity.ok(Map.of("message", "해당 사용자가 시스템에서 완전히 삭제되었습니다.")); | ||
| } | ||
discipline24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
5 changes: 5 additions & 0 deletions
5
backend/src/main/java/org/sejongisc/backend/admin/dto/AdminUserRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package org.sejongisc.backend.admin.dto; | ||
|
|
||
| public class AdminUserRequest { | ||
|
|
||
| } | ||
discipline24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
backend/src/main/java/org/sejongisc/backend/attendance/util/AuthUserUtil.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.