Commit 762fa782 authored by keita.onoguchi's avatar keita.onoguchi

Merge branch '調整' into 'master'

調整途中

See merge request !68
parents 77ae3237 9ab0ae82
......@@ -8,4 +8,5 @@ import com.example.domain.Wallets;
//ウォレット情報をDBから取得
@Repository
public interface WalletsRepository extends JpaRepository<Wallets, Integer> {
public Wallets findByUserId(Integer id);
}
......@@ -19,7 +19,7 @@ public class WalletsService {
}
public Wallets findOne(Integer id){
return walletsRepository.findOne(id);
return walletsRepository.findByUserId(id);
}
public Wallets create(Wallets wallet){
......
......@@ -38,6 +38,7 @@ $('#ok-btn').on('click',function(){
})
.fail(function(){
alert("ウォレットの残高が足りません。チャージしてください");
window.location.href = ($('#wallets').attr('href'));
})
});
......
......@@ -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>
......
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