From 504401c43c71ee48817c899a987e118ec7920aed Mon Sep 17 00:00:00 2001 From: SeoJin Kim Date: Thu, 22 Apr 2021 00:45:23 +0900 Subject: [PATCH] =?UTF-8?q?[Spring][=EC=87=BC=ED=95=91=EB=AA=B0=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8][20]=20=EC=83=81=ED=92=88?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://kimvampa.tistory.com/205 https://kimvampa.tistory.com/204 https://kimvampa.tistory.com/203 --- .../com/vam/controller/AdminController.java | 20 ++ .../main/java/com/vam/mapper/AdminMapper.java | 3 + .../java/com/vam/service/AdminService.java | 3 + .../com/vam/service/AdminServiceImpl.java | 13 + .../resources/com/vam/mapper/AdminMapper.xml | 9 + .../WEB-INF/views/admin/goodsDetail.jsp | 289 ++++++++++++++++++ .../WEB-INF/views/admin/goodsManage.jsp | 17 +- .../resources/css/admin/goodsDetail.css | 268 ++++++++++++++++ .../java/com/vam/mapper/AdminMapperTests.java | 24 +- .../classes/com/vam/mapper/AdminMapper.xml | 9 + .../maven/com.vam/controller/pom.properties | 2 +- .../com/vam/controller/AdminController.java | 20 ++ .../main/java/com/vam/mapper/AdminMapper.java | 3 + .../java/com/vam/service/AdminService.java | 3 + .../com/vam/service/AdminServiceImpl.java | 9 + .../resources/com/vam/mapper/AdminMapper.xml | 9 +- .../WEB-INF/views/admin/goodsDetail.jsp | 289 ++++++++++++++++++ .../WEB-INF/views/admin/goodsManage.jsp | 17 +- .../resources/css/admin/goodsDetail.css | 268 ++++++++++++++++ .../java/com/vam/mapper/AdminMapperTests.java | 40 ++- .../classes/com/vam/mapper/AdminMapper.xml | 9 +- .../maven/com.vam/controller/pom.properties | 2 +- 22 files changed, 1302 insertions(+), 24 deletions(-) create mode 100644 VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp create mode 100644 VamPa/src/main/webapp/resources/css/admin/goodsDetail.css create mode 100644 VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp create mode 100644 VamPa_MySQL/src/main/webapp/resources/css/admin/goodsDetail.css diff --git a/VamPa/src/main/java/com/vam/controller/AdminController.java b/VamPa/src/main/java/com/vam/controller/AdminController.java index b8ba3c6..44bdeb2 100644 --- a/VamPa/src/main/java/com/vam/controller/AdminController.java +++ b/VamPa/src/main/java/com/vam/controller/AdminController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.vam.model.AuthorVO; import com.vam.model.BookVO; @@ -81,6 +82,25 @@ public class AdminController { } + /* 상품 조회 페이지 */ + @GetMapping("/goodsDetail") + public void goodsGetInfoGET(int bookId, Criteria cri, Model model) throws JsonProcessingException { + + logger.info("goodsGetInfo()........." + bookId); + + ObjectMapper mapper = new ObjectMapper(); + + /* 카테고리 리스트 데이터 */ + model.addAttribute("cateList", mapper.writeValueAsString(adminService.cateList())); + + /* 목록 페이지 조건 정보 */ + model.addAttribute("cri", cri); + + /* 조회 페이지 정보 */ + model.addAttribute("goodsInfo", adminService.goodsGetDetail(bookId)); + + } + /* 작가 등록 페이지 접속 */ @RequestMapping(value = "authorEnroll", method = RequestMethod.GET) public void authorEnrollGET() throws Exception{ diff --git a/VamPa/src/main/java/com/vam/mapper/AdminMapper.java b/VamPa/src/main/java/com/vam/mapper/AdminMapper.java index dbd2734..57a4307 100644 --- a/VamPa/src/main/java/com/vam/mapper/AdminMapper.java +++ b/VamPa/src/main/java/com/vam/mapper/AdminMapper.java @@ -20,4 +20,7 @@ public interface AdminMapper { /* 상품 총 개수 */ public int goodsGetTotal(Criteria cri); + /* 상품 조회 페이지 */ + public BookVO goodsGetDetail(int bookId); + } diff --git a/VamPa/src/main/java/com/vam/service/AdminService.java b/VamPa/src/main/java/com/vam/service/AdminService.java index 1a73b50..4a6de88 100644 --- a/VamPa/src/main/java/com/vam/service/AdminService.java +++ b/VamPa/src/main/java/com/vam/service/AdminService.java @@ -20,4 +20,7 @@ public interface AdminService { /* 상품 총 개수 */ public int goodsGetTotal(Criteria cri); + /* 상품 조회 페이지 */ + public BookVO goodsGetDetail(int bookId); + } diff --git a/VamPa/src/main/java/com/vam/service/AdminServiceImpl.java b/VamPa/src/main/java/com/vam/service/AdminServiceImpl.java index 036a874..f6157f7 100644 --- a/VamPa/src/main/java/com/vam/service/AdminServiceImpl.java +++ b/VamPa/src/main/java/com/vam/service/AdminServiceImpl.java @@ -41,14 +41,27 @@ public class AdminServiceImpl implements AdminService { /* 상품 리스트 */ @Override public List goodsGetList(Criteria cri) { + log.info("goodsGetTotalList().........."); + return adminMapper.goodsGetList(cri); } /* 상품 총 갯수 */ public int goodsGetTotal(Criteria cri) { + log.info("goodsGetTotal()........."); + return adminMapper.goodsGetTotal(cri); } + /* 상품 조회 페이지 */ + @Override + public BookVO goodsGetDetail(int bookId) { + + log.info("(service)bookGetDetail......." + bookId); + + return adminMapper.goodsGetDetail(bookId); + } + } diff --git a/VamPa/src/main/resources/com/vam/mapper/AdminMapper.xml b/VamPa/src/main/resources/com/vam/mapper/AdminMapper.xml index e15007f..5e6afd7 100644 --- a/VamPa/src/main/resources/com/vam/mapper/AdminMapper.xml +++ b/VamPa/src/main/resources/com/vam/mapper/AdminMapper.xml @@ -57,4 +57,13 @@ + + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp new file mode 100644 index 0000000..66989d2 --- /dev/null +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp @@ -0,0 +1,289 @@ +<%@ 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"%> + + + + +Insert title here + + + + + + <%@include file="../includes/admin/header.jsp" %> +
+
상품 상세
+ +
+ +
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+
+ 대분류 + +
+
+ 중분류 + +
+
+ 소분류 + +
+
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+ + +
+
+ + +
+ + + +
+ +
+ <%@include file="../includes/admin/footer.jsp" %> + + + + + \ No newline at end of file diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp index b7fae9f..f82dba6 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp @@ -38,7 +38,11 @@ - + + + + + @@ -155,6 +159,17 @@ $(".pageMaker_btn a").on("click", function(e){ }); +/* 상품 조회 페이지 */ +$(".move").on("click", function(e){ + + e.preventDefault(); + + moveForm.append(""); + moveForm.attr("action", "/admin/goodsDetail"); + moveForm.submit(); + + +}); diff --git a/VamPa/src/main/webapp/resources/css/admin/goodsDetail.css b/VamPa/src/main/webapp/resources/css/admin/goodsDetail.css new file mode 100644 index 0000000..0237bcc --- /dev/null +++ b/VamPa/src/main/webapp/resources/css/admin/goodsDetail.css @@ -0,0 +1,268 @@ +@charset "UTF-8"; +*{ + margin: 0; + padding:0; +} +a{ + text-decoration: none; +} + +ul{ + list-style: none; +} +/* 화면 전체 렙 */ +.wrapper{ + width: 100%; +} +/* content 랩 */ +.wrap{ + width : 1080px; + margin: auto; +} +/* 홈페이지 기능 네비 */ +.top_gnb_area{ + width: 100%; + height: 50px; + background-color: #f0f0f1; + position:relative; +} +.top_gnb_area .list{ + position: absolute; + top: 0px; + right: 0; + +} +.top_gnb_area .list li{ + list-style: none; + float : left; + padding: 13px 15px 0 10px; + font-weight: 900; + cursor: pointer; +} + +/* 관리제 페이지 상단 현페이지 정보 */ +.admin_top_wrap{ + height:110px; + line-height: 110px; + background-color: #5080bd; + margin-bottom: 15px; +} +.admin_top_wrap>span{ + margin-left: 30px; + display:inline-block; + color: white; + font-size: 50px; + font-weight: bolder; +} +/* 관리자 wrap(네비+컨텐츠) */ +.admin_wrap{ + + +} + +/* 관리자페이지 네비 영역 */ +.admin_navi_wrap{ + width: 20%; + height: 300px; + float:left; + height: 100%; +} +.admin_navi_wrap li{ + display: block; + height: 80px; + line-height: 80px; + text-align: center; +} +.admin_navi_wrap li a{ + display: block; + height: 100%; + width: 95%; + margin: 0 auto; + cursor: pointer; + font-size: 30px; + font-weight: bolder; +} +.admin_navi_wrap li a:link {color: black;} +.admin_navi_wrap li a:visited {color: black;} +.admin_navi_wrap li a:active {color: black;} +.admin_navi_wrap li a:hover {color: black;} + +.admin_list_02{ + background-color: #c8c8c8; +} + + +/* 관리자페이지 컨텐츠 영역 */ +.admin_content_wrap{ + width: 80%; + float:left; + min-height: 700px; +} +.admin_content_subject{ /* 관리자 컨텐츠 제목 영역 */ + font-size: 40px; + font-weight: bolder; + padding-left: 15px; + background-color: #6AAFE6; + height: 80px; + line-height: 80px; + color: white; +} + +/* 관리자 컨텐츠 메인 영역 */ +.form_section{ + width: 95%; + margin-left: 2%; + margin-top: 20px; + border: 1px solid #dbdde2; + background-color: #efefef; +} +.form_section_title{ + padding: 20px 35px; +} +.form_section_title label{ + display: block; + font-size: 20px; + font-weight: 800; +} +.form_section_content{ + padding: 20px 35px; + border-top: 1px solid #dbdde2; +} +.form_section_content input{ + width: 98%; + height: 25px; + font-size: 20px; + padding: 5px 1%; +} + + +.ui-datepicker-trigger { /* 캘린더 css 설정 */ + margin-left: 25px; + width: 14%; + height: 38px; + font-weight: 600; + background-color: #dfe8f5; + font-size: 15px; + cursor:pointer; +} + +.authorId_btn { /* 작가 선택 css 설정 */ + margin-left: 20px; + width: 14%; + height: 38px; + font-weight: 600; + background-color: #dfe8f5; + font-size: 15px; + cursor:pointer; +} + +.ck-content { /* ckeditor 높이 */ + height: 170px; +} + +/* 버튼 영역 */ +.btn_section{ + text-align: center; + margin: 80px 0; +} +.btn{ + min-width: 180px; + padding: 4px 30px; + font-size: 25px; + font-weight: 600; + line-height: 40px; +} +.enroll_btn{ + background-color: #dbdde2; + margin-left:15px; +} +#enrollBtn:hover { + background-color: #c9cbd0; +} + +.form_section_content select { /* 카테고리 css 설정 */ + width: 92%; + height: 35px; + font-size: 20px; + text-align-last: center; + margin-left: 5px; +} +.cate_wrap span { + font-weight: 600; +} +.cate_wrap:not(:first-child) { + margin-top: 20px; +} + + + + + + +/* footer navai 영역 */ +.footer_nav{ + width:100%; + height:50px; +} +.footer_nav_container{ + width: 100%; + height: 100%; + background-color:#8EC0E4; +} +.footer_nav_container>ul{ + font-weight : bold; + float:left; + list-style:none; + position:relative; + padding-top:10px; + line-height: 27px; + font-family: dotum; + margin-left: 10px; +} +.footer_nav_container>ul>li{ + display:inline; + width: 45px; + height: 19px; + padding: 10px 9px 0 10px; +} +.footer_nav_container>ul>span{ + margin: 0 4px; +} +/* footer 영역 */ +.footer{ + width:100%; + height:130px; + background-color:#D4DFE6; + padding-bottom : 50px; +} +.footer_container{ + width: 100%; + height: 100%; + margin: auto; +} +.footer_left>img { + width: 150%; + height: 130px; + margin-left: -20px; + margin-top: -12px; +} +.footer_left{ + float :left; + width: 170px; + margin-left: 20px; + margin-top : 30px; + +} +.footer_right{ + float :left; + width: 680px; + margin-left: 70px; + margin-top : 30px; +} + + + +/* float 속성 해제 */ +.clearfix{ + clear: both; +} \ No newline at end of file diff --git a/VamPa/src/test/java/com/vam/mapper/AdminMapperTests.java b/VamPa/src/test/java/com/vam/mapper/AdminMapperTests.java index b2f59f8..1b756dd 100644 --- a/VamPa/src/test/java/com/vam/mapper/AdminMapperTests.java +++ b/VamPa/src/test/java/com/vam/mapper/AdminMapperTests.java @@ -1,15 +1,13 @@ package com.vam.mapper; -import java.util.List; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.vam.model.Criteria; +import com.vam.model.BookVO; @RunWith(SpringJUnit4ClassRunner.class) @@ -52,7 +50,7 @@ public class AdminMapperTests { */ /* 상품 리스트 & 상품 총 개수*/ - /**/ + /* @Test public void goodsGetListTests() { @@ -60,7 +58,7 @@ public class AdminMapperTests { cri.setKeyword("test"); - /* 상품 리스트 */ + // 상품 리스트 List list = mapper.goodsGetList(cri); for(int i = 0; i < 10; i++) { System.out.println("result..........." +i + " : " + list.get(i) ); @@ -68,11 +66,25 @@ public class AdminMapperTests { - /* 상품 총 개수 */ + /// 상품 총 개수 //int result = mapper.goodsGetTotal(cri); //System.out.println("resout........." + result); } + */ + + /* 상품 조회 페이지 */ + @Test + public void goodsGetDetailTest() { + + int bookId = 150; + + BookVO result = mapper.goodsGetDetail(bookId); + + System.out.println("상품 조회 데이터 : " + result); + + + } } diff --git a/VamPa/target/classes/com/vam/mapper/AdminMapper.xml b/VamPa/target/classes/com/vam/mapper/AdminMapper.xml index e15007f..5e6afd7 100644 --- a/VamPa/target/classes/com/vam/mapper/AdminMapper.xml +++ b/VamPa/target/classes/com/vam/mapper/AdminMapper.xml @@ -57,4 +57,13 @@ + + + \ No newline at end of file diff --git a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index 71de743..04ba297 100644 --- a/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Tue Apr 13 13:59:44 KST 2021 +#Mon Apr 19 22:02:04 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa m2e.projectName=VamPa groupId=com.vam diff --git a/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java b/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java index 3823a88..c6857dc 100644 --- a/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java +++ b/VamPa_MySQL/src/main/java/com/vam/controller/AdminController.java @@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.vam.model.AuthorVO; import com.vam.model.BookVO; @@ -81,6 +82,25 @@ public class AdminController { } + /* 상품 조회 페이지 */ + @GetMapping("/goodsDetail") + public void goodsGetInfoGET(int bookId, Criteria cri, Model model) throws JsonProcessingException { + + logger.info("goodsGetInfo()........." + bookId); + + ObjectMapper mapper = new ObjectMapper(); + + /* 카테고리 리스트 데이터 */ + model.addAttribute("cateList", mapper.writeValueAsString(adminService.cateList())); + + /* 목록 페이지 조건 정보 */ + model.addAttribute("cri", cri); + + /* 조회 페이지 정보 */ + model.addAttribute("goodsInfo", adminService.goodsGetDetail(bookId)); + + } + /* 작가 등록 페이지 접속 */ @RequestMapping(value = "authorEnroll", method = RequestMethod.GET) public void authorEnrollGET() throws Exception{ diff --git a/VamPa_MySQL/src/main/java/com/vam/mapper/AdminMapper.java b/VamPa_MySQL/src/main/java/com/vam/mapper/AdminMapper.java index f2c410f..d99dc72 100644 --- a/VamPa_MySQL/src/main/java/com/vam/mapper/AdminMapper.java +++ b/VamPa_MySQL/src/main/java/com/vam/mapper/AdminMapper.java @@ -21,4 +21,7 @@ public interface AdminMapper { /* 상품 총 개수 */ public int goodsGetTotal(Criteria cri); + /* 상품 조회 페이지 */ + public BookVO goodsGetDetail(int bookId); + } diff --git a/VamPa_MySQL/src/main/java/com/vam/service/AdminService.java b/VamPa_MySQL/src/main/java/com/vam/service/AdminService.java index eed7765..3ddf17f 100644 --- a/VamPa_MySQL/src/main/java/com/vam/service/AdminService.java +++ b/VamPa_MySQL/src/main/java/com/vam/service/AdminService.java @@ -20,4 +20,7 @@ public interface AdminService { /* 상품 총 개수 */ public int goodsGetTotal(Criteria cri); + /* 상품 조회 페이지 */ + public BookVO goodsGetDetail(int bookId); + } diff --git a/VamPa_MySQL/src/main/java/com/vam/service/AdminServiceImpl.java b/VamPa_MySQL/src/main/java/com/vam/service/AdminServiceImpl.java index 3b75edf..2a1f4a0 100644 --- a/VamPa_MySQL/src/main/java/com/vam/service/AdminServiceImpl.java +++ b/VamPa_MySQL/src/main/java/com/vam/service/AdminServiceImpl.java @@ -51,4 +51,13 @@ public class AdminServiceImpl implements AdminService { return adminMapper.goodsGetTotal(cri); } + /* 상품 조회 페이지 */ + @Override + public BookVO goodsGetDetail(int bookId) { + + log.info("(service)bookGetDetail......." + bookId); + + return adminMapper.goodsGetDetail(bookId); + } + } diff --git a/VamPa_MySQL/src/main/resources/com/vam/mapper/AdminMapper.xml b/VamPa_MySQL/src/main/resources/com/vam/mapper/AdminMapper.xml index 67234e9..cfe37a0 100644 --- a/VamPa_MySQL/src/main/resources/com/vam/mapper/AdminMapper.xml +++ b/VamPa_MySQL/src/main/resources/com/vam/mapper/AdminMapper.xml @@ -47,6 +47,13 @@ - + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp new file mode 100644 index 0000000..66989d2 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp @@ -0,0 +1,289 @@ +<%@ 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"%> + + + + +Insert title here + + + + + + <%@include file="../includes/admin/header.jsp" %> +
+
상품 상세
+ +
+ +
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+
+ 대분류 + +
+
+ 중분류 + +
+
+ 소분류 + +
+
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ " disabled> +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+ + +
+
+ + +
+ + + +
+ +
+ <%@include file="../includes/admin/footer.jsp" %> + + + + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp index b7fae9f..f82dba6 100644 --- a/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsManage.jsp @@ -38,7 +38,11 @@ - + + + + + @@ -155,6 +159,17 @@ $(".pageMaker_btn a").on("click", function(e){ }); +/* 상품 조회 페이지 */ +$(".move").on("click", function(e){ + + e.preventDefault(); + + moveForm.append(""); + moveForm.attr("action", "/admin/goodsDetail"); + moveForm.submit(); + + +}); diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsDetail.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsDetail.css new file mode 100644 index 0000000..0237bcc --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsDetail.css @@ -0,0 +1,268 @@ +@charset "UTF-8"; +*{ + margin: 0; + padding:0; +} +a{ + text-decoration: none; +} + +ul{ + list-style: none; +} +/* 화면 전체 렙 */ +.wrapper{ + width: 100%; +} +/* content 랩 */ +.wrap{ + width : 1080px; + margin: auto; +} +/* 홈페이지 기능 네비 */ +.top_gnb_area{ + width: 100%; + height: 50px; + background-color: #f0f0f1; + position:relative; +} +.top_gnb_area .list{ + position: absolute; + top: 0px; + right: 0; + +} +.top_gnb_area .list li{ + list-style: none; + float : left; + padding: 13px 15px 0 10px; + font-weight: 900; + cursor: pointer; +} + +/* 관리제 페이지 상단 현페이지 정보 */ +.admin_top_wrap{ + height:110px; + line-height: 110px; + background-color: #5080bd; + margin-bottom: 15px; +} +.admin_top_wrap>span{ + margin-left: 30px; + display:inline-block; + color: white; + font-size: 50px; + font-weight: bolder; +} +/* 관리자 wrap(네비+컨텐츠) */ +.admin_wrap{ + + +} + +/* 관리자페이지 네비 영역 */ +.admin_navi_wrap{ + width: 20%; + height: 300px; + float:left; + height: 100%; +} +.admin_navi_wrap li{ + display: block; + height: 80px; + line-height: 80px; + text-align: center; +} +.admin_navi_wrap li a{ + display: block; + height: 100%; + width: 95%; + margin: 0 auto; + cursor: pointer; + font-size: 30px; + font-weight: bolder; +} +.admin_navi_wrap li a:link {color: black;} +.admin_navi_wrap li a:visited {color: black;} +.admin_navi_wrap li a:active {color: black;} +.admin_navi_wrap li a:hover {color: black;} + +.admin_list_02{ + background-color: #c8c8c8; +} + + +/* 관리자페이지 컨텐츠 영역 */ +.admin_content_wrap{ + width: 80%; + float:left; + min-height: 700px; +} +.admin_content_subject{ /* 관리자 컨텐츠 제목 영역 */ + font-size: 40px; + font-weight: bolder; + padding-left: 15px; + background-color: #6AAFE6; + height: 80px; + line-height: 80px; + color: white; +} + +/* 관리자 컨텐츠 메인 영역 */ +.form_section{ + width: 95%; + margin-left: 2%; + margin-top: 20px; + border: 1px solid #dbdde2; + background-color: #efefef; +} +.form_section_title{ + padding: 20px 35px; +} +.form_section_title label{ + display: block; + font-size: 20px; + font-weight: 800; +} +.form_section_content{ + padding: 20px 35px; + border-top: 1px solid #dbdde2; +} +.form_section_content input{ + width: 98%; + height: 25px; + font-size: 20px; + padding: 5px 1%; +} + + +.ui-datepicker-trigger { /* 캘린더 css 설정 */ + margin-left: 25px; + width: 14%; + height: 38px; + font-weight: 600; + background-color: #dfe8f5; + font-size: 15px; + cursor:pointer; +} + +.authorId_btn { /* 작가 선택 css 설정 */ + margin-left: 20px; + width: 14%; + height: 38px; + font-weight: 600; + background-color: #dfe8f5; + font-size: 15px; + cursor:pointer; +} + +.ck-content { /* ckeditor 높이 */ + height: 170px; +} + +/* 버튼 영역 */ +.btn_section{ + text-align: center; + margin: 80px 0; +} +.btn{ + min-width: 180px; + padding: 4px 30px; + font-size: 25px; + font-weight: 600; + line-height: 40px; +} +.enroll_btn{ + background-color: #dbdde2; + margin-left:15px; +} +#enrollBtn:hover { + background-color: #c9cbd0; +} + +.form_section_content select { /* 카테고리 css 설정 */ + width: 92%; + height: 35px; + font-size: 20px; + text-align-last: center; + margin-left: 5px; +} +.cate_wrap span { + font-weight: 600; +} +.cate_wrap:not(:first-child) { + margin-top: 20px; +} + + + + + + +/* footer navai 영역 */ +.footer_nav{ + width:100%; + height:50px; +} +.footer_nav_container{ + width: 100%; + height: 100%; + background-color:#8EC0E4; +} +.footer_nav_container>ul{ + font-weight : bold; + float:left; + list-style:none; + position:relative; + padding-top:10px; + line-height: 27px; + font-family: dotum; + margin-left: 10px; +} +.footer_nav_container>ul>li{ + display:inline; + width: 45px; + height: 19px; + padding: 10px 9px 0 10px; +} +.footer_nav_container>ul>span{ + margin: 0 4px; +} +/* footer 영역 */ +.footer{ + width:100%; + height:130px; + background-color:#D4DFE6; + padding-bottom : 50px; +} +.footer_container{ + width: 100%; + height: 100%; + margin: auto; +} +.footer_left>img { + width: 150%; + height: 130px; + margin-left: -20px; + margin-top: -12px; +} +.footer_left{ + float :left; + width: 170px; + margin-left: 20px; + margin-top : 30px; + +} +.footer_right{ + float :left; + width: 680px; + margin-left: 70px; + margin-top : 30px; +} + + + +/* float 속성 해제 */ +.clearfix{ + clear: both; +} \ No newline at end of file diff --git a/VamPa_MySQL/src/test/java/com/vam/mapper/AdminMapperTests.java b/VamPa_MySQL/src/test/java/com/vam/mapper/AdminMapperTests.java index cc47e58..b789f84 100644 --- a/VamPa_MySQL/src/test/java/com/vam/mapper/AdminMapperTests.java +++ b/VamPa_MySQL/src/test/java/com/vam/mapper/AdminMapperTests.java @@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import com.vam.model.BookVO; import com.vam.model.Criteria; @RunWith(SpringJUnit4ClassRunner.class) @@ -50,24 +51,39 @@ public class AdminMapperTests { */ - /* 상품 리스트 & 상품 총 갯수 */ + /* 상품 리스트 & 상품 총 개수*/ + /* @Test - public void goodsGetListTest() { + public void goodsGetListTests() { Criteria cri = new Criteria(); - /* 검색조건 */ - //cri.setKeyword("테스트"); + cri.setKeyword("test"); - /* 검색 리스트 */ - /*List list = mapper.goodsGetList(cri); - for(int i = 0; i < list.size(); i++) { - System.out.println("result......." + i + " : " + list.get(i)); - }*/ + // 상품 리스트 + List list = mapper.goodsGetList(cri); + for(int i = 0; i < 10; i++) { + System.out.println("result..........." +i + " : " + list.get(i) ); + } - /* 상품 총 갯수 */ - int result = mapper.goodsGetTotal(cri); - System.out.println("resutl.........." + result); + + + /// 상품 총 개수 + //int result = mapper.goodsGetTotal(cri); + //System.out.println("resout........." + result); + + } + */ + + /* 상품 조회 페이지 */ + @Test + public void goodsGetDetailTest() { + + int bookId = 150; + + BookVO result = mapper.goodsGetDetail(bookId); + + System.out.println("상품 조회 데이터 : " + result); } diff --git a/VamPa_MySQL/target/classes/com/vam/mapper/AdminMapper.xml b/VamPa_MySQL/target/classes/com/vam/mapper/AdminMapper.xml index 67234e9..cfe37a0 100644 --- a/VamPa_MySQL/target/classes/com/vam/mapper/AdminMapper.xml +++ b/VamPa_MySQL/target/classes/com/vam/mapper/AdminMapper.xml @@ -47,6 +47,13 @@ - + + \ No newline at end of file diff --git a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties index 57004f5..0df182b 100644 --- a/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties +++ b/VamPa_MySQL/target/m2e-wtp/web-resources/META-INF/maven/com.vam/controller/pom.properties @@ -1,5 +1,5 @@ #Generated by Maven Integration for Eclipse -#Tue Apr 13 14:07:29 KST 2021 +#Mon Apr 19 22:02:05 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa_MySQL m2e.projectName=VamPa_MySQL groupId=com.vam