From 8edc7827cba02ddc6b805a9b7421ab977d6b88e0 Mon Sep 17 00:00:00 2001 From: Anna-Jin Date: Fri, 15 Jul 2022 16:43:08 +0900 Subject: [PATCH] =?UTF-8?q?#30=20[Update]=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B5=AC=ED=98=84=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/AdminController.java | 20 +++++++++++++++++++ .../admin/repository/AdminRepository.java | 9 --------- .../baechelin/admin/service/AdminService.java | 8 ++++++++ 3 files changed, 28 insertions(+), 9 deletions(-) delete mode 100644 src/main/java/com/mpnp/baechelin/admin/repository/AdminRepository.java diff --git a/src/main/java/com/mpnp/baechelin/admin/controller/AdminController.java b/src/main/java/com/mpnp/baechelin/admin/controller/AdminController.java index 8d602bd..0a286a8 100644 --- a/src/main/java/com/mpnp/baechelin/admin/controller/AdminController.java +++ b/src/main/java/com/mpnp/baechelin/admin/controller/AdminController.java @@ -1,9 +1,29 @@ package com.mpnp.baechelin.admin.controller; +import com.mpnp.baechelin.admin.dto.AdminResponseDto; +import com.mpnp.baechelin.admin.service.AdminService; +import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; +import org.springframework.security.core.annotation.AuthenticationPrincipal; +import org.springframework.security.core.userdetails.User; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor +@RequestMapping("/admin") public class AdminController { + + private final AdminService adminService; + + // TODO 관리자 로그인 구현 + + @ApiOperation(value = "유저가 등록한 업장을 관리자 페이지에서 조회하는 메소드") + @GetMapping("/approval") + public AdminResponseDto getApprovalStoreList( + @AuthenticationPrincipal User user + ) { + return null; + } } diff --git a/src/main/java/com/mpnp/baechelin/admin/repository/AdminRepository.java b/src/main/java/com/mpnp/baechelin/admin/repository/AdminRepository.java deleted file mode 100644 index b390970..0000000 --- a/src/main/java/com/mpnp/baechelin/admin/repository/AdminRepository.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mpnp.baechelin.admin.repository; - -import com.mpnp.baechelin.store.domain.UserRegisterStore; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface AdminRepository extends JpaRepository { -} diff --git a/src/main/java/com/mpnp/baechelin/admin/service/AdminService.java b/src/main/java/com/mpnp/baechelin/admin/service/AdminService.java index 7bb0819..72261c7 100644 --- a/src/main/java/com/mpnp/baechelin/admin/service/AdminService.java +++ b/src/main/java/com/mpnp/baechelin/admin/service/AdminService.java @@ -1,9 +1,17 @@ package com.mpnp.baechelin.admin.service; +import com.mpnp.baechelin.admin.dto.AdminResponseDto; +import com.mpnp.baechelin.store.repository.UserRegisterStoreRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor public class AdminService { + + private final UserRegisterStoreRepository userRegisterStoreRepository; + + public AdminResponseDto getApprovalStoreList() { + return null; + } }