|
@@ -79,6 +79,9 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
@Value("${queue.modeling.v3.modeling-pre}")
|
|
|
private String queueV3ModelingPre;
|
|
|
|
|
|
+ @Value("${v3.controlUrl:#{null}}")
|
|
|
+ private String v3controlUrl;
|
|
|
+
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
|
|
@@ -565,12 +568,16 @@ public class SceneFileBuildServiceImpl extends ServiceImpl<ISceneFileBuildMapper
|
|
|
|
|
|
public void callV3Service(String params){
|
|
|
log.info("params:{}", params);
|
|
|
+ if(ObjectUtils.isEmpty(v3controlUrl)){
|
|
|
+ log.error("未配置V3服务器!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.MULTIPART_FORM_DATA);
|
|
|
MultiValueMap<String,String> paramMap = new LinkedMultiValueMap();
|
|
|
paramMap.add("params",params);
|
|
|
HttpEntity<Object> formEntity = new HttpEntity<>(paramMap,headers);
|
|
|
- ResponseEntity<Result> responseEntity = restTemplate.postForEntity("http://172.18.157.42:8086/api/scene/file/uploadSuccessBuild", formEntity, Result.class);
|
|
|
+ ResponseEntity<Result> responseEntity = restTemplate.postForEntity(v3controlUrl+"api/scene/file/uploadSuccessBuild", formEntity, Result.class);
|
|
|
if (responseEntity.getStatusCode() != HttpStatus.OK || responseEntity.getBody().getCode() != HttpStatus.OK.value()) {
|
|
|
log.error("正顺场景请求V3服务器失败!");
|
|
|
return;
|