Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
라이앤캐처스 크루공간
허창호
연습용
Commits
969fb9e8
Commit
969fb9e8
authored
Feb 06, 2022
by
madvirus
Browse files
Initial Commit
parents
Changes
187
Hide whitespace changes
Inline
Side-by-side
src/main/resources/messages.properties
0 → 100644
View file @
969fb9e8
required
=
필수항목입니다.
PAYMENT_WAITING
=
결제 대기
PREPARING
=
상품 준비
SHIPPED
=
상품 발송
DELIVERING
=
배송 중
DELIVERY_COMPLETED
=
배송 완료
CANCELED
=
취소
src/main/resources/static/favicon.ico
0 → 100644
View file @
969fb9e8
15 KB
src/main/resources/static/images/original/pen.jpg
0 → 100644
View file @
969fb9e8
31.5 KB
src/main/resources/static/images/original/pen2.jpg
0 → 100644
View file @
969fb9e8
129 KB
src/main/resources/static/images/original/rpi3.jpg
0 → 100644
View file @
969fb9e8
29.7 KB
src/main/resources/static/images/original/wbp.png
0 → 100644
View file @
969fb9e8
127 KB
src/main/resources/static/images/thumbnail/pen.jpg
0 → 100644
View file @
969fb9e8
7.32 KB
src/main/resources/static/images/thumbnail/pen2.jpg
0 → 100644
View file @
969fb9e8
13.9 KB
src/main/resources/static/images/thumbnail/rpi3.jpg
0 → 100644
View file @
969fb9e8
3.14 KB
src/main/resources/static/images/thumbnail/wbp.png
0 → 100644
View file @
969fb9e8
9.26 KB
src/main/resources/templates/admin/adminMain.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
관리자 페이지
</title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"fragments/layout :: header"
></div>
<div
class=
"container"
>
<h2>
관리자
</h2>
<ul>
<li><a
href=
"/admin/orders"
>
주문 관리
</a></li>
</ul>
</div>
<div
th:replace=
"fragments/layout :: footer"
></div>
</body>
</html>
src/main/resources/templates/admin/adminOrderDetail.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/extras/spring-security"
>
<head>
<meta
charset=
"UTF-8"
>
<title
th:text=
"|관리자 주문 상세 ${order.number}|"
></title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"/fragments/layout :: header"
></div>
<div
class=
"container"
>
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
href=
"/admin/main"
>
관리자
</a></li>
<li
class=
"breadcrumb-item"
><a
href=
"/admin/orders"
>
주문 관리
</a></li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
>
주문 [[${order.number}]]
</li>
</ol>
</nav>
<h2>
주문 상세
</h2>
<table
class=
"table"
>
<tbody>
<tr>
<td
rowspan=
"2"
>
주문
</td>
<td>
번호
</td>
<td
th:text=
"${order.number}"
></td>
</tr>
<tr>
<td>
상태
</td>
<td
th:text=
"#{${order.state}}"
></td>
</tr>
<tr>
<td>
주문자
</td>
<td>
이름
</td>
<td
th:text=
"${order.orderer.name}"
></td>
</tr>
<tr>
<td
rowspan=
"3"
>
받는사람
</td>
<td>
이름
</td>
<td
th:text=
"${order.shippingInfo.receiver.name}"
></td>
</tr>
<tr>
<td>
연락처
</td>
<td
th:text=
"${order.shippingInfo.receiver.phone}"
></td>
</tr>
<tr>
<td>
주소
</td>
<td>
<span
th:text=
"${order.shippingInfo.address.zipCode}"
></span>
<span
th:text=
"${order.shippingInfo.address.address1}"
></span>
<span
th:text=
"${order.shippingInfo.address.address2}"
></span>
</td>
</tr>
</tbody>
</table>
<table
class=
"table"
>
<thead>
<tr>
<th>
상품
</th>
<th>
가격
</th>
<th>
개수
</th>
<th>
합
</th>
</tr>
</thead>
<tbody>
<tr
th:each=
"ol: ${order.orderLines}"
>
<td
th:text=
"${ol.productName}"
></td>
<td
th:text=
"${ol.price}"
></td>
<td
th:text=
"${ol.quantity}"
></td>
<td
th:text=
"${ol.amounts}"
></td>
</tr>
</tbody>
<tfoot>
<tr>
<td
colspan=
"3"
>
총합
</td>
<td
th:text=
"${order.totalAmounts}"
>
총합
</td>
</tr>
</tfoot>
</table>
<button
th:if=
"${order.notYetShipped}"
id=
"shippedBtn"
class=
"btn btn-dark"
>
배송 처리하기
</button>
</div>
<div
th:replace=
"/fragments/layout :: footer"
></div>
<form
id=
"goShppingForm"
th:action=
"@{/admin/orders/{orderNumber}/shipping(orderNumber=${order.number})}"
method=
"post"
>
<input
type=
"hidden"
name=
"version"
th:value=
"${order.version}"
>
</form>
<script
th:inline=
"javascript"
>
$
(
function
()
{
$
(
"
#shippedBtn
"
).
click
(
function
()
{
if
(
confirm
(
"
배송 상태로 처리하시겠습니까?
"
))
{
$
(
"
#goShppingForm
"
).
submit
();
}
});
});
</script>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/admin/adminOrderLockFail.html
0 → 100644
View file @
969fb9e8
<
%@
page
contentType=
"text/html; charset=utf-8"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
taglib
prefix=
"spring"
uri=
"http://www.springframework.org/tags"
%
>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
관리자 주문 배송 처리 실패 : ${order.number}
</title>
<jsp:include
page=
"/WEB-INF/view/common/css.jsp"
/>
<jsp:include
page=
"/WEB-INF/view/common/js.jsp"
/>
</head>
<body>
<jsp:include
page=
"/WEB-INF/view/common/navi.jsp"
/>
<div
class=
"container"
>
<ol
class=
"breadcrumb"
>
<li><a
href=
"/admin/main"
>
관리자
</a></li>
<li><a
href=
"/admin/orders"
>
주문 관리
</a></li>
<li
class=
"active"
><a
href=
"/admin/orders/${orderNo}"
>
주문 ${orderNo}
</a></li>
</ol>
<div
class=
"alert alert-danger"
role=
"alert"
>
주문[${orderNo}]을 다른 사용자가 변경해서 배송 상태로 변경할 수 없습니다
</div>
<a
class=
"btn btn-primary"
href=
"/admin/orders/${orderNo}"
role=
"button"
>
주문 내역 보기
</a>
</div>
<jsp:include
page=
"/WEB-INF/view/common/footer.jsp"
/>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/admin/adminOrderShipped.html
0 → 100644
View file @
969fb9e8
<
%@
page
contentType=
"text/html; charset=utf-8"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
taglib
prefix=
"spring"
uri=
"http://www.springframework.org/tags"
%
>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
관리자 주문 배송 처리 : ${order.number}
</title>
<jsp:include
page=
"/WEB-INF/view/common/css.jsp"
/>
<jsp:include
page=
"/WEB-INF/view/common/js.jsp"
/>
</head>
<body>
<jsp:include
page=
"/WEB-INF/view/common/navi.jsp"
/>
<div
class=
"container"
>
<ol
class=
"breadcrumb"
>
<li><a
href=
"/admin/main"
>
관리자
</a></li>
<li><a
href=
"/admin/orders"
>
주문 관리
</a></li>
<li
class=
"active"
><a
href=
"/admin/orders/${orderNo}"
>
주문 ${orderNo}
</a></li>
</ol>
<div
class=
"alert alert-success"
role=
"alert"
>
주문[${orderNo}]에 상품을 발송처리했습니다.
</div>
<a
class=
"btn btn-primary"
href=
"/admin/orders/${orderNo}"
role=
"button"
>
주문 내역 보기
</a>
</div>
<jsp:include
page=
"/WEB-INF/view/common/footer.jsp"
/>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/admin/adminOrders.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
관리자 : 주문 목록
</title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"fragments/layout :: header"
></div>
<div
class=
"container"
>
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb"
>
<li
class=
"breadcrumb-item"
><a
href=
"/admin/main"
>
관리자
</a></li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
href=
"/admin/orders"
>
주문 관리
</li>
</ol>
</nav>
<h2>
주문 목록
</h2>
<div
class=
"alert alert-info"
role=
"alert"
th:if=
"${orderPage.content.isEmpty()}"
>
주문 내역이 없습니다.
</div>
<table
class=
"table"
th:if=
"${!orderPage.content.isEmpty()}"
>
<thead>
<tr>
<th>
주문번호
</th>
<th>
금액
</th>
<th>
상태
</th>
<th>
상품
</th>
</tr>
</thead>
<tbody>
<tr
th:each=
"order: ${orderPage.content}"
>
<td><a
th:href=
"@{/admin/orders/{orderNum}(orderNum=${order.number})}"
th:text=
"${order.number}"
>
주문번호
</a></td>
<td
th:text=
"${order.totalAmounts}"
>
구매금액
</td>
<td
th:text=
"#{${order.state}}"
>
상태
</td>
<td>
[[${order.productName}]] 등
</td>
</tr>
</tbody>
</table>
<nav
th:if=
"${pagination.totalPages > 0}"
>
<ul
class=
"pagination"
>
<li
class=
"page-item"
th:if=
"${pagination.hasPrevious}"
>
<a
class=
"page-link"
th:href=
"@{/admin/orders?p={pageNo}(pageNo=${pagination.previousBeginPage})}"
aria-label=
"Previous"
>
<span
aria-hidden=
"true"
>
«
</span>
</a>
</li>
<li
th:each=
"pageNo : ${pagination.pageNos}"
class=
"page-item"
><a
class=
"page-link"
th:href=
"@{/admin/orders?p={pageNo}(pageNo=${pageNo})}"
th:text=
"${pageNo}"
>
1
</a></li>
<li
class=
"page-item"
th:if=
"${pagination.hasNext}"
>
<a
class=
"page-link"
th:href=
"@{/admin/orders?p={pageNo}(pageNo=${pagination.nextBeginPage})}"
aria-label=
"Next"
>
<span
aria-hidden=
"true"
>
»
</span>
</a>
</li>
</ul>
</nav>
</div>
<div
th:replace=
"fragments/layout :: footer"
></div>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/category/categoryList.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
카테고리 목록
</title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"fragments/layout :: header"
></div>
<div
class=
"container"
>
<h3>
카테고리 목록
</h3>
<ul>
<li
th:each=
"cat: ${categories}"
>
<a
th:href=
"@{/categories/{catId}(catId=${cat.id.value})}"
th:text=
"${cat.name}"
></a>
</li>
</ul>
</div>
<div
th:replace=
"fragments/layout :: footer"
></div>
</body>
</html>
src/main/resources/templates/category/productDetail.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/extras/spring-security"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
제품 상세
</title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"/fragments/layout :: header"
></div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
><img
th:src=
"${product.images[0].url}"
src=
""
class=
"img-fluid"
></div>
<div
class=
"col-md-8"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
th:text=
"${product.name}"
>
제품명
</div>
<p
class=
"card-text"
>
가격 :
<span
th:text=
"${product.price}"
></span>
<br>
상세 :
<span
th:text=
"${product.detail}"
></span>
</p>
<button
type=
"button"
class=
"btn btn-primary"
id=
"orderBtn"
>
구매하기
</button>
</div>
</div>
</div>
</div>
</div>
<div
th:replace=
"/fragments/layout :: footer"
></div>
<script
sec:authorize=
"!isAuthenticated()"
th:inline=
"javascript"
>
function
handleOrder
()
{
alert
(
"
로그인을 먼저 하세요!
"
);
}
</script>
<script
sec:authorize=
"isAuthenticated()"
th:inline=
"javascript"
>
function
handleOrder
()
{
alert
(
"
주문 확인 화면으로 넘어갑니다.
"
);
$
(
"
#goConfirmForm
"
).
submit
();
}
</script>
<script
th:inline=
"javascript"
>
$
(
function
()
{
$
(
"
#orderBtn
"
).
click
(
function
()
{
handleOrder
();
});
});
</script>
<form
id=
"goConfirmForm"
action=
"/orders/orderConfirm"
method=
"post"
sec:authorize=
"isAuthenticated()"
>
<input
type=
"hidden"
name=
"orderProducts[0].productId"
th:value=
"${product.id.id}"
>
<input
type=
"hidden"
name=
"orderProducts[0].quantity"
value=
"1"
>
</form>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/category/productList.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
제품 목록
</title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"fragments/layout :: header"
></div>
<div
class=
"container"
>
<h2
th:text=
"${productInCategory.category.name}"
>
카테고리
</h2>
<span
th:if=
"${productInCategory.items.isEmpty()}"
>
상품이 없습니다.
</span>
<div
class=
"card mb-3"
style=
"max-width: 540px;"
th:each=
"product: ${productInCategory.items}"
>
<div
class=
"row g-0"
>
<div
class=
"col-md-4"
>
<a
th:href=
"@{/products/{productId}(productId=${product.id})}"
>
<img
class=
"img-fluid rounded-start"
th:src=
"${product.image}"
src=
""
th:alt=
"${product.name}"
>
</a>
</div>
<div
class=
"col-md-8"
>
<div
class=
"card-body"
>
<h5
class=
"card-title"
th:text=
"${product.name}"
>
이름
</h5>
<p
class=
"card-text"
>
가격 : [[${product.price}]]
</p>
</div>
</div>
</div>
</div>
</div>
<div
th:replace=
"fragments/layout :: footer"
></div>
</body>
</html>
src/main/resources/templates/fragments/layout.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/extras/spring-security"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
<th:block
th:fragment=
"cssjs"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"
integrity=
"sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ=="
crossorigin=
"anonymous"
referrerpolicy=
"no-referrer"
></script>
</th:block>
</head>
<body>
<nav
class=
"navbar navbar-dark bg-dark navbar-expand-lg mb-2"
th:fragment=
"header"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
href=
"/home"
>
DDD
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-bs-toggle=
"collapse"
data-bs-target=
"#navbarSupportedContent"
aria-controls=
"navbarSupportedContent"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
>
<ul
class=
"navbar-nav me-auto mb-2 mb-lg-0"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
th:classappend=
"${#httpServletRequest.requestURI.startsWith('/home') ? 'active' : ''}"
href=
"/home"
>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
th:classappend=
"${#httpServletRequest.requestURI.startsWith('/categories') ? 'active' : ''}"
href=
"/categories"
>
카테고리
</a>
</li>
<li
class=
"nav-item"
sec:authorize=
"!isAuthenticated()"
><a
href=
"/login"
class=
"nav-link"
>
로그인
</a></li>
<li
class=
"nav-item"
sec:authorize=
"hasRole('ADMIN')"
><a
href=
"/admin/main"
class=
"nav-link"
>
관리자
</a></li>
<li
class=
"nav-item"
sec:authorize=
"isAuthenticated()"
><a
href=
"/my/main"
class=
"nav-link"
sec:authentication=
"principal.username"
>
사용자
</a></li>
<li
class=
"nav-item"
sec:authorize=
"isAuthenticated()"
><a
th:href=
"@{/logout}"
class=
"nav-link"
href=
"/logout"
>
로그아웃
</a></li>
</ul>
</div>
</div>
</nav>
<footer
class=
"border-top mt-2"
th:fragment=
"footer"
>
<p
class=
"text-center"
>
도메인 구현 시작하기, 문의: madvirus@madvirus.net
</p>
</footer>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/home.html
0 → 100644
View file @
969fb9e8
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
마이샵
</title>
<th:block
th:replace=
"fragments/layout :: cssjs"
/>
</head>
<body>
<div
th:replace=
"fragments/layout :: header"
></div>
<div
class=
"p-2 mb-2 bg-light rounded-3 mt-2"
>
<div
class=
"container-fluid py-5"
>
<h3
class=
"display-5 fw-bold"
>
오늘의 특가
</h3>
<p
class=
"col-md-8 fs-4"
>
라즈베리파이 3
</p>
<a
class=
"btn btn-primary btn-lg"
type=
"button"
href=
"/products/prod-001"
>
상품 보기
</a>
</div>
</div>
<div
th:replace=
"fragments/layout :: footer"
></div>
</body>
</html>
\ No newline at end of file
Prev
1
…
4
5
6
7
8
9
10
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment