From 9411a5a1eec19f3460eca9a6c82ebb46dc4e2f0d Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 26 六月 2025 20:06:58 +0800 Subject: [PATCH] 大屏接口bug修改 --- ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/WithdrawController.java | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/WithdrawController.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/WithdrawController.java index 5befb35..8c442c4 100644 --- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/WithdrawController.java +++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/controller/WithdrawController.java @@ -66,24 +66,39 @@ } return withdrawClient.withdrawDetailByUser(orderId); } + @GetMapping("/confirmMoney") + @ApiOperation(value = "确认收款", tags = {"用户端-个人中心-提现"}) + @ApiImplicitParams({ + @ApiImplicitParam(value = "提现记录id", name = "id", dataType = "String", required = true) + + }) + public R<String> confirmMoney(@RequestParam("id") String id) { + return withdrawClient.confirmMoney(id); + + } @GetMapping("/confirmWithdraw") @ApiOperation(value = "确认提现", tags = {"用户端-个人中心-提现"}) @ApiImplicitParams({ @ApiImplicitParam(value = "订单id", name = "orderId", dataType = "Integer", required = true) }) - public synchronized R<Boolean> confirmWithdraw(@RequestParam String orderId) { LoginUserInfo loginUser = tokenService.getLoginUserByUser(); if (null == loginUser) { return R.loginExpire("登录失效!"); } if (redisService.hasKey(orderId)) { - return R.repeatedSubmission("请勿重复提交!"); + return R.fail("该笔订单已申请提现"); +// return R.repeatedSubmission("请勿重复提交!"); } redisService.setCacheObject(orderId, "1", 10L, TimeUnit.SECONDS); + Boolean b = withdrawService.confirmWithdraw(orderId, loginUser.getUserid()); - return R.ok(withdrawService.confirmWithdraw(orderId, loginUser.getUserid())); + if (b){ + return R.ok(); + }else { + return R.fail("该笔订单已申请提现"); + } } @GetMapping("/withdrawRecord") -- Gitblit v1.7.1