啊鑫
2025-08-20 a92e3aeb50efc6ef252d0fbaa2d45b4b7a3f5c61
src/test/java/com/gs/xiaomi/XiaomiApplicationTests.java
@@ -42,13 +42,66 @@
        request.setPageNo(1);
        request.setPageSize(1000);
        //Error: ERROR_IN_MODULECHAIN;ERROR_IN_MODULECHAIN, Sender Channel 'CC_MI_OEM_HTTP_OUT' (ID: a58369adbaa03aafb76d2c02c2ae7cd7): Catching exception calling messaging system
        System.out.println("=== 测试BCS101 API服务(Basic Auth版本) ===");
        try {
            // 调用BCS101 API服务
            // 调用标准BCS101 API服务(只使用Basic Auth)
            String response = bcs101ApiService.getBCS101Data(request);
            System.out.println("BCS101 API Response: " + response);
        } catch (Exception e) {
            System.out.println("BCS101 API调用异常: " + e.getMessage());
            e.printStackTrace();
        }
        //Error: ERROR_IN_MODULECHAIN;ERROR_IN_MODULECHAIN, Sender Channel 'CC_MI_OEM_HTTP_OUT' (ID: a58369adbaa03aafb76d2c02c2ae7cd7): Catching exception calling messaging system
        System.out.println("\n=== 测试BCS101 API服务(带X5协议版本) ===");
        try {
            // 调用带X5协议的BCS101 API服务
            String responseWithX5 = bcs101ApiService.getBCS101DataWithX5(request, true);
            System.out.println("BCS101 API Response (X5): " + responseWithX5);
        } catch (Exception e) {
            System.out.println("BCS101 API X5调用异常: " + e.getMessage());
            e.printStackTrace();
        }
        System.out.println("\n=== 测试BCS101 API服务(调试版本) ===");
        try {
            // 调用调试版本API服务
            String debugResponse = bcs101ApiService.getBCS101DataDebug(request);
            System.out.println("BCS101 API Debug Response: " + debugResponse);
        } catch (Exception e) {
            System.out.println("BCS101 API 调试版本调用异常: " + e.getMessage());
            e.printStackTrace();
        }
        System.out.println("\n=== 测试BCS101 API服务(简化版本) ===");
        try {
            // 调用简化版本API服务
            String simpleResponse = bcs101ApiService.getBCS101DataSimple(request);
            System.out.println("BCS101 API Simple Response: " + simpleResponse);
        } catch (Exception e) {
            System.out.println("BCS101 API 简化版本调用异常: " + e.getMessage());
            e.printStackTrace();
        }
        System.out.println("\n=== 测试BCS101 API服务(X5协议标准版本) ===");
        try {
            // 调用X5协议标准版本
            String x5StandardResponse = bcs101ApiService.getBCS101DataX5Standard(request);
            System.out.println("BCS101 API X5Standard Response: " + x5StandardResponse);
        } catch (Exception e) {
            System.out.println("BCS101 API X5标准版本调用异常: " + e.getMessage());
            e.printStackTrace();
        }
        System.out.println("\n=== 测试BCS101 API服务(X5协议变体版本) ===");
        try {
            // 调用X5协议变体版本
            String x5VariantResponse = bcs101ApiService.getBCS101DataX5Variant(request);
            System.out.println("BCS101 API X5Variant Response: " + x5VariantResponse);
        } catch (Exception e) {
            System.out.println("BCS101 API X5变体版本调用异常: " + e.getMessage());
            e.printStackTrace();
        }
    }
}