| | |
| | | } |
| | | 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") |