lyhzzz 2 年 前
コミット
80a71d781c

+ 12 - 5
src/main/java/com/fdkankan/agent/controller/SceneController.java

@@ -15,11 +15,7 @@ import com.fdkankan.agent.service.ICameraService;
 import com.fdkankan.agent.service.ISceneProService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  *
@@ -83,5 +79,16 @@ public class SceneController extends BaseController {
         sceneProService.copy(param.getNum());
         return ResultData.ok();
     }
+    /**
+     * 场景复制
+     * num      场景码
+     */
+    @GetMapping("/rebuildScene")
+    public JSONObject rebuildScene(@RequestParam(required = false) String num) throws Exception {
+        if(StringUtils.isEmpty(num)){
+            throw new BusinessException(ResultCode.PARAM_MISS);
+        }
+        return fdMangeService.rebuildScene(num);
+    }
 }
 

+ 3 - 0
src/main/java/com/fdkankan/agent/httpClient/client/FdManageClient.java

@@ -7,6 +7,7 @@ import com.fdkankan.agent.httpClient.request.FdkkLoginRequest;
 import com.fdkankan.agent.httpClient.request.SceneMoveParam;
 import com.fdkankan.agent.httpClient.response.FdkkLoginVo;
 import com.fdkankan.agent.httpClient.response.FdkkResponse;
+import org.springframework.web.bind.annotation.GetMapping;
 
 import java.util.HashMap;
 
@@ -24,4 +25,6 @@ public interface FdManageClient {
     JSONObject move(@JSONBody SceneMoveParam param, @Header("sign") String sign);
 
 
+    @GetMapping("/service/manage/inner/rebuildScene")
+    JSONObject rebuildScene(@Query("num") String num);
 }

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

@@ -47,7 +47,7 @@ public class FdMangeService {
     }
 
 
-
-
-
+    public JSONObject rebuildScene(String num) {
+        return fdManageClient.rebuildScene(num);
+    }
 }