| | |
| | | public Result updateWallt(@Valid TransferModel model) { |
| | | String partyId = SecurityUtils.getCurrentUserId(); |
| | | if(!StringUtils.isNotEmpty(partyId)){ |
| | | throw new YamiShopBindException("请登录!"); |
| | | throw new YamiShopBindException("Please log in!"); |
| | | } |
| | | return capitaltWalletService.updateWallt(partyId,model.getDeductAccount(),model.getReceiveAccount(),model.getMoneyRevise()); |
| | | } |
| | |
| | | public Result updateWallt() { |
| | | String partyId = SecurityUtils.getCurrentUserId(); |
| | | if(!StringUtils.isNotEmpty(partyId)){ |
| | | throw new YamiShopBindException("请登录!"); |
| | | throw new YamiShopBindException("Please log in!"); |
| | | } |
| | | // 获取合约账户(contract) |
| | | Wallet wallet = walletService.saveWalletByPartyId(partyId); |
| | |
| | | Map<String, BigDecimal> assets = new HashMap<>(); |
| | | |
| | | assets.put("contract",wallet.getMoney().setScale(2,RoundingMode.DOWN)); |
| | | assets.put("amountToBeCovered",wallet.getAmountToBeCovered().setScale(2,RoundingMode.DOWN)); |
| | | assets.put("capital",capitaltWallet.getMoney().add(walletExtendMoney).setScale(2,RoundingMode.DOWN)); |
| | | assets.put("capitalUSDT",capitaltWallet.getMoney());//划转专用 |
| | | return Result.succeed(assets); |