Skip to content

Commit

Permalink
#29 - Feat: 출금 계좌 정보가 존재하지 않으면 출금 계좌 관리 페이지로 리다이렉트, 관리 페이지에 출금 신청 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ahah525 committed Nov 7, 2022
1 parent 276b979 commit 76a89d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public class WithdrawController {
@GetMapping("/apply")
public String showApply(@AuthenticationPrincipal MemberContext memberContext, WithdrawApplyForm withdrawApplyForm, Model model) {
Member member = memberService.findByUsername(memberContext.getUsername());
// 출금 계좌 정보가 존재하지 않으면, 출금 계좌 관리 페이지로 리다이렉트
if(!member.hasBankInfo()) {
return "redirect:/member/manageWithdrawAccount";
}
model.addAttribute("member", member);

return "withdraw/apply";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h1 class="font-bold text-lg">출금계좌 관리</h1>
</div>
<div class="grid grid-cols-2 mt-2 gap-2">
<a href="/member/modifyWithdrawAccount" class="btn btn-secondary btn-outline">출금계좌 수정</a>
<a href="/withdraw/apply" class="btn btn-secondary btn-outline">출금신청</a>
</div>
</th:block>
<th:block th:if="${!member.hasBankInfo()}">
Expand Down

0 comments on commit 76a89d8

Please sign in to comment.