UPDATE: VERSION-20260316
This commit is contained in:
@@ -18,6 +18,12 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.solution</groupId>
|
||||||
|
<artifactId>solution-rule</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.solution</groupId>
|
<groupId>com.solution</groupId>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.solution.common.core.domain.AjaxResult;
|
|||||||
import com.solution.common.core.page.TableDataInfo;
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
import com.solution.common.enums.BusinessType;
|
import com.solution.common.enums.BusinessType;
|
||||||
import com.solution.scene.domain.AfsimScenario;
|
import com.solution.scene.domain.AfsimScenario;
|
||||||
|
import com.solution.scene.domain.AfsimScenarioForm;
|
||||||
import com.solution.scene.service.SceneService;
|
import com.solution.scene.service.SceneService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -32,7 +33,7 @@ public class SceneController extends BaseController {
|
|||||||
@ApiOperation("保存场景配置")
|
@ApiOperation("保存场景配置")
|
||||||
@PostMapping("/saveSceneConfig")
|
@PostMapping("/saveSceneConfig")
|
||||||
@Log(title = "行为树主", businessType = BusinessType.INSERT)
|
@Log(title = "行为树主", businessType = BusinessType.INSERT)
|
||||||
public AjaxResult saveSceneConfig(@RequestBody AfsimScenario afsimScenario)
|
public AjaxResult saveSceneConfig(@RequestBody AfsimScenarioForm afsimScenario)
|
||||||
{
|
{
|
||||||
return toAjax(sceneService.saveOrUpdate(afsimScenario));
|
return toAjax(sceneService.saveOrUpdate(afsimScenario));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.solution.scene.domain;
|
||||||
|
/*
|
||||||
|
* This file is part of the kernelstudio package.
|
||||||
|
*
|
||||||
|
* (c) 2014-2026 zlin <admin@kernelstudio.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE file
|
||||||
|
* that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class AfsimScenarioForm extends AfsimScenario {
|
||||||
|
|
||||||
|
private List<ScenarioRelation> relations;
|
||||||
|
|
||||||
|
public List<ScenarioRelation> getRelations() {
|
||||||
|
return relations;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelations(List<ScenarioRelation> relations) {
|
||||||
|
this.relations = relations;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.solution.scene.domain;
|
||||||
|
/*
|
||||||
|
* This file is part of the kernelstudio package.
|
||||||
|
*
|
||||||
|
* (c) 2014-2026 zlin <admin@kernelstudio.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE file
|
||||||
|
* that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import com.solution.rule.domain.Platform;
|
||||||
|
import com.solution.rule.domain.PlatformComponent;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class ScenarioRelation implements Serializable {
|
||||||
|
|
||||||
|
private String edgeId;
|
||||||
|
|
||||||
|
private String sourceId;
|
||||||
|
|
||||||
|
private String sourcePort;
|
||||||
|
|
||||||
|
private Platform sourcePlatform;
|
||||||
|
|
||||||
|
private PlatformComponent sourceComponent;
|
||||||
|
|
||||||
|
private String targetId;
|
||||||
|
|
||||||
|
private String targetPort;
|
||||||
|
|
||||||
|
private Platform targetPlatform;
|
||||||
|
|
||||||
|
private PlatformComponent targetComponent;
|
||||||
|
|
||||||
|
public String getEdgeId() {
|
||||||
|
return edgeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEdgeId(String edgeId) {
|
||||||
|
this.edgeId = edgeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceId() {
|
||||||
|
return sourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceId(String sourceId) {
|
||||||
|
this.sourceId = sourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourcePort() {
|
||||||
|
return sourcePort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourcePort(String sourcePort) {
|
||||||
|
this.sourcePort = sourcePort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Platform getSourcePlatform() {
|
||||||
|
return sourcePlatform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourcePlatform(Platform sourcePlatform) {
|
||||||
|
this.sourcePlatform = sourcePlatform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlatformComponent getSourceComponent() {
|
||||||
|
return sourceComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSourceComponent(PlatformComponent sourceComponent) {
|
||||||
|
this.sourceComponent = sourceComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTargetId() {
|
||||||
|
return targetId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetId(String targetId) {
|
||||||
|
this.targetId = targetId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTargetPort() {
|
||||||
|
return targetPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetPort(String targetPort) {
|
||||||
|
this.targetPort = targetPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Platform getTargetPlatform() {
|
||||||
|
return targetPlatform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetPlatform(Platform targetPlatform) {
|
||||||
|
this.targetPlatform = targetPlatform;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlatformComponent getTargetComponent() {
|
||||||
|
return targetComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTargetComponent(PlatformComponent targetComponent) {
|
||||||
|
this.targetComponent = targetComponent;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.solution.scene.mapper;
|
package com.solution.scene.mapper;
|
||||||
|
|
||||||
import com.solution.scene.domain.AfsimScenario;
|
import com.solution.scene.domain.AfsimScenario;
|
||||||
|
import com.solution.scene.domain.AfsimScenarioForm;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -13,9 +14,9 @@ public interface SceneMapper {
|
|||||||
* @param afsimScenario
|
* @param afsimScenario
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int insert(AfsimScenario afsimScenario);
|
int insert(AfsimScenarioForm afsimScenario);
|
||||||
|
|
||||||
int update(AfsimScenario afsimScenario);
|
int update(AfsimScenarioForm afsimScenario);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.solution.scene.service;
|
package com.solution.scene.service;
|
||||||
|
|
||||||
import com.solution.scene.domain.AfsimScenario;
|
import com.solution.scene.domain.AfsimScenario;
|
||||||
|
import com.solution.scene.domain.AfsimScenarioForm;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -11,11 +12,11 @@ public interface SceneService {
|
|||||||
* @param afsimScenario
|
* @param afsimScenario
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int insert(AfsimScenario afsimScenario);
|
int insert(AfsimScenarioForm afsimScenario);
|
||||||
|
|
||||||
int update(AfsimScenario afsimScenario);
|
int update(AfsimScenarioForm afsimScenario);
|
||||||
|
|
||||||
int saveOrUpdate(AfsimScenario afsimScenario);
|
int saveOrUpdate(AfsimScenarioForm afsimScenario);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取场景列表
|
* 获取场景列表
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.solution.scene.service.impl;
|
package com.solution.scene.service.impl;
|
||||||
|
|
||||||
import com.solution.scene.domain.AfsimScenario;
|
import com.solution.scene.domain.AfsimScenario;
|
||||||
|
import com.solution.scene.domain.AfsimScenarioForm;
|
||||||
import com.solution.scene.mapper.SceneMapper;
|
import com.solution.scene.mapper.SceneMapper;
|
||||||
import com.solution.scene.service.SceneService;
|
import com.solution.scene.service.SceneService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -16,17 +17,17 @@ public class SceneServiceImpl implements SceneService {
|
|||||||
private SceneMapper sceneMapper;
|
private SceneMapper sceneMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int insert(AfsimScenario afsimScenario) {
|
public int insert(AfsimScenarioForm afsimScenario) {
|
||||||
return sceneMapper.insert(afsimScenario);
|
return sceneMapper.insert(afsimScenario);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int update(AfsimScenario afsimScenario) {
|
public int update(AfsimScenarioForm afsimScenario) {
|
||||||
return sceneMapper.update(afsimScenario);
|
return sceneMapper.update(afsimScenario);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int saveOrUpdate(AfsimScenario afsimScenario) {
|
public int saveOrUpdate(AfsimScenarioForm afsimScenario) {
|
||||||
if (null != afsimScenario.getId() && afsimScenario.getId() > 0) {
|
if (null != afsimScenario.getId() && afsimScenario.getId() > 0) {
|
||||||
return sceneMapper.update(afsimScenario);
|
return sceneMapper.update(afsimScenario);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user