Administrator
4 days ago 981a87bd0b06a17064f7b0d2435e96045cc03987
refactor(okxApi): 简化条件单状态变更回调方法参数

- 移除 onAutoOrder 方法中的 reason 参数
- 更新日志输出格式以匹配新的方法签名
- 调整 OrdersOkxChannelHandler 中的方法调用以移除传递的 state 参数
2 files modified
8 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/okxApi/OkxGridTradeService.java 6 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/OrdersOkxChannelHandler.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxApi/OkxGridTradeService.java
@@ -415,12 +415,12 @@
    /**
     * 自动订单状态变更回调。由 OrdersOkxChannelHandler 调用。
     */
    public void onAutoOrder(String orderId, String status, String reason, String orderType, String tradeId) {
    public void onAutoOrder(String orderId, String status, String orderType, String tradeId) {
        if (state == StrategyState.STOPPED) {
            return;
        }
        log.info("[OKX] 条件单状态变更, id:{}, status:{}, reason:{}, order_type:{}",
                orderId, status, reason, orderType);
        log.info("[OKX] 条件单状态变更, id:{}, status:{}, order_type:{}",
                orderId, status,  orderType);
        if (!"finished".equals(status)) {
            return;
        }
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/OrdersOkxChannelHandler.java
@@ -142,7 +142,7 @@
                        algoId, orderType, side, posSide, fillSz, tradeId);
                if (getGridTradeService() != null) {
                    getGridTradeService().onAutoOrder(algoId, "finished", state, orderType, tradeId);
                    getGridTradeService().onAutoOrder(algoId, state, orderType, tradeId);
                }
            }
        } catch (Exception e) {