From 4461ec15ca41faa3e093225855bb9f628d63c4e0 Mon Sep 17 00:00:00 2001 From: "mingxing.ai" Date: Mon, 11 Sep 2023 12:01:58 +0800 Subject: [PATCH] init --- .../ruoyi/client/controller/ClientUserController.java | 8 ++++++++ .../client/controller/FundAccountInfoController.java | 9 +++++++++ .../com/ruoyi/client/service/IClientUserService.java | 2 ++ 3 files changed, 19 insertions(+) diff --git a/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/ClientUserController.java b/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/ClientUserController.java index 1d8043c36..525101318 100644 --- a/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/ClientUserController.java +++ b/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/ClientUserController.java @@ -145,4 +145,12 @@ public R getClientUserInfo() { return R.ok(clientUserInfoVo); } + @PostMapping("/register") + public R register(@RequestBody ClientUser clientUser) { + if (clientUser == null || StringUtils.isAllBlank(clientUser.getUserName(), clientUser.getPassword())) { + return R.fail("Username or password must not blank!"); + } + return R.ok(true); + } + } diff --git a/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/FundAccountInfoController.java b/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/FundAccountInfoController.java index 0d832acd8..d4e761544 100644 --- a/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/FundAccountInfoController.java +++ b/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/controller/FundAccountInfoController.java @@ -122,4 +122,13 @@ public AjaxResult withdrawAcct(@RequestBody FundAccountInfo fundAccountInfo) { return success(list); } + @PostMapping("/bindWithdrawAcct") + public AjaxResult bindWithdrawAcct(@RequestBody FundAccountInfo fundAccountInfo) { + fundAccountInfo.setAccountType("withdraw"); + fundAccountInfo.setUserId(SecurityContextHolder.getUserId()); + fundAccountInfo.setUserName(SecurityContextHolder.getUserName()); + fundAccountInfoService.insertFundAccountInfo(fundAccountInfo); + return success(); + } + } diff --git a/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/service/IClientUserService.java b/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/service/IClientUserService.java index 5bf3c40e6..8c78e7311 100644 --- a/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/service/IClientUserService.java +++ b/ruoyi-modules/ruoyi-client/src/main/java/com/ruoyi/client/service/IClientUserService.java @@ -61,4 +61,6 @@ public interface IClientUserService public int deleteClientUserByUserId(Long userId); public ClientUser selectUserByUserName(String username); + + }