| | |
| | | } |
| | | |
| | | public String getOpeningFeeAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, openingFeeAmount); |
| | | return openingFeeAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, bondAmount); |
| | | return bondAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getHoldAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, holdAmount); |
| | | return holdAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |
| | |
| | | return CommonUtils.amountDotFormat(this.symbol, openingPrice); |
| | | } |
| | | |
| | | private String dotFormat(BigDecimal price) { |
| | | String priceFormat = ""; |
| | | switch (this.symbol) { |
| | | case "BTC/USDT": |
| | | case "ETH/USDT": |
| | | case "LTC/USDT": |
| | | case "BCH/USDT": |
| | | priceFormat = price.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | break; |
| | | case "EOS/USDT": |
| | | case "XRP/USDT": |
| | | case "ETC/USDT": |
| | | priceFormat = price.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | break; |
| | | default: |
| | | priceFormat = price.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | return priceFormat; |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, bondAmount); |
| | | return bondAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |
| | |
| | | } |
| | | |
| | | public String getClosingFeeAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, closingFeeAmount); |
| | | return closingFeeAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getRewardAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, rewardAmount); |
| | | return rewardAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getOpeningPrice() { |
| | |
| | | } |
| | | |
| | | public String getOpeningFeeAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, openingFeeAmount); |
| | | return openingFeeAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, bondAmount); |
| | | return bondAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getHoldAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, holdAmount); |
| | | return holdAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getStopLossPrice() { |
| | |
| | | } |
| | | |
| | | public String getOpeningFeeAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, openingFeeAmount); |
| | | return openingFeeAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getForceClosingPrice() { |
| | |
| | | } |
| | | |
| | | public String getClosingFeeAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, closingFeeAmount); |
| | | return closingFeeAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getBondAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, bondAmount); |
| | | return bondAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | |
| | | public String getRewardAmount() { |
| | | return CommonUtils.amountDotFormat(this.symbol, rewardAmount); |
| | | return rewardAmount.setScale(2, BigDecimal.ROUND_DOWN).toPlainString(); |
| | | } |
| | | } |
| | |
| | | BigDecimal newPriceSymbol = new BigDecimal(redisUtils.getString(CoinTypeConvert.convertToKey(symbol))); |
| | | |
| | | List<ContractEntrustOrderEntity> entrustOrderEntities = contractEntrustOrderDao.selectEntrustOrderListByMemberId(memberEntity.getId()); |
| | | List<ContractHoldOrderEntity> holdOrderEntities = contractHoldOrderDao.selectHoldOrderListByMemberId(memberEntity.getId()); |
| | | List<ContractHoldOrderEntity> holdOrderEntities = contractHoldOrderDao.selectHoldOrderListByMemberIdAndSymbolTest(memberEntity.getId(), ContractOrderEntity.CONTRACTTYPE_NORMAL); |
| | | MemberWalletContractEntity walletContractEntity = memberWalletContractDao.findWalletContractByMemberIdAndSymbol(memberEntity.getId(), CoinTypeEnum.USDT.name()); |
| | | // if (memberEntity.getContractPositionType().equals(ContractEntrustOrderEntity.POSITION_TYPE_ADD)) { |
| | | // // 当前合约委托单 |