|
@@ -5,8 +5,12 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.contro.service.IAppCameraFailLogService;
|
|
|
import com.fdkankan.contro.service.ISceneFileBuildService;
|
|
|
+import com.fdkankan.contro.service.ISceneUploadCountService;
|
|
|
+import com.fdkankan.contro.vo.ReportFailLogVO;
|
|
|
import com.fdkankan.contro.vo.ResponseSceneFile;
|
|
|
+import com.fdkankan.contro.vo.SceneUploadCountParamVO;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
@@ -14,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
@@ -34,6 +39,12 @@ public class SceneFileController{
|
|
|
@Autowired
|
|
|
private FYunFileServiceInterface fYunFileService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISceneUploadCountService sceneUploadCountService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAppCameraFailLogService appCameraFailLogService;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 场景文件上传之前先获取fileId
|
|
@@ -69,8 +80,11 @@ public class SceneFileController{
|
|
|
}
|
|
|
|
|
|
@GetMapping("rebuildScene")
|
|
|
- public ResultData rebuildScene(@RequestParam(value = "num") String num,@RequestParam(value = "force",defaultValue = "false") Boolean force ,@RequestParam(value = "deleteExtras",defaultValue = "true") Boolean deleteExtras) throws IOException {
|
|
|
- return sceneFileBuildService.rebuildScene(num,force,deleteExtras);
|
|
|
+ public ResultData rebuildScene(@RequestParam(value = "num") String num,
|
|
|
+ @RequestParam(value = "force",defaultValue = "false") Boolean force ,
|
|
|
+ @RequestParam(value = "deleteExtras",defaultValue = "true") Boolean deleteExtras,
|
|
|
+ @RequestParam(value = "from", defaultValue = "api") String from) throws IOException {
|
|
|
+ return sceneFileBuildService.rebuildScene(num,force,deleteExtras, from);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -119,4 +133,22 @@ public class SceneFileController{
|
|
|
@RequestParam(value = "sourceBucket") String sourceBucket) throws Exception {
|
|
|
return sceneFileBuildService.copyDataAndBuild(sourceBucket,dataSource ,sceneVer);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 记录app触发上传场景
|
|
|
+ * @param param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/increSceneUploadCount")
|
|
|
+ public ResultData increSceneUploadCount(@RequestBody @Valid SceneUploadCountParamVO param){
|
|
|
+ sceneUploadCountService.increSceneUploadCount(param);
|
|
|
+ return ResultData.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/reportFailLog")
|
|
|
+ public ResultData reportFailLog(@RequestBody @Valid ReportFailLogVO param){
|
|
|
+ appCameraFailLogService.reportFailLog(param);
|
|
|
+ return ResultData.ok();
|
|
|
+ }
|
|
|
+
|
|
|
}
|