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); + } +}