Commit 6bf13d31 authored by shoei.kanno's avatar shoei.kanno

バグの修正

parent b3f409e5
......@@ -10,6 +10,6 @@ import com.example.domain.Shoes;
//靴データ取得用
//statusによって出し分け
public interface ShoesRepository extends JpaRepository<Shoes, Integer>{
@Query(value = "SELECT * FROM shoes WHERE product_status = ?1", nativeQuery = true)
@Query(value = "SELECT * FROM shoes WHERE product_status = ?1 ORDER BY id DESC", nativeQuery = true)
public List <Shoes> findAllByStatus(Integer status);
}
......@@ -108,12 +108,10 @@ public class EcsiteController {
//一般商品取得
List<Shoes> generalShoes = shoesService.findAllGeneralShoes();
model.addAttribute("generalShoes", generalShoes);
System.out.println(generalShoes);
//限定商品取得
List<Shoes> limitedShoes = shoesService.findAllLimitedShoes();
model.addAttribute("limitedShoes", limitedShoes);
System.out.println(limitedShoes);
//user情報取得、格納
User user = userDetails.getUser();
......
......@@ -1893,7 +1893,7 @@ th, td {
.productBox {
/*background-color: #FDF5E6;*/
height: 400px;
height: 450px;
width: 33%;
/*border: 1px solid black;*/
box-sizing: border-box;
......@@ -1912,6 +1912,7 @@ th, td {
}
/* listモーダル */
#modal-content {
width: 30% ;
......@@ -1961,7 +1962,7 @@ th, td {
color: #000;
}
.detailsBtn, .shoeImage, .shoeName, .shoePrice, .shoeImageDiv, .modalShow{
.detailsBtn, .shoeImage, .shoeSize, .shoeName, .shoePrice, .shoeImageDiv, .modalShow{
text-align: center;
}
......@@ -2048,3 +2049,8 @@ th, td {
#en {
margin-right: 10px;
}
/* top画面フッター */
#top-footer {
margin-top: 70px;
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ $(function(){
$(".details").click(function(event){
$('#showName').empty();
$('#showSize').empty();
$('#showPrice').empty();
$('#showId').empty();
//以下デモ参照
......@@ -26,18 +27,22 @@ $(function(){
//一覧画面から情報取得
let nameField = document.createElement("p");
let sizeField = document.createElement("p");
let priceField = document.createElement("p");
let idField = document.createElement("input");
idField.setAttribute("type", "hidden");
// let name = $(event.target.parentNode.children[1].textContent);
// let price =$(event.target.parentNode.children[2].textContent);
// let id =$(event.target.parentNode.children[3].value);
let src = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling).children('img').attr('src');
let name = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.textContent);
let src = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling).children('img').attr('src');
let name = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.textContent);
let size = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.textContent);
let price =$(event.target.parentNode.previousElementSibling.previousElementSibling.textContent);
let id =$(event.target.parentNode.previousElementSibling.value);
nameField.textContent = name.selector;
$('#showName').append(nameField);
sizeField.textContent = size.selector;
$('#showSize').append(sizeField);
priceField.textContent = price.selector;
$('#showPrice').append(priceField);
idField.value = id.selector;
......
......@@ -66,7 +66,7 @@
<li><a th:href="@{/limited/top}">Home</a></li>
<li><a th:href="@{/limited/list}">Shop</a></li>
<li><a th:href="@{/limited/log/{id}(id=${user.id})}">My Purchase Log</a></li>
<li class="active"><a th:href="@{/limited/wallets/{id}(id=${user.id})}">Wallets</a></li>
<li><a th:href="@{/limited/wallets/{id}(id=${user.id})}">Wallets</a></li>
</ul>
<ul class="nav navbar-nav navbar-right cart-menu">
<li><a class="search-btn"><i class="fa fa-search" aria-hidden="true"></i></a></li>
......
......@@ -145,12 +145,12 @@
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<!-- <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="pe-7s-angle-left glyphicon-chevron-left" aria-hidden="true"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="pe-7s-angle-right glyphicon-chevron-right" aria-hidden="true"></span>
</a>
</a> -->
</div>
</section>
......@@ -245,11 +245,11 @@
</div>
</section>-->
<footer class="footer">
<footer class="footer" id="top-footer">
<div class="container">
<div class="row">
<div class="col-md-12">
<p class="center">Made with <i class="fa fa-heart"></i> by <a href="#" target="_blank">Revolthemes</a>. All Rights Reserved</p>
<p class="center">Made with <i class="fa fa-heart"></i> by <a href="#" target="_blank">Limited</a>. All Rights Reserved</p>
</div>
</div>
......
......@@ -16,6 +16,7 @@
<!-- モーダルウィンドウのコンテンツ開始 -->
<img class="modalShow" id="showImage" alt="productImage" width="300" height="200"/>
<div class="modalShow" id="showName"></div>
<div class="modalShow" id="showSize"></div>
<div class="modalShow" id="showPrice"></div>
<div class="modalShow" id="showId"></div>
<div class="modalShow" id="showQuantity">
......@@ -118,6 +119,7 @@
<div class="productBox" th:each="limitedShoes : ${limitedShoes}">
<div class="shoeImageDiv"><img class="shoeImage" th:src="@{/upload/{photo}(photo=${limitedShoes.photo})}" alt="productImage" width="300" height="200"/></div>
<p th:text= "${limitedShoes.name}" class="shoeName shoeLimited">AirMAX</p>
<p th:text="${limitedShoes.size} + ' cm'" class="shoeSize shoeLimited"></p>
<p th:text = "'&yen;' +${limitedShoes.price}" class="shoePrice shoeLimited">¥10,000</p>
<input type="hidden" th:value="${limitedShoes.id}"/>
<div class="detailsBtn"><button type="button" id="modal-open" class="details">Datails</button></div>
......@@ -129,6 +131,7 @@
<div class="productBox" th:each="generalShoes : ${generalShoes}">
<div class="shoeImageDiv"><img class="shoeImage" th:src="@{/upload/{photo}(photo=${generalShoes.photo})}" alt="productImage" width="300" height="200"/></div>
<p th:text= "${generalShoes.name}" class="shoeName">AirMAX</p>
<p th:text="${generalShoes.size} + ' cm'" class="shoeSize"></p>
<p th:text = "'&yen;' +${generalShoes.price}" class="shoePrice">¥10,000</p>
<input type="hidden" th:value="${generalShoes.id}"/>
<div class="detailsBtn"><button type="button" id="modal-open" class="details">Datails</button></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment