diff --git a/VamPa/src/main/java/com/vam/controller/AdminController.java b/VamPa/src/main/java/com/vam/controller/AdminController.java index 0d5a665..5961bd3 100644 --- a/VamPa/src/main/java/com/vam/controller/AdminController.java +++ b/VamPa/src/main/java/com/vam/controller/AdminController.java @@ -7,6 +7,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; @@ -84,6 +85,20 @@ public class AdminController { return "redirect:/admin/authorManage"; } + + /* 작가 상세 페이지 */ + @GetMapping("/authorDetail") + public void authorGetInfoGET(int authorId, Criteria cri, Model model) throws Exception { + logger.info("authorDetail......." + authorId); + + /* 작가 관리 페이지 정보 */ + model.addAttribute("cri", cri); + + /* 선택 작가 정보 */ + model.addAttribute("authorInfo", authorService.authorGetDetail(authorId)); + + } + } diff --git a/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java b/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java index 75a22b7..8b25127 100644 --- a/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java +++ b/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java @@ -16,4 +16,7 @@ public interface AuthorMapper { /* 작가 총 수 */ public int authorGetTotal(Criteria cri); + /* 작가 상세 */ + public AuthorVO authorGetDetail(int authorId); + } diff --git a/VamPa/src/main/java/com/vam/service/AuthorService.java b/VamPa/src/main/java/com/vam/service/AuthorService.java index ab8493c..284ea9b 100644 --- a/VamPa/src/main/java/com/vam/service/AuthorService.java +++ b/VamPa/src/main/java/com/vam/service/AuthorService.java @@ -16,4 +16,7 @@ public interface AuthorService { /* 작가 총 수 */ public int authorGetTotal(Criteria cri) throws Exception; + /* 작가 상세 페이지 */ + public AuthorVO authorGetDetail(int authorId) throws Exception; + } diff --git a/VamPa/src/main/java/com/vam/service/AuthorServiceImpl.java b/VamPa/src/main/java/com/vam/service/AuthorServiceImpl.java index 6aeb2fe..cb5f44c 100644 --- a/VamPa/src/main/java/com/vam/service/AuthorServiceImpl.java +++ b/VamPa/src/main/java/com/vam/service/AuthorServiceImpl.java @@ -43,4 +43,11 @@ public class AuthorServiceImpl implements AuthorService { return authorMapper.authorGetTotal(cri); } + /* 작가 상세 페이지 */ + @Override + public AuthorVO authorGetDetail(int authorId) throws Exception { + log.info("authorGetDetail........" + authorId); + return authorMapper.authorGetDetail(authorId); + } + } diff --git a/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml b/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml index a48cbe7..b6a306d 100644 --- a/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml +++ b/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml @@ -17,7 +17,7 @@ - + + + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp new file mode 100644 index 0000000..68997eb --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/authorDetail.jsp @@ -0,0 +1,118 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> + + +
+ +