From 9284a33c85e37fb32b880f4b6410f27e34629133 Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Fri, 18 Aug 2023 17:17:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=8D=E5=BA=94=E7=B1=BB=E5=9E=8B=E5=8C=85?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docking/gb28181/media/dto/response/ZlmResponse.java | 5 +++++ .../java/cn/skcks/docking/gb28181/test/MediaServiceTest.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/dto/response/ZlmResponse.java b/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/dto/response/ZlmResponse.java index b97d33b..2ecfa06 100644 --- a/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/dto/response/ZlmResponse.java +++ b/zlmediakit-service/src/main/java/cn/skcks/docking/gb28181/media/dto/response/ZlmResponse.java @@ -1,5 +1,6 @@ package cn.skcks.docking.gb28181.media.dto.response; +import cn.skcks.docking.gb28181.common.json.JsonResponse; import cn.skcks.docking.gb28181.common.json.JsonUtils; import cn.skcks.docking.gb28181.media.dto.status.ResponseStatus; import io.swagger.v3.oas.annotations.media.Schema; @@ -24,4 +25,8 @@ public class ZlmResponse { public String toString(){ return JsonUtils.toJson(this); } + + public JsonResponse getJsonResponse(){ + return ZlmResponseConvertor.INSTANCE.toJsonResponse(this); + } } diff --git a/zlmediakit-service/src/test/java/cn/skcks/docking/gb28181/test/MediaServiceTest.java b/zlmediakit-service/src/test/java/cn/skcks/docking/gb28181/test/MediaServiceTest.java index 56a9e3d..78c9b9a 100644 --- a/zlmediakit-service/src/test/java/cn/skcks/docking/gb28181/test/MediaServiceTest.java +++ b/zlmediakit-service/src/test/java/cn/skcks/docking/gb28181/test/MediaServiceTest.java @@ -43,7 +43,7 @@ public class MediaServiceTest { log.info("{}", entity.getBody()); ZlmResponse> test = zlMediaHttpService.getServerConfig(secret); - JsonResponse> jsonResponse = ZlmResponseConvertor.INSTANCE.toJsonResponse(test); + JsonResponse> jsonResponse = test.getJsonResponse(); log.info("{}", jsonResponse); ZlmResponse> zlmResponse = ZlmResponseConvertor.INSTANCE.toZlmResponse(jsonResponse);