src/main/java/com/xcong/excoin/modules/contract/parameter/vo/HoldOrderDetailVo.java
@@ -1,6 +1,7 @@ package com.xcong.excoin.modules.contract.parameter.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.xcong.excoin.utils.CommonUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -70,23 +71,31 @@ private int leverRatio; public String getOpeningPrice() { return openingPrice == null ? "" : openingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, openingPrice); } public String getOpeningFeeAmount() { return openingFeeAmount == null ? "" : openingFeeAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, openingFeeAmount); } public String getBondAmount() { return bondAmount == null ? "" : bondAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, bondAmount); } public String getHoldAmount() { return holdAmount == null ? "" : holdAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, holdAmount); } public String getForceClosingPrice() { return forceClosingPrice == null ? "" : forceClosingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, forceClosingPrice); } public String getStopLossPrice() { return CommonUtils.amountDotFormat(this.symbol, stopLossPrice); } public String getStopProfitPrice() { return CommonUtils.amountDotFormat(this.symbol, stopProfitPrice); } public void setOpeningFeeAmount(BigDecimal openingFeeAmount, BigDecimal feeSpread) { src/main/java/com/xcong/excoin/modules/contract/parameter/vo/OrderDetailVo.java
@@ -1,6 +1,7 @@ package com.xcong.excoin.modules.contract.parameter.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.xcong.excoin.utils.CommonUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -85,31 +86,43 @@ private int leverRatio; public String getClosingPrice() { return closingPrice == null ? "" : closingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, closingPrice); } public String getClosingFeeAmount() { return closingFeeAmount == null ? "" : closingFeeAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, closingFeeAmount); } public String getRewardAmount() { return rewardAmount == null ? "" : rewardAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, rewardAmount); } public String getOpeningPrice() { return openingPrice == null ? "" : openingPrice.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, openingPrice); } public String getOpeningFeeAmount() { return openingFeeAmount == null ? "" : openingFeeAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, openingFeeAmount); } public String getBondAmount() { return bondAmount == null ? "" : bondAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, bondAmount); } public String getHoldAmount() { return holdAmount == null ? "" : holdAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, holdAmount); } public String getStopLossPrice() { return CommonUtils.amountDotFormat(this.symbol, stopLossPrice); } public String getStopProfitPrice() { return CommonUtils.amountDotFormat(this.symbol, stopProfitPrice); } public String getEntrustOpeningPrice() { return CommonUtils.amountDotFormat(this.symbol, entrustOpeningPrice); } public void setClosingFeeAmount(BigDecimal closingFeeAmount, BigDecimal feeSpread) { src/main/java/com/xcong/excoin/modules/contract/parameter/vo/OrderListVo.java
@@ -2,6 +2,7 @@ import cn.hutool.core.util.StrUtil; import com.fasterxml.jackson.annotation.JsonFormat; import com.xcong.excoin.utils.CommonUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -87,20 +88,31 @@ return StrUtil.isNotBlank(orderNo) ? orderNo.substring(orderNo.length() - 6) : ""; } public String getOpeningFeeAmount() { return openingFeeAmount == null ? "" : openingFeeAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); public String getOpeningPrice() { return CommonUtils.amountDotFormat(this.symbol, openingPrice); } public String getClosingPrice() { return CommonUtils.amountDotFormat(this.symbol, closingPrice); } public String getOpeningFeeAmount() { return CommonUtils.amountDotFormat(this.symbol, openingFeeAmount); } public String getForceClosingPrice() { return CommonUtils.amountDotFormat(this.symbol, forceClosingPrice); } public String getClosingFeeAmount() { return closingFeeAmount == null ? "" : closingFeeAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, closingFeeAmount); } public String getBondAmount() { return bondAmount == null ? "" : bondAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, bondAmount); } public String getRewardAmount() { return rewardAmount == null ? "" : rewardAmount.setScale(4, BigDecimal.ROUND_DOWN).toPlainString(); return CommonUtils.amountDotFormat(this.symbol, rewardAmount); } } src/main/java/com/xcong/excoin/utils/CommonUtils.java
@@ -14,6 +14,11 @@ */ public static String amountDotFormat(String symbol, BigDecimal price) { String priceFormat = ""; if (price == null) { return ""; } switch (symbol) { case "BTC/USDT": case "ETH/USDT":