diff --git a/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java b/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java index 4ad43b0..0bbeba3 100644 --- a/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java +++ b/VamPa/src/main/java/com/vam/mapper/AuthorMapper.java @@ -1,10 +1,16 @@ package com.vam.mapper; +import java.util.List; + import com.vam.model.AuthorVO; +import com.vam.model.Criteria; public interface AuthorMapper { /* 작가 등록 */ public void authorEnroll(AuthorVO author); + /* 작가 목록 */ + public List authorGetList(Criteria cri); + } diff --git a/VamPa/src/main/java/com/vam/model/Criteria.java b/VamPa/src/main/java/com/vam/model/Criteria.java new file mode 100644 index 0000000..e7bcd63 --- /dev/null +++ b/VamPa/src/main/java/com/vam/model/Criteria.java @@ -0,0 +1,71 @@ +package com.vam.model; + +public class Criteria { + + /* 현재 페이지 번호 */ + private int pageNum; + + /* 페이지 표시 개수 */ + private int amount; + + /* 검색 타입 */ + private String type; + + /* 검색 키워드 */ + private String keyword; + + /* Criteria 생성자 */ + public Criteria(int pageNum, int amount) { + this.pageNum = pageNum; + this.amount = amount; + } + + /* Criteria 기본 생성자 */ + public Criteria(){ + this(1,10); + } + + /* 검색 타입 데이터 배열 변환 */ + public String[] getTypeArr() { + return type == null? new String[] {}:type.split(""); + } + + public int getPageNum() { + return pageNum; + } + + public void setPageNum(int pageNum) { + this.pageNum = pageNum; + } + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + @Override + public String toString() { + return "Criteria [pageNum=" + pageNum + ", amount=" + amount + ", type=" + type + ", keyword=" + keyword + "]"; + } + + +} diff --git a/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml b/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml index 243c6fc..4f93a16 100644 --- a/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml +++ b/VamPa/src/main/resources/com/vam/mapper/AuthorMapper.xml @@ -11,4 +11,28 @@ + + + + \ No newline at end of file diff --git a/VamPa/src/main/resources/log4j.xml b/VamPa/src/main/resources/log4j.xml index 24be56d..7b02075 100644 --- a/VamPa/src/main/resources/log4j.xml +++ b/VamPa/src/main/resources/log4j.xml @@ -1,5 +1,5 @@ - + diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp index 187bbea..815afac 100644 --- a/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp +++ b/VamPa/src/main/webapp/WEB-INF/views/admin/authorEnroll.jsp @@ -15,43 +15,8 @@ -
-
- -
- -
- -
- 관리자 페이지 - -
- -
- - + <%@include file="../includes/admin/header.jsp" %> +
작가 등록
@@ -94,49 +59,8 @@
-
-
- - - - - - -
- + + <%@include file="../includes/admin/footer.jsp" %> \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/includes/admin/footer.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/includes/admin/footer.jsp new file mode 100644 index 0000000..5187788 --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/includes/admin/footer.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +
+ + + + + + + + + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/WEB-INF/views/includes/admin/header.jsp b/VamPa_MySQL/src/main/webapp/WEB-INF/views/includes/admin/header.jsp new file mode 100644 index 0000000..b53a91c --- /dev/null +++ b/VamPa_MySQL/src/main/webapp/WEB-INF/views/includes/admin/header.jsp @@ -0,0 +1,40 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +
+
+ +
+ +
+ +
+ 관리자 페이지 + +
+ +
+ + \ No newline at end of file diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/authorEnroll.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/authorEnroll.css index f073afc..8f2f0a2 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/authorEnroll.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/authorEnroll.css @@ -95,9 +95,7 @@ ul{ .admin_content_wrap{ width: 80%; float:left; - height: 100%; - - + min-height:700px; } /* 관리자 컨텐츠 제목 영역 */ .admin_content_subject{ diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css index 182fb72..6e2fed2 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/authorManage.css @@ -95,7 +95,7 @@ ul{ .admin_content_wrap{ width: 80%; float:left; - height: 100%; + min-height:700px; } .admin_content_subject{ /* 관리자 컨텐츠 제목 영역 */ font-size: 40px; diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsEnroll.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsEnroll.css index d0e136a..c772a0f 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsEnroll.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsEnroll.css @@ -95,7 +95,7 @@ ul{ .admin_content_wrap{ width: 80%; float:left; - height: 100%; + min-height:700px; } .admin_content_subject{ /* 관리자 컨텐츠 제목 영역 */ font-size: 40px; diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsManage.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsManage.css index 90701ed..946f896 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsManage.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/goodsManage.css @@ -95,7 +95,7 @@ ul{ .admin_content_wrap{ width: 80%; float:left; - height: 100%; + min-height:700px; } .admin_content_subject{ /* 관리자 컨텐츠 제목 영역 */ font-size: 40px; diff --git a/VamPa_MySQL/src/main/webapp/resources/css/admin/main.css b/VamPa_MySQL/src/main/webapp/resources/css/admin/main.css index c2a289a..f560a1c 100644 --- a/VamPa_MySQL/src/main/webapp/resources/css/admin/main.css +++ b/VamPa_MySQL/src/main/webapp/resources/css/admin/main.css @@ -91,8 +91,7 @@ ul{ .admin_content_wrap{ width: 80%; float:left; - height: 100%; - height:700px; + min-height:700px; } .admin_content_wrap div{ margin-top: 280px; diff --git a/VamPa_MySQL/src/test/java/com/vam/mapper/AuthorMapperTests.java b/VamPa_MySQL/src/test/java/com/vam/mapper/AuthorMapperTests.java index 8027335..a8fa574 100644 --- a/VamPa_MySQL/src/test/java/com/vam/mapper/AuthorMapperTests.java +++ b/VamPa_MySQL/src/test/java/com/vam/mapper/AuthorMapperTests.java @@ -1,5 +1,7 @@ package com.vam.mapper; +import java.util.List; + import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -7,6 +9,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.vam.model.AuthorVO; +import com.vam.model.Criteria; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("file:src/main/webapp/WEB-INF/spring/root-context.xml") @@ -16,6 +19,7 @@ public class AuthorMapperTests { private AuthorMapper mapper; /* 작가 등록 테스트 */ + /* @Test public void authorEnroll() throws Exception{ @@ -28,5 +32,21 @@ public class AuthorMapperTests { mapper.authorEnroll(author); } + */ + + /* 작가 목록 테스트 */ + @Test + public void authorGetListTest() throws Exception{ + + Criteria cri = new Criteria(3,10); // 3페이지 & 10개 행 표시 + cri.setKeyword("엘런"); + + List list = mapper.authorGetList(cri); + + for(int i = 0; i < list.size(); i++) { + System.out.println("list" + i + ".........." + list.get(i)); + } + + } } diff --git a/VamPa_MySQL/src/test/resources/log4j.xml b/VamPa_MySQL/src/test/resources/log4j.xml index 7906a76..ac66604 100644 --- a/VamPa_MySQL/src/test/resources/log4j.xml +++ b/VamPa_MySQL/src/test/resources/log4j.xml @@ -1,5 +1,5 @@ - + diff --git a/VamPa_MySQL/target/classes/com/vam/mapper/AuthorMapper.xml b/VamPa_MySQL/target/classes/com/vam/mapper/AuthorMapper.xml index 243c6fc..d03b3a7 100644 --- a/VamPa_MySQL/target/classes/com/vam/mapper/AuthorMapper.xml +++ b/VamPa_MySQL/target/classes/com/vam/mapper/AuthorMapper.xml @@ -11,4 +11,18 @@ + + + + \ No newline at end of file diff --git a/VamPa_MySQL/target/classes/log4j.xml b/VamPa_MySQL/target/classes/log4j.xml index 24be56d..7b02075 100644 --- a/VamPa_MySQL/target/classes/log4j.xml +++ b/VamPa_MySQL/target/classes/log4j.xml @@ -1,5 +1,5 @@ - + 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 1fb635c..8afc902 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 -#Wed Feb 10 07:15:33 KST 2021 +#Wed Mar 10 06:27:34 KST 2021 m2e.projectLocation=C\:\\Users\\sjinj\\git\\Blog_Project\\VamPa_MySQL m2e.projectName=VamPa_MySQL groupId=com.vam diff --git a/VamPa_MySQL/target/test-classes/log4j.xml b/VamPa_MySQL/target/test-classes/log4j.xml index 7906a76..ac66604 100644 --- a/VamPa_MySQL/target/test-classes/log4j.xml +++ b/VamPa_MySQL/target/test-classes/log4j.xml @@ -1,5 +1,5 @@ - +