-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...ltbooks/src/main/java/com/ebook/multbooks/app/withdraw/controller/WithDrawController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.ebook.multbooks.app.withdraw.controller; | ||
|
||
import com.ebook.multbooks.global.rq.Rq; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
import javax.validation.Valid; | ||
|
||
@RequestMapping("/withdraw") | ||
@RequiredArgsConstructor | ||
@Controller | ||
public class WithDrawController { | ||
private final Rq rq; | ||
|
||
/* | ||
* 출금 페이지로 이동 | ||
* */ | ||
@PreAuthorize("isAuthenticated()") | ||
@GetMapping("/apply") | ||
public String showApply(Model model){ | ||
|
||
return "withdraw/apply"; | ||
} | ||
/* | ||
* 출금 처리 후 | ||
* 내역으로 이동 | ||
* */ | ||
@PreAuthorize("isAuthenticated()") | ||
@PostMapping("/apply") | ||
public String apply(){ | ||
return "withdraw/list"; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
3_Week_Mission/multbooks/src/main/java/com/ebook/multbooks/app/withdraw/entity/WithDraw.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.ebook.multbooks.app.withdraw.entity; | ||
|
||
import com.ebook.multbooks.app.base.entity.BaseEntity; | ||
import com.ebook.multbooks.app.base.entity.BaseTimeEntity; | ||
import com.ebook.multbooks.app.cash.entity.CashLog; | ||
import com.ebook.multbooks.app.member.entity.Member; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
import javax.persistence.Entity; | ||
import javax.persistence.FetchType; | ||
import javax.persistence.ManyToOne; | ||
import java.time.LocalDateTime; | ||
|
||
@SuperBuilder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Entity | ||
public class WithDraw extends BaseEntity { | ||
private int price; | ||
private String bankName; | ||
private String bankAccount; | ||
private LocalDateTime WithDrawDate; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
private Member member; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
private CashLog cashLog; | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
...ltbooks/src/main/java/com/ebook/multbooks/app/withdraw/repository/WithDrawRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.ebook.multbooks.app.withdraw.repository; | ||
|
||
import com.ebook.multbooks.app.withdraw.entity.WithDraw; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface WithDrawRepository extends JpaRepository<WithDraw,Long> { | ||
} |