Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
Ecsite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shoei.kanno
Ecsite
Commits
8f1819b0
Commit
8f1819b0
authored
Oct 21, 2020
by
shoei.kanno
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'バグの修正' into 'master'
バグの修正 See merge request
!63
parents
b3f409e5
6bf13d31
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
12 deletions
+25
-12
ShoesRepository.java
src/main/java/com/example/repository/ShoesRepository.java
+1
-1
EcsiteController.java
src/main/java/com/example/web/EcsiteController.java
+0
-2
style.css
src/main/resources/static/css/style.css
+9
-2
list.js
src/main/resources/static/js/list.js
+7
-2
スニーカー1.jpg
src/main/resources/static/upload/スニーカー1.jpg
+0
-0
スニーカー2.jpg
src/main/resources/static/upload/スニーカー2.jpg
+0
-0
cart.html
src/main/resources/templates/cart.html
+1
-1
index.html
src/main/resources/templates/index.html
+4
-4
list.html
src/main/resources/templates/list.html
+3
-0
No files found.
src/main/java/com/example/repository/ShoesRepository.java
View file @
8f1819b0
...
@@ -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
);
}
}
src/main/java/com/example/web/EcsiteController.java
View file @
8f1819b0
...
@@ -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
();
...
...
src/main/resources/static/css/style.css
View file @
8f1819b0
...
@@ -1893,7 +1893,7 @@ th, td {
...
@@ -1893,7 +1893,7 @@ th, td {
.productBox
{
.productBox
{
/*background-color: #FDF5E6;*/
/*background-color: #FDF5E6;*/
height
:
4
0
0px
;
height
:
4
5
0px
;
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
,
.shoe
Size
,
.shoe
Name
,
.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
src/main/resources/static/js/list.js
View file @
8f1819b0
...
@@ -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
;
...
...
src/main/resources/static/upload/スニーカー1.jpg
View replaced file @
b3f409e5
View file @
8f1819b0
15.1 KB
|
W:
|
H:
15.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/main/resources/static/upload/スニーカー2.jpg
View replaced file @
b3f409e5
View file @
8f1819b0
3.32 KB
|
W:
|
H:
3.31 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/main/resources/templates/cart.html
View file @
8f1819b0
...
@@ -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>
...
...
src/main/resources/templates/index.html
View file @
8f1819b0
...
@@ -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>
...
...
src/main/resources/templates/list.html
View file @
8f1819b0
...
@@ -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 =
"'¥' +${limitedShoes.price}"
class=
"shoePrice shoeLimited"
>
¥10,000
</p>
<p
th:text =
"'¥' +${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 =
"'¥' +${generalShoes.price}"
class=
"shoePrice"
>
¥10,000
</p>
<p
th:text =
"'¥' +${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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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