lyhzzz 1 year ago
parent
commit
a4b274e7fe

+ 2 - 1
src/main/java/com/fdkankan/agent/httpClient/client/LaserClient.java

@@ -5,6 +5,7 @@ import com.fdkankan.agent.httpClient.address.LaserAddressSource;
 import com.fdkankan.agent.httpClient.request.LaserSceneMoveParam;
 import com.fdkankan.agent.httpClient.request.LaserSceneParam;
 import com.fdkankan.agent.httpClient.response.FdkkResponse;
+import com.fdkankan.agent.httpClient.response.LaserResponse;
 
 import java.util.List;
 import java.util.Map;
@@ -19,7 +20,7 @@ public interface LaserClient {
      * 获取深时场景数据
      */
     @Post("/laser/4dage/managerSceneList")
-    FdkkResponse sceneList(@JSONBody LaserSceneParam param);
+    LaserResponse sceneList(@JSONBody LaserSceneParam param);
     /**
      * 相机迁移
      */

+ 1 - 1
src/main/java/com/fdkankan/agent/httpClient/response/FdkkResponse.java

@@ -7,5 +7,5 @@ import lombok.Data;
 public class FdkkResponse<T> {
     private Integer code;
     private String msg;
-    private JSONObject data;
+    private T data;
 }

+ 11 - 0
src/main/java/com/fdkankan/agent/httpClient/response/LaserResponse.java

@@ -0,0 +1,11 @@
+package com.fdkankan.agent.httpClient.response;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.Data;
+
+@Data
+public class LaserResponse<T> {
+    private Integer code;
+    private String msg;
+    private JSONObject data;
+}

+ 4 - 3
src/main/java/com/fdkankan/agent/httpClient/service/LaserService.java

@@ -10,6 +10,7 @@ import com.fdkankan.agent.httpClient.client.LaserClient;
 import com.fdkankan.agent.httpClient.request.LaserSceneMoveParam;
 import com.fdkankan.agent.httpClient.request.LaserSceneParam;
 import com.fdkankan.agent.httpClient.response.FdkkResponse;
+import com.fdkankan.agent.httpClient.response.LaserResponse;
 import com.fdkankan.agent.request.SceneParam;
 import com.fdkankan.agent.response.SceneVo;
 import com.fdkankan.agent.service.ICameraDetailService;
@@ -51,8 +52,8 @@ public class LaserService {
             voPage.setTotal(0);
             return PageInfo.PageInfo(voPage);
         }
-        FdkkResponse response = laserClient.sceneList(laserSceneParam);
-        JSONObject jsonObject = (JSONObject) response.getData();
+        LaserResponse response = laserClient.sceneList(laserSceneParam);
+        JSONObject jsonObject = response.getData();
         if(jsonObject == null){
             Page<SceneVo> voPage = new Page<>(param.getPageNum(),param.getPageSize());
             voPage.setRecords(new ArrayList<>());
@@ -166,7 +167,7 @@ public class LaserService {
 
     public HashMap<String, JSONObject> list(LaserSceneParam newParam) {
         HashMap<String, JSONObject> map = new HashMap<>();
-        FdkkResponse fdkkResponse = laserClient.sceneList(newParam);
+        LaserResponse fdkkResponse = laserClient.sceneList(newParam);
         JSONObject jsonObject = fdkkResponse.getData();
         if(jsonObject == null){
             return map;