| | |
| | | Wallet wallet = this.walletService.saveWalletByPartyId(partyId); |
| | | BigDecimal buyAmt = nowPrice.multiply(new BigDecimal(num)); |
| | | //手续费比率 |
| | | Double feeRate = sysparaService.find("exchange_apply_order_buy_fee").getDouble(); |
| | | Double feeRate = sysparaService.find("exchange_apply_order_dz_buy_fee").getDouble(); |
| | | BigDecimal orderFree = buyAmt.multiply(BigDecimal.valueOf(feeRate)); |
| | | if (buyAmt.doubleValue() < 300) { |
| | | orderFree = BigDecimal.ONE; |
| | | } |
| | | BigDecimal orderAmt = buyAmt.add(orderFree); |
| | | if (wallet.getMoney().compareTo(orderAmt) < 0) { |
| | | return Result.failed("余额不足"); |
| | |
| | | //手续费比率 |
| | | Double feeRate = sysparaService.find("exchange_apply_order_dz_buy_fee").getDouble(); |
| | | BigDecimal orderFree = buyAmt.multiply(BigDecimal.valueOf(feeRate)); |
| | | if (buyAmt.doubleValue() < 300) { |
| | | orderFree = BigDecimal.ONE; |
| | | } |
| | | |
| | | |
| | | BigDecimal orderAmt = buyAmt.add(orderFree); |
| | | if (wallet.getMoney().compareTo(orderAmt) < 0) { |
| | | throw new YamiShopBindException("订单失败,资金不足"); |
| | |
| | | //手续费比率 |
| | | Double feeRate = sysparaService.find("exchange_apply_order_dz_sell_fee").getDouble(); |
| | | BigDecimal orderFree = sellAmt.multiply(BigDecimal.valueOf(feeRate)); |
| | | if (sellAmt.doubleValue() < 300) { |
| | | orderFree = BigDecimal.ONE; |
| | | } |
| | | |
| | | |
| | | String symbol = stockDz.getStockCode(); |
| | | Realtime realtime = this.dataService.realtime(symbol).get(0); |