| | |
| | | |
| | | @ApiOperation(value = "提现", notes = "提现") |
| | | @PostMapping(value = "/withdraw") |
| | | public FebsResponse withdraw(@RequestBody WithdrawDto withdrawDto) { |
| | | public FebsResponse withdraw(@RequestBody @Valid WithdrawDto withdrawDto) { |
| | | dappWalletService.withdraw(withdrawDto); |
| | | return new FebsResponse().success().message("success"); |
| | | } |
| | |
| | | public BigDecimal calPrice(PriceDto priceDto) { |
| | | String priceStr = redisUtils.getString(AppContants.REDIS_KEY_TFC_NEW_PRICE); |
| | | |
| | | return priceDto.getAmount().multiply(new BigDecimal("0.1")).divide(new BigDecimal(priceStr), 2, RoundingMode.HALF_UP); |
| | | BigDecimal amount = priceDto.getAmount(); |
| | | if (priceDto.getAmount() == null) { |
| | | amount = BigDecimal.ZERO; |
| | | } |
| | | return amount.multiply(new BigDecimal("0.1")).divide(new BigDecimal(priceStr), 2, RoundingMode.HALF_UP); |
| | | } |
| | | |
| | | @Override |