Commit 8f1819b0 authored by shoei.kanno's avatar shoei.kanno

Merge branch 'バグの修正' into 'master'

バグの修正

See merge request !63
parents b3f409e5 6bf13d31
...@@ -10,6 +10,6 @@ import com.example.domain.Shoes; ...@@ -10,6 +10,6 @@ import com.example.domain.Shoes;
//靴データ取得用 //靴データ取得用
//statusによって出し分け //statusによって出し分け
public interface ShoesRepository extends JpaRepository<Shoes, Integer>{ 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); public List <Shoes> findAllByStatus(Integer status);
} }
...@@ -108,12 +108,10 @@ public class EcsiteController { ...@@ -108,12 +108,10 @@ public class EcsiteController {
//一般商品取得 //一般商品取得
List<Shoes> generalShoes = shoesService.findAllGeneralShoes(); List<Shoes> generalShoes = shoesService.findAllGeneralShoes();
model.addAttribute("generalShoes", generalShoes); model.addAttribute("generalShoes", generalShoes);
System.out.println(generalShoes);
//限定商品取得 //限定商品取得
List<Shoes> limitedShoes = shoesService.findAllLimitedShoes(); List<Shoes> limitedShoes = shoesService.findAllLimitedShoes();
model.addAttribute("limitedShoes", limitedShoes); model.addAttribute("limitedShoes", limitedShoes);
System.out.println(limitedShoes);
//user情報取得、格納 //user情報取得、格納
User user = userDetails.getUser(); User user = userDetails.getUser();
......
...@@ -1893,7 +1893,7 @@ th, td { ...@@ -1893,7 +1893,7 @@ th, td {
.productBox { .productBox {
/*background-color: #FDF5E6;*/ /*background-color: #FDF5E6;*/
height: 400px; height: 450px;
width: 33%; width: 33%;
/*border: 1px solid black;*/ /*border: 1px solid black;*/
box-sizing: border-box; box-sizing: border-box;
...@@ -1912,6 +1912,7 @@ th, td { ...@@ -1912,6 +1912,7 @@ th, td {
} }
/* listモーダル */ /* listモーダル */
#modal-content { #modal-content {
width: 30% ; width: 30% ;
...@@ -1961,7 +1962,7 @@ th, td { ...@@ -1961,7 +1962,7 @@ th, td {
color: #000; color: #000;
} }
.detailsBtn, .shoeImage, .shoeName, .shoePrice, .shoeImageDiv, .modalShow{ .detailsBtn, .shoeImage, .shoeSize, .shoeName, .shoePrice, .shoeImageDiv, .modalShow{
text-align: center; text-align: center;
} }
...@@ -2048,3 +2049,8 @@ th, td { ...@@ -2048,3 +2049,8 @@ th, td {
#en { #en {
margin-right: 10px; margin-right: 10px;
} }
/* top画面フッター */
#top-footer {
margin-top: 70px;
}
\ No newline at end of file
...@@ -5,6 +5,7 @@ $(function(){ ...@@ -5,6 +5,7 @@ $(function(){
$(".details").click(function(event){ $(".details").click(function(event){
$('#showName').empty(); $('#showName').empty();
$('#showSize').empty();
$('#showPrice').empty(); $('#showPrice').empty();
$('#showId').empty(); $('#showId').empty();
//以下デモ参照 //以下デモ参照
...@@ -26,18 +27,22 @@ $(function(){ ...@@ -26,18 +27,22 @@ $(function(){
//一覧画面から情報取得 //一覧画面から情報取得
let nameField = document.createElement("p"); let nameField = document.createElement("p");
let sizeField = document.createElement("p");
let priceField = document.createElement("p"); let priceField = document.createElement("p");
let idField = document.createElement("input"); let idField = document.createElement("input");
idField.setAttribute("type", "hidden"); idField.setAttribute("type", "hidden");
// let name = $(event.target.parentNode.children[1].textContent); // let name = $(event.target.parentNode.children[1].textContent);
// let price =$(event.target.parentNode.children[2].textContent); // let price =$(event.target.parentNode.children[2].textContent);
// let id =$(event.target.parentNode.children[3].value); // let id =$(event.target.parentNode.children[3].value);
let src = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling).children('img').attr('src'); let src = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling.previousElementSibling).children('img').attr('src');
let name = $(event.target.parentNode.previousElementSibling.previousElementSibling.previousElementSibling.textContent); 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 price =$(event.target.parentNode.previousElementSibling.previousElementSibling.textContent);
let id =$(event.target.parentNode.previousElementSibling.value); let id =$(event.target.parentNode.previousElementSibling.value);
nameField.textContent = name.selector; nameField.textContent = name.selector;
$('#showName').append(nameField); $('#showName').append(nameField);
sizeField.textContent = size.selector;
$('#showSize').append(sizeField);
priceField.textContent = price.selector; priceField.textContent = price.selector;
$('#showPrice').append(priceField); $('#showPrice').append(priceField);
idField.value = id.selector; idField.value = id.selector;
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<li><a th:href="@{/limited/top}">Home</a></li> <li><a th:href="@{/limited/top}">Home</a></li>
<li><a th:href="@{/limited/list}">Shop</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><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>
<ul class="nav navbar-nav navbar-right cart-menu"> <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> <li><a class="search-btn"><i class="fa fa-search" aria-hidden="true"></i></a></li>
......
...@@ -145,12 +145,12 @@ ...@@ -145,12 +145,12 @@
</div> </div>
<!-- Controls --> <!-- 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> <span class="pe-7s-angle-left glyphicon-chevron-left" aria-hidden="true"></span>
</a> </a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <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> <span class="pe-7s-angle-right glyphicon-chevron-right" aria-hidden="true"></span>
</a> </a> -->
</div> </div>
</section> </section>
...@@ -245,11 +245,11 @@ ...@@ -245,11 +245,11 @@
</div> </div>
</section>--> </section>-->
<footer class="footer"> <footer class="footer" id="top-footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-12"> <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>
</div> </div>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<!-- モーダルウィンドウのコンテンツ開始 --> <!-- モーダルウィンドウのコンテンツ開始 -->
<img class="modalShow" id="showImage" alt="productImage" width="300" height="200"/> <img class="modalShow" id="showImage" alt="productImage" width="300" height="200"/>
<div class="modalShow" id="showName"></div> <div class="modalShow" id="showName"></div>
<div class="modalShow" id="showSize"></div>
<div class="modalShow" id="showPrice"></div> <div class="modalShow" id="showPrice"></div>
<div class="modalShow" id="showId"></div> <div class="modalShow" id="showId"></div>
<div class="modalShow" id="showQuantity"> <div class="modalShow" id="showQuantity">
...@@ -118,6 +119,7 @@ ...@@ -118,6 +119,7 @@
<div class="productBox" th:each="limitedShoes : ${limitedShoes}"> <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> <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.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> <p th:text = "'&yen;' +${limitedShoes.price}" class="shoePrice shoeLimited">¥10,000</p>
<input type="hidden" th:value="${limitedShoes.id}"/> <input type="hidden" th:value="${limitedShoes.id}"/>
<div class="detailsBtn"><button type="button" id="modal-open" class="details">Datails</button></div> <div class="detailsBtn"><button type="button" id="modal-open" class="details">Datails</button></div>
...@@ -129,6 +131,7 @@ ...@@ -129,6 +131,7 @@
<div class="productBox" th:each="generalShoes : ${generalShoes}"> <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> <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.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> <p th:text = "'&yen;' +${generalShoes.price}" class="shoePrice">¥10,000</p>
<input type="hidden" th:value="${generalShoes.id}"/> <input type="hidden" th:value="${generalShoes.id}"/>
<div class="detailsBtn"><button type="button" id="modal-open" class="details">Datails</button></div> <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