peter
2025-07-17 649a498f54dadae2b019af7d7acac5df8588ffa8
trading-order-bean/src/main/java/com/yami/trading/bean/data/domain/Realtime.java
@@ -66,6 +66,10 @@
     */
    @ApiModelProperty("最新价")
    private BigDecimal close;
    @ApiModelProperty("最新价")
    @TableField(exist = false)
    private BigDecimal closeOld;
    /**
     * 成交量 币个数
     */
@@ -79,6 +83,7 @@
    @ApiModelProperty(" 成交额 金额")
    private BigDecimal volume;
    /**
     * type
     */
@@ -90,6 +95,10 @@
    @TableField(exist = false)
    @ApiModelProperty("涨跌幅")
    private BigDecimal changeRatio;
    @TableField(exist = false)
    @ApiModelProperty("涨跌幅Str")
    private BigDecimal changeRatioStr;
    /**
     * 净值涨跌幅
@@ -179,6 +188,15 @@
    }
    public BigDecimal getchangeRatioStr(){
        if(this.changeRatioStr == null || this.changeRatioStr.compareTo(BigDecimal.ZERO) == 0){
            return changeRatioStr;
        }else {
            return getChangeRatio();
        }
    }
    public BigDecimal getNetChange() {
        BigDecimal netChange = close.multiply(getChangeRatio()).divide(new BigDecimal(100), 10, RoundingMode.HALF_UP);
        netChange = netChange.setScale(4, RoundingMode.DOWN);