|
@@ -5,8 +5,11 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.response.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.IScenePlusService;
|
|
|
import com.fdkankan.manage.service.ISceneProService;
|
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -27,6 +30,8 @@ public class SceneController {
|
|
|
@Autowired
|
|
|
ISceneProService sceneProService;
|
|
|
@Autowired
|
|
|
+ IScenePlusService scenePlusService;
|
|
|
+ @Autowired
|
|
|
IDownService downService;
|
|
|
@Resource
|
|
|
FdKKClient fdKKClient;
|
|
@@ -109,6 +114,14 @@ public class SceneController {
|
|
|
*/
|
|
|
@GetMapping("/rebuildScene")
|
|
|
public ResultData rebuild(@RequestParam(required = false) String num){
|
|
|
+ ScenePro scenePro = sceneProService.getByNum(num);
|
|
|
+ if(scenePro!=null){
|
|
|
+ throw new BusinessException(-1,"V3场景请先升级在重算");
|
|
|
+ }
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
+ if(scenePlus == null){
|
|
|
+ throw new BusinessException(-1,"场景不存在");
|
|
|
+ }
|
|
|
HashMap<String,Object> paramMap = new HashMap<>();
|
|
|
paramMap.put("num",num);
|
|
|
JSONObject jsonObject = fdKKClient.rebuildScene(paramMap);
|