Administrator
6 days ago 8cadc2c947d541bd2621892b5764d2d3e7697cad
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigPersistenceService.java
@@ -111,12 +111,16 @@
                .addPositionQuantity(dto.getAddPositionQuantity() > 0 ? dto.getAddPositionQuantity() : 1)
                .maxPositionPerSide(dto.getMaxPositionPerSide())
                .addPositionStartThreshold(dto.getAddPositionStartThreshold() >= 0 ? dto.getAddPositionStartThreshold() : 1)
                .addPositionStopThreshold(dto.getAddPositionStopThreshold() >= 0 ? dto.getAddPositionStopThreshold() : 0)
                .placeExcessTakeProfit(normalizeTakeProfitMode(dto.getPlaceExcessTakeProfit()))
                .dualStopLossEnabled(nvl(dto.getDualStopLossEnabled(), false))
                .longStopLossPrice(dto.getLongStopLossPrice())
                .shortStopLossPrice(dto.getShortStopLossPrice())
                .tpTriggerOppositeAddEnabled(nvl(dto.getTpTriggerOppositeAddEnabled(), false))
                .tpTriggerOppositeAddQuantity(dto.getTpTriggerOppositeAddQuantity() != null && dto.getTpTriggerOppositeAddQuantity() > 0 ? dto.getTpTriggerOppositeAddQuantity() : 0)
                .tpPositionReplenishEnabled(nvl(dto.getTpPositionReplenishEnabled(), false))
                .baseTakeProfitPerGrid(dto.getBaseTakeProfitPerGrid() != null && dto.getBaseTakeProfitPerGrid().compareTo(BigDecimal.ZERO) > 0 ? dto.getBaseTakeProfitPerGrid() : BigDecimal.ZERO)
                .baseTakeProfitGridCount(dto.getBaseTakeProfitGridCount() != null && dto.getBaseTakeProfitGridCount() > 0 ? dto.getBaseTakeProfitGridCount() : 0)
                .build();
    }