소스 검색

车载心跳监测接口定义修改

gao.qiang 1 주 전
부모
커밋
131e41c813
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      business-service/src/main/java/com/ozs/utils/CameraUtil.java

+ 4 - 2
business-service/src/main/java/com/ozs/utils/CameraUtil.java

@@ -32,6 +32,7 @@ import com.ozs.system.mapper.SysDictDataMapper;
 import com.ozs.system.service.ISysDictTypeService;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
+import okhttp3.Response;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
@@ -489,8 +490,9 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
         String result = null;
         String url = bakUrl + "/api/gb28181/invite?id=" + cameraCode + "&channel=" + channel;
         try {
-            result = HttpClientUtil.get(url);
-            log.info("result:{}", result);
+            Response response = HttpClientUtil.get(url);
+            log.info("result:{}", response.code());
+            return String.valueOf(response.code());
         } catch (Exception e) {
             log.info(e.getMessage());
             e.printStackTrace();