Helius
2020-07-07 0b5d48fe9362a4fc3378facb29f571d8553cd658
modify
1 files modified
4 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
@@ -385,19 +385,23 @@
                // 开多止盈
                if (stopProfitPrice != null) {
                    model = new OrderModel(holdOrderEntity.getId(), RabbitPriceTypeEnum.CLOSE_MORE_STOP_PROFIT.getValue(), stopProfitPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), holdOrderEntity.getSymbol());
                    producer.sendPriceOperate(JSONObject.toJSONString(model));
                }
                // 开多止损
                if (stopLessPrice != null) {
                    model = new OrderModel(holdOrderEntity.getId(), RabbitPriceTypeEnum.CLOSE_MORE_STOP_LESS.getValue(), stopLessPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), holdOrderEntity.getSymbol());
                    producer.sendPriceOperate(JSONObject.toJSONString(model));
                }
            } else {
                // 开空止盈
                if (stopProfitPrice != null) {
                    model = new OrderModel(holdOrderEntity.getId(), RabbitPriceTypeEnum.CLOSE_LESS_STOP_PROFIT.getValue(), stopProfitPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), holdOrderEntity.getSymbol());
                    producer.sendPriceOperate(JSONObject.toJSONString(model));
                }
                // 开空止损
                if (stopLessPrice != null) {
                    model = new OrderModel(holdOrderEntity.getId(), RabbitPriceTypeEnum.CLOSE_LESS_STOP_LESS.getValue(), stopLessPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), holdOrderEntity.getSymbol());
                    producer.sendPriceOperate(JSONObject.toJSONString(model));
                }
            }
            producer.sendPriceOperate(JSONObject.toJSONString(model));