From 5a7c1afc3942fbc8f70e198620e831922ae79028 Mon Sep 17 00:00:00 2001 From: ronger Date: Fri, 10 Dec 2021 19:35:56 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=88=91=E7=9A=84=E9=92=B1?= =?UTF-8?q?=E5=8C=85=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../forest/web/api/bank/WalletController.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/main/java/com/rymcu/forest/web/api/bank/WalletController.java diff --git a/src/main/java/com/rymcu/forest/web/api/bank/WalletController.java b/src/main/java/com/rymcu/forest/web/api/bank/WalletController.java new file mode 100644 index 0000000..d5d8372 --- /dev/null +++ b/src/main/java/com/rymcu/forest/web/api/bank/WalletController.java @@ -0,0 +1,35 @@ +package com.rymcu.forest.web.api.bank; + +import com.rymcu.forest.core.result.GlobalResult; +import com.rymcu.forest.core.result.GlobalResultGenerator; +import com.rymcu.forest.core.service.security.annotation.SecurityInterceptor; +import com.rymcu.forest.dto.BankAccountDTO; +import com.rymcu.forest.service.BankAccountService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +/** + * Created on 2021/12/10 19:25. + * + * @author ronger + * @email ronger-x@outlook.com + */ +@RestController +@RequestMapping("/api/v1/wallet") +public class WalletController { + + @Resource + private BankAccountService bankAccountService; + + + @GetMapping("/{idUser}") + @SecurityInterceptor + public GlobalResult detail(@PathVariable Integer idUser) { + BankAccountDTO bankAccount = bankAccountService.findBankAccountByIdUser(idUser); + return GlobalResultGenerator.genSuccessResult(bankAccount); + } +}