响应类型包装
This commit is contained in:
parent
b083222690
commit
9284a33c85
@ -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<T> {
|
||||
public String toString(){
|
||||
return JsonUtils.toJson(this);
|
||||
}
|
||||
|
||||
public JsonResponse<T> getJsonResponse(){
|
||||
return ZlmResponseConvertor.INSTANCE.toJsonResponse(this);
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class MediaServiceTest {
|
||||
log.info("{}", entity.getBody());
|
||||
|
||||
ZlmResponse<List<ServerConfig>> test = zlMediaHttpService.getServerConfig(secret);
|
||||
JsonResponse<List<ServerConfig>> jsonResponse = ZlmResponseConvertor.INSTANCE.toJsonResponse(test);
|
||||
JsonResponse<List<ServerConfig>> jsonResponse = test.getJsonResponse();
|
||||
log.info("{}", jsonResponse);
|
||||
|
||||
ZlmResponse<List<ServerConfig>> zlmResponse = ZlmResponseConvertor.INSTANCE.toZlmResponse(jsonResponse);
|
||||
|
Loading…
Reference in New Issue
Block a user