diff --git a/src/main/java/kr/tgwing/tech/admin/controller/AdminController.java b/src/main/java/kr/tgwing/tech/admin/controller/AdminController.java index 878874f..6d7ff9f 100644 --- a/src/main/java/kr/tgwing/tech/admin/controller/AdminController.java +++ b/src/main/java/kr/tgwing/tech/admin/controller/AdminController.java @@ -30,7 +30,7 @@ public ResponseEntity>> checkAllAssignments( @PageableDefault Pageable pageable, @ModelAttribute StudentQuery studentQuery ) { - Page allAssignments = adminService.checkAssingments(studentQuery, pageable); + Page allAssignments = adminService.checkAssignments(studentQuery, pageable); return ResponseEntity.ok(ApiResponse.ok(allAssignments)); } @@ -59,7 +59,6 @@ public ResponseEntity> refuseAssignment(@PathVariable("id") Lo } - @Operation(summary = "동아리원 강제 삭제") @DeleteMapping("/stdent/{id}") public ResponseEntity> deleteStudent(@PathVariable Long id) { diff --git a/src/main/java/kr/tgwing/tech/admin/dto/AdminCheckUserDto.java b/src/main/java/kr/tgwing/tech/admin/dto/AdminCheckUserDto.java index 4914502..7377e04 100644 --- a/src/main/java/kr/tgwing/tech/admin/dto/AdminCheckUserDto.java +++ b/src/main/java/kr/tgwing/tech/admin/dto/AdminCheckUserDto.java @@ -6,6 +6,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; +import java.time.LocalDate; + @Getter @Builder @NoArgsConstructor @@ -15,6 +17,7 @@ public class AdminCheckUserDto { private String studentNumber; private String email; private String name; + private LocalDate birth; private String phoneNumber; public static AdminCheckUserDto of(TempUser tempUser) { @@ -23,6 +26,7 @@ public static AdminCheckUserDto of(TempUser tempUser) { .studentNumber(tempUser.getStudentNumber()) .email(tempUser.getEmail()) .name(tempUser.getName()) + .birth(tempUser.getBirth()) .phoneNumber(tempUser.getPhoneNumber()) .build(); } diff --git a/src/main/java/kr/tgwing/tech/admin/service/AdminService.java b/src/main/java/kr/tgwing/tech/admin/service/AdminService.java index 6b74be4..0fbb7bb 100644 --- a/src/main/java/kr/tgwing/tech/admin/service/AdminService.java +++ b/src/main/java/kr/tgwing/tech/admin/service/AdminService.java @@ -31,7 +31,7 @@ public class AdminService { private final TempUserRepository tempUserRepository; private final PostRepository postRepository; - public Page checkAssingments(StudentQuery studentQuery, Pageable pageable) { + public Page checkAssignments(StudentQuery studentQuery, Pageable pageable) { Specification spec = UserSpecification.hasKeywordInTempUser(studentQuery.getKeyword()); Page allAssignments = tempUserRepository.findAll(spec, pageable); if(allAssignments.isEmpty()) return null; // 여기 값은 예외로 보내야하느건지, 어떻게 보내야하는거지? @@ -67,7 +67,7 @@ public Long registerUsers(Long studentId) { public Long refuseUsers(Long studentId) { TempUser user = tempUserRepository.findById(studentId).orElseThrow(UserNotFoundException::new); - userRepository.deleteById(studentId); + tempUserRepository.deleteById(studentId); return user.getStudentId(); }