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
9ab0ae82
Commit
9ab0ae82
authored
Oct 22, 2020
by
keita.onoguchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
調整途中
parent
77ae3237
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
2 deletions
+4
-2
WalletsRepository.java
src/main/java/com/example/repository/WalletsRepository.java
+1
-0
WalletsService.java
src/main/java/com/example/service/WalletsService.java
+1
-1
cart.js
src/main/resources/static/js/cart.js
+1
-0
cart.html
src/main/resources/templates/cart.html
+1
-1
No files found.
src/main/java/com/example/repository/WalletsRepository.java
View file @
9ab0ae82
...
...
@@ -8,4 +8,5 @@ import com.example.domain.Wallets;
//ウォレット情報をDBから取得
@Repository
public
interface
WalletsRepository
extends
JpaRepository
<
Wallets
,
Integer
>
{
public
Wallets
findByUserId
(
Integer
id
);
}
src/main/java/com/example/service/WalletsService.java
View file @
9ab0ae82
...
...
@@ -19,7 +19,7 @@ public class WalletsService {
}
public
Wallets
findOne
(
Integer
id
){
return
walletsRepository
.
find
One
(
id
);
return
walletsRepository
.
find
ByUserId
(
id
);
}
public
Wallets
create
(
Wallets
wallet
){
...
...
src/main/resources/static/js/cart.js
View file @
9ab0ae82
...
...
@@ -38,6 +38,7 @@ $('#ok-btn').on('click',function(){
})
.
fail
(
function
(){
alert
(
"ウォレットの残高が足りません。チャージしてください"
);
window
.
location
.
href
=
(
$
(
'#wallets'
).
attr
(
'href'
));
})
});
...
...
src/main/resources/templates/cart.html
View file @
9ab0ae82
...
...
@@ -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><a
th:href=
"@{/limited/wallets/{id}(id=${user.id})}"
>
Wallets
</a></li>
<li><a
id=
"wallets"
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>
...
...
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