From c1be55f61d9e93e93aff06a88c53f874fe25bb40 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 06 Jan 2026 15:32:36 +0800
Subject: [PATCH] feat(coin): 添加BNB/USDT交易对支持

---
 src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java |   50 +++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 43 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java b/src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java
index 36cbffa..7098376 100644
--- a/src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java
+++ b/src/main/java/com/xcong/excoin/rabbit/pricequeue/PricePriorityQueue.java
@@ -108,6 +108,20 @@
 
     private static Map<String, List<OrderModel>> ETC_MAP_DESC = null;
 
+    /**
+     * ETC 倒序队列 头元素最大 开多止盈 开空止损 开空爆仓 限价开空
+     */
+    private static PriorityBlockingQueue<DescBigDecimal> BNB_QUEUE_DESC = null;
+
+    private static Map<String, List<OrderModel>> BNB_MAP_DESC = null;
+
+    /**
+     * ETC 正序队列 头元素最小 开多止损 开空止盈 开多爆仓 限价开多
+     */
+    private static PriorityBlockingQueue<AscBigDecimal> BNB_QUEUE_ASC = null;
+
+    private static Map<String, List<OrderModel>> BNB_MAP_ASC = null;
+
 
     // 收到消息队列的方法 即收取到新的止盈止损等
     // 【1:买入委托2:开多3:开空4:平多5:平空6:爆仓平多7:爆仓平空8:撤单9:止盈平多10:止盈平空11:止损平多12:止损平空】
@@ -149,6 +163,11 @@
                         ETC_QUEUE_ASC = new PriorityBlockingQueue<AscBigDecimal>();
                     }
                     return ETC_QUEUE_ASC;
+            case "BNB/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
+                    if (BNB_QUEUE_ASC == null) {
+                        BNB_QUEUE_ASC = new PriorityBlockingQueue<AscBigDecimal>();
+                    }
+                    return BNB_QUEUE_ASC;
             default:
                 break;
         }
@@ -193,6 +212,11 @@
                         ETC_QUEUE_DESC = new PriorityBlockingQueue<DescBigDecimal>();
                     }
                     return ETC_QUEUE_DESC;
+            case "BNB/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
+                    if (BNB_QUEUE_DESC == null) {
+                        BNB_QUEUE_DESC = new PriorityBlockingQueue<DescBigDecimal>();
+                    }
+                    return BNB_QUEUE_DESC;
             default:
                 break;
         }
@@ -208,7 +232,7 @@
     public static Map<String,List<OrderModel>> getOrderMap(String symbol, int type) {
         switch (symbol) {
             case "BTC/USDT": // 开空止损 开多止盈 开空爆仓 限价开空
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (BTC_MAP_ASC == null) {
                         BTC_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -220,7 +244,7 @@
                     return BTC_MAP_DESC;
                 }
             case "ETH/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (ETH_MAP_ASC == null) {
                         ETH_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -232,7 +256,7 @@
                     return ETH_MAP_DESC;
                 }
             case "XRP/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (XRP_MAP_ASC == null) {
                         XRP_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -244,7 +268,7 @@
                     return XRP_MAP_DESC;
                 }
             case "LTC/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (LTC_MAP_ASC == null) {
                         LTC_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -256,7 +280,7 @@
                     return LTC_MAP_DESC;
                 }
             case "BCH/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (BCH_MAP_ASC == null) {
                         BCH_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -268,7 +292,7 @@
                     return BCH_MAP_DESC;
                 }
             case "EOS/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (EOS_MAP_ASC == null) {
                         EOS_MAP_ASC =  new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -280,7 +304,7 @@
                     return EOS_MAP_DESC;
                 }
             case "ETC/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
-                if (type == 12 || type == 9 || type == 7 || type == 3) {
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
                     if (ETC_MAP_ASC == null) {
                         ETC_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
                     }
@@ -291,6 +315,18 @@
                     }
                     return ETC_MAP_DESC;
                 }
+            case "BNB/USDT": // 开多止损 开空止盈 开多爆仓 限价开多
+                if (type == 12 || type == 9 || type == 7 || type == 3 || type == 4) {
+                    if (BNB_MAP_ASC == null) {
+                        BNB_MAP_ASC = new ConcurrentHashMap<String,List<OrderModel>>();
+                    }
+                    return BNB_MAP_ASC;
+                } else {
+                    if (BNB_MAP_DESC == null) {
+                        BNB_MAP_DESC = new ConcurrentHashMap<String,List<OrderModel>>();
+                    }
+                    return BNB_MAP_DESC;
+                }
             default:
                 break;
         }

--
Gitblit v1.9.1