|
@@ -4,16 +4,14 @@ package com.fdkankan.manage.controller;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
|
+import com.fdkankan.manage.entity.SceneCopyLog;
|
|
|
import com.fdkankan.manage.entity.ScenePlusExt;
|
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
|
import com.fdkankan.manage.common.ResultData;
|
|
|
import com.fdkankan.manage.entity.ScenePlus;
|
|
|
import com.fdkankan.manage.entity.ScenePro;
|
|
|
import com.fdkankan.manage.httpClient.client.FdKKClient;
|
|
|
-import com.fdkankan.manage.service.IDownService;
|
|
|
-import com.fdkankan.manage.service.IScenePlusExtService;
|
|
|
-import com.fdkankan.manage.service.IScenePlusService;
|
|
|
-import com.fdkankan.manage.service.ISceneProService;
|
|
|
+import com.fdkankan.manage.service.*;
|
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -21,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
@@ -44,6 +43,8 @@ public class SceneController {
|
|
|
FdKKClient fdKKClient;
|
|
|
@Autowired
|
|
|
FYunFileServiceInterface fYunFileServiceInterface;
|
|
|
+ @Autowired
|
|
|
+ ISceneCopyLogService sceneCopyLogService;
|
|
|
|
|
|
@PostMapping("/list")
|
|
|
public ResultData list(@RequestBody SceneParam param){
|
|
@@ -147,6 +148,11 @@ public class SceneController {
|
|
|
if(StringUtils.isBlank(dataSource)){
|
|
|
throw new BusinessException(ResultCode.SCENE_REBUILD_ERROR);
|
|
|
}
|
|
|
+ Long countByNewNum = sceneCopyLogService.getCountByNewNum(num);
|
|
|
+ if(countByNewNum >0){
|
|
|
+ throw new BusinessException(ResultCode.COPY_NUM_NOTREBUILD);
|
|
|
+ }
|
|
|
+
|
|
|
if(!fYunFileServiceInterface.fileExist(dataSource.replace("/mnt/data","home")+"/data.fdage")){
|
|
|
throw new BusinessException(ResultCode.SCENE_REBUILD_ERROR);
|
|
|
}
|