Compare commits
8 Commits
a440094138
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 577bc3e1c0 | |||
| 7c5c5d89ee | |||
| cd18e2a71d | |||
| 06426bcb31 | |||
| ba5913a50b | |||
| 19024e8486 | |||
| c90dfd8ccb | |||
| 60bcac32c5 |
@@ -1,107 +0,0 @@
|
|||||||
package com.solution.web.controller.algo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.solution.common.annotation.Log;
|
|
||||||
import com.solution.common.core.controller.BaseController;
|
|
||||||
import com.solution.common.core.domain.AjaxResult;
|
|
||||||
import com.solution.common.enums.BusinessType;
|
|
||||||
import com.solution.algo.domain.Algorithm;
|
|
||||||
import com.solution.algo.service.IAlgorithmService;
|
|
||||||
import com.solution.common.utils.poi.ExcelUtil;
|
|
||||||
import com.solution.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则Controller
|
|
||||||
*
|
|
||||||
* @author zouju
|
|
||||||
* @date 2026-02-06
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@Api("规则模块")
|
|
||||||
@RequestMapping("/algo/algorithm")
|
|
||||||
public class AlgorithmController extends BaseController {
|
|
||||||
@Autowired
|
|
||||||
private IAlgorithmService algorithmService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询规则列表
|
|
||||||
*/
|
|
||||||
@ApiOperation("查询规则列表")
|
|
||||||
@PreAuthorize("@ss.hasPermi('algo:algorithm:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(Algorithm algorithm) {
|
|
||||||
startPage();
|
|
||||||
List<Algorithm> list = algorithmService.selectAlgorithmList(algorithm);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出规则列表
|
|
||||||
*/
|
|
||||||
@ApiOperation("导出规则列表")
|
|
||||||
@PreAuthorize("@ss.hasPermi('algo:algorithm:export')")
|
|
||||||
@Log(title = "规则", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, Algorithm algorithm) {
|
|
||||||
List<Algorithm> list = algorithmService.selectAlgorithmList(algorithm);
|
|
||||||
ExcelUtil<Algorithm> util = new ExcelUtil<Algorithm>(Algorithm.class);
|
|
||||||
util.exportExcel(response, list, "规则数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取规则详细信息
|
|
||||||
*/
|
|
||||||
@ApiOperation("获取规则详细信息")
|
|
||||||
@PreAuthorize("@ss.hasPermi('algo:algorithm:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
||||||
return success(algorithmService.selectAlgorithmById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增规则
|
|
||||||
*/
|
|
||||||
@ApiOperation("新增规则")
|
|
||||||
@PreAuthorize("@ss.hasPermi('algo:algorithm:add')")
|
|
||||||
@Log(title = "规则", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody Algorithm algorithm) {
|
|
||||||
return toAjax(algorithmService.insertAlgorithm(algorithm));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改规则
|
|
||||||
*/
|
|
||||||
@ApiOperation("修改规则")
|
|
||||||
@PreAuthorize("@ss.hasPermi('algo:algorithm:edit')")
|
|
||||||
@Log(title = "规则", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody Algorithm algorithm) {
|
|
||||||
return toAjax(algorithmService.updateAlgorithm(algorithm));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除规则
|
|
||||||
*/
|
|
||||||
@ApiOperation("删除规则")
|
|
||||||
@PreAuthorize("@ss.hasPermi('algo:algorithm:remove')")
|
|
||||||
@Log(title = "规则", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
|
||||||
return toAjax(algorithmService.deleteAlgorithmByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.solution.web.controller.algo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.algo.domain.SysAlgoConfig;
|
||||||
|
import com.solution.algo.service.ISysAlgoConfigService;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态规则配置Controller
|
||||||
|
*
|
||||||
|
* @author zouju
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/algo/algo")
|
||||||
|
public class SysAlgoConfigController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysAlgoConfigService sysAlgoConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('algo:algo:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysAlgoConfig> list = sysAlgoConfigService.selectSysAlgoConfigList(sysAlgoConfig);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出动态规则配置列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('algo:algo:export')")
|
||||||
|
@Log(title = "动态规则配置", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
List<SysAlgoConfig> list = sysAlgoConfigService.selectSysAlgoConfigList(sysAlgoConfig);
|
||||||
|
ExcelUtil<SysAlgoConfig> util = new ExcelUtil<SysAlgoConfig>(SysAlgoConfig.class);
|
||||||
|
util.exportExcel(response, list, "动态规则配置数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取动态规则配置详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('algo:algo:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(sysAlgoConfigService.selectSysAlgoConfigById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增动态规则配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('algo:algo:add')")
|
||||||
|
@Log(title = "动态规则配置", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
return toAjax(sysAlgoConfigService.insertSysAlgoConfig(sysAlgoConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改动态规则配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('algo:algo:edit')")
|
||||||
|
@Log(title = "动态规则配置", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
return toAjax(sysAlgoConfigService.updateSysAlgoConfig(sysAlgoConfig));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除动态规则配置
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('algo:algo:remove')")
|
||||||
|
@Log(title = "动态规则配置", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysAlgoConfigService.deleteSysAlgoConfigByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
package com.solution.web.controller.behaviour;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.system.domain.Behaviortree;
|
||||||
|
import com.solution.system.service.IBehaviortreeService;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树主Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Api("行为树管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/behaviortree")
|
||||||
|
public class BehaviortreeController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IBehaviortreeService behaviortreeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树主列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取行为树列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:behaviortree:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Behaviortree> list = behaviortreeService.selectBehaviortreeList(behaviortree);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出行为树主列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:behaviortree:export')")
|
||||||
|
@Log(title = "行为树主", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
List<Behaviortree> list = behaviortreeService.selectBehaviortreeList(behaviortree);
|
||||||
|
ExcelUtil<Behaviortree> util = new ExcelUtil<Behaviortree>(Behaviortree.class);
|
||||||
|
util.exportExcel(response, list, "行为树主数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取行为树主详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取行为树详情")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:behaviortree:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(behaviortreeService.selectBehaviortreeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树主
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增行为树主")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:behaviortree:add')")
|
||||||
|
@Log(title = "行为树主", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
return toAjax(behaviortreeService.insertBehaviortree(behaviortree));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树主
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改行为树主")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:behaviortree:edit')")
|
||||||
|
@Log(title = "行为树主", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
return toAjax(behaviortreeService.updateBehaviortree(behaviortree));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树主
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除行为树主")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:behaviortree:remove')")
|
||||||
|
@Log(title = "行为树主", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(behaviortreeService.deleteBehaviortreeByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.solution.web.controller.behaviour;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.solution.system.domain.Nodeconnection;
|
||||||
|
import com.solution.system.service.INodeconnectionService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点连接Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Api("节点连接管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/nodeconnection")
|
||||||
|
public class NodeconnectionController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private INodeconnectionService nodeconnectionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点连接列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeconnection:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Nodeconnection> list = nodeconnectionService.selectNodeconnectionList(nodeconnection);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出节点连接列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeconnection:export')")
|
||||||
|
@Log(title = "节点连接", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
List<Nodeconnection> list = nodeconnectionService.selectNodeconnectionList(nodeconnection);
|
||||||
|
ExcelUtil<Nodeconnection> util = new ExcelUtil<Nodeconnection>(Nodeconnection.class);
|
||||||
|
util.exportExcel(response, list, "节点连接数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取节点连接详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取节点连接详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeconnection:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(nodeconnectionService.selectNodeconnectionById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点连接
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增节点连接")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeconnection:add')")
|
||||||
|
@Log(title = "节点连接", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
return toAjax(nodeconnectionService.insertNodeconnection(nodeconnection));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点连接
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeconnection:edit')")
|
||||||
|
@Log(title = "节点连接", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
return toAjax(nodeconnectionService.updateNodeconnection(nodeconnection));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点连接
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除节点连接")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeconnection:remove')")
|
||||||
|
@Log(title = "节点连接", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(nodeconnectionService.deleteNodeconnectionByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.solution.web.controller.behaviour;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.system.domain.Nodeparameter;
|
||||||
|
import com.solution.system.service.INodeparameterService;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点参数Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Api("节点参数管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/nodeparameter")
|
||||||
|
public class NodeparameterController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private INodeparameterService nodeparameterService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点参数列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeparameter:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Nodeparameter> list = nodeparameterService.selectNodeparameterList(nodeparameter);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出节点参数列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeparameter:export')")
|
||||||
|
@Log(title = "节点参数", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
List<Nodeparameter> list = nodeparameterService.selectNodeparameterList(nodeparameter);
|
||||||
|
ExcelUtil<Nodeparameter> util = new ExcelUtil<Nodeparameter>(Nodeparameter.class);
|
||||||
|
util.exportExcel(response, list, "节点参数数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取节点参数详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeparameter:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(nodeparameterService.selectNodeparameterById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点参数
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增节点参数")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeparameter:add')")
|
||||||
|
@Log(title = "节点参数", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
return toAjax(nodeparameterService.insertNodeparameter(nodeparameter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点参数
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改节点参数")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeparameter:edit')")
|
||||||
|
@Log(title = "节点参数", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
return toAjax(nodeparameterService.updateNodeparameter(nodeparameter));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点参数
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除节点参数")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodeparameter:remove')")
|
||||||
|
@Log(title = "节点参数", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(nodeparameterService.deleteNodeparameterByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
package com.solution.web.controller.behaviour;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.solution.common.core.domain.R;
|
||||||
|
import com.solution.web.controller.behaviour.vo.NodetemplateDTO;
|
||||||
|
import com.solution.web.controller.behaviour.vo.NodetemplateVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.system.domain.Nodetemplate;
|
||||||
|
import com.solution.system.service.INodetemplateService;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点模板Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Api("节点模板管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/nodetemplate")
|
||||||
|
public class NodetemplateController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private INodetemplateService nodetemplateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点模板列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Nodetemplate nodetemplate) {
|
||||||
|
startPage();
|
||||||
|
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("节点模板列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
|
||||||
|
@GetMapping("/listAll")
|
||||||
|
public R<List<NodetemplateVO>> listAll() {
|
||||||
|
Nodetemplate nodetemplate = new Nodetemplate();
|
||||||
|
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return R.ok(null);
|
||||||
|
}
|
||||||
|
Map<String, List<NodetemplateDTO>> groupedByTemplateType = list.stream()
|
||||||
|
.map(template -> {
|
||||||
|
NodetemplateDTO dto = new NodetemplateDTO();
|
||||||
|
dto.setId(template.getId());
|
||||||
|
dto.setName(template.getName());
|
||||||
|
dto.setDescription(template.getDescription());
|
||||||
|
dto.setEnglishName(template.getEnglishName());
|
||||||
|
dto.setLogicHandler(template.getLogicHandler());
|
||||||
|
return dto;
|
||||||
|
})
|
||||||
|
.collect(Collectors.groupingBy(NodetemplateDTO::getTempleteType));
|
||||||
|
List<NodetemplateVO> vos = new ArrayList<>();
|
||||||
|
groupedByTemplateType.forEach((key, value) -> {
|
||||||
|
// 处理逻辑
|
||||||
|
NodetemplateVO vo = new NodetemplateVO();
|
||||||
|
vo.setTempleteType(key);
|
||||||
|
vo.setDtoList(value);
|
||||||
|
vos.add(vo);
|
||||||
|
});
|
||||||
|
return R.ok(vos);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出节点模板列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:export')")
|
||||||
|
@Log(title = "节点模板", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Nodetemplate nodetemplate) {
|
||||||
|
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
|
||||||
|
ExcelUtil<Nodetemplate> util = new ExcelUtil<Nodetemplate>(Nodetemplate.class);
|
||||||
|
util.exportExcel(response, list, "节点模板数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取节点模板详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return success(nodetemplateService.selectNodetemplateById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点模板
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:add')")
|
||||||
|
@Log(title = "节点模板", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Nodetemplate nodetemplate) {
|
||||||
|
return toAjax(nodetemplateService.insertNodetemplate(nodetemplate));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点模板
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:edit')")
|
||||||
|
@Log(title = "节点模板", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Nodetemplate nodetemplate) {
|
||||||
|
return toAjax(nodetemplateService.updateNodetemplate(nodetemplate));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点模板
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:remove')")
|
||||||
|
@Log(title = "节点模板", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
|
return toAjax(nodetemplateService.deleteNodetemplateByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.solution.web.controller.behaviour;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.system.domain.Templateparameterdef;
|
||||||
|
import com.solution.system.service.ITemplateparameterdefService;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板参数定义Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/templateparameterdef")
|
||||||
|
public class TemplateparameterdefController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITemplateparameterdefService templateparameterdefService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Templateparameterdef> list = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出模板参数定义列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:export')")
|
||||||
|
@Log(title = "模板参数定义", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
List<Templateparameterdef> list = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
|
||||||
|
ExcelUtil<Templateparameterdef> util = new ExcelUtil<Templateparameterdef>(Templateparameterdef.class);
|
||||||
|
util.exportExcel(response, list, "模板参数定义数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取模板参数定义详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(templateparameterdefService.selectTemplateparameterdefById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增模板参数定义
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:add')")
|
||||||
|
@Log(title = "模板参数定义", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
return toAjax(templateparameterdefService.insertTemplateparameterdef(templateparameterdef));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改模板参数定义
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:edit')")
|
||||||
|
@Log(title = "模板参数定义", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
return toAjax(templateparameterdefService.updateTemplateparameterdef(templateparameterdef));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除模板参数定义
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:remove')")
|
||||||
|
@Log(title = "模板参数定义", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(templateparameterdefService.deleteTemplateparameterdefByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,205 @@
|
|||||||
|
package com.solution.web.controller.behaviour;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.solution.common.core.domain.R;
|
||||||
|
import com.solution.system.domain.Nodeparameter;
|
||||||
|
import com.solution.system.domain.Templateparameterdef;
|
||||||
|
import com.solution.system.service.INodeparameterService;
|
||||||
|
import com.solution.system.service.ITemplateparameterdefService;
|
||||||
|
import com.solution.web.controller.behaviour.vo.NodeparameterVO;
|
||||||
|
import com.solution.web.controller.behaviour.vo.NodetemplateVO;
|
||||||
|
import com.solution.web.controller.behaviour.vo.TreenodeinstanceVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.solution.common.annotation.Log;
|
||||||
|
import com.solution.common.core.controller.BaseController;
|
||||||
|
import com.solution.common.core.domain.AjaxResult;
|
||||||
|
import com.solution.common.enums.BusinessType;
|
||||||
|
import com.solution.system.domain.Treenodeinstance;
|
||||||
|
import com.solution.system.service.ITreenodeinstanceService;
|
||||||
|
import com.solution.common.utils.poi.ExcelUtil;
|
||||||
|
import com.solution.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树实例节点Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Api("行为树实例节点管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/treenodeinstance")
|
||||||
|
public class TreenodeinstanceController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ITreenodeinstanceService treenodeinstanceService;
|
||||||
|
@Autowired
|
||||||
|
private INodeparameterService nodeparameterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITemplateparameterdefService templateparameterdefService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Treenodeinstance treenodeinstance) {
|
||||||
|
startPage();
|
||||||
|
List<Treenodeinstance> list = treenodeinstanceService.selectTreenodeinstanceList(treenodeinstance);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出行为树实例节点列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:export')")
|
||||||
|
@Log(title = "行为树实例节点", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Treenodeinstance treenodeinstance) {
|
||||||
|
List<Treenodeinstance> list = treenodeinstanceService.selectTreenodeinstanceList(treenodeinstance);
|
||||||
|
ExcelUtil<Treenodeinstance> util = new ExcelUtil<Treenodeinstance>(Treenodeinstance.class);
|
||||||
|
util.exportExcel(response, list, "行为树实例节点数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取行为树实例节点详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return success(treenodeinstanceService.selectTreenodeinstanceById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("行为树实例节点详情展示")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:query')")
|
||||||
|
@GetMapping(value = "/getInfo")
|
||||||
|
public R<TreenodeinstanceVO> getInfoParams(@PathVariable("id") Long id) {
|
||||||
|
TreenodeinstanceVO treenodeinstanceVO = new TreenodeinstanceVO();
|
||||||
|
Treenodeinstance treenodeinstance = treenodeinstanceService.selectTreenodeinstanceById(id);
|
||||||
|
BeanUtils.copyProperties(treenodeinstance, treenodeinstanceVO);
|
||||||
|
|
||||||
|
|
||||||
|
Templateparameterdef templateparameterdef = new Templateparameterdef();
|
||||||
|
templateparameterdef.setTemplateId(treenodeinstance.getTemplateId());
|
||||||
|
List<Templateparameterdef> templateparameterdefs = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
|
||||||
|
if (CollectionUtils.isEmpty(templateparameterdefs)) {
|
||||||
|
return R.ok(treenodeinstanceVO);
|
||||||
|
}
|
||||||
|
List<NodeparameterVO> nodeparameterVOList = new ArrayList<>();
|
||||||
|
treenodeinstanceVO.setNodeparameterVOList(nodeparameterVOList);
|
||||||
|
Nodeparameter nodeparameter = new Nodeparameter();
|
||||||
|
nodeparameter.setNodeInstanceId(id);
|
||||||
|
List<Nodeparameter> nodeparameters = nodeparameterService.selectNodeparameterList(nodeparameter);
|
||||||
|
Map<Long, Nodeparameter> nodeParameterMap = new HashMap<>();
|
||||||
|
if (!CollectionUtils.isEmpty(nodeparameters)) {
|
||||||
|
nodeParameterMap.putAll(nodeparameters.stream()
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
Nodeparameter::getParamDefId,
|
||||||
|
Function.identity(), (existing, replacement) -> existing
|
||||||
|
)));
|
||||||
|
|
||||||
|
}
|
||||||
|
templateparameterdefs.forEach(t -> {
|
||||||
|
NodeparameterVO vo = new NodeparameterVO();
|
||||||
|
vo.setDescription(t.getDescription());
|
||||||
|
vo.setParamKey(t.getParamKey());
|
||||||
|
vo.setDataType(t.getDataType());
|
||||||
|
vo.setDefaultValue(t.getDefaultValue());
|
||||||
|
vo.setParamDefId(t.getId());
|
||||||
|
vo.setNodeInstanceId(id);
|
||||||
|
if (nodeParameterMap.containsKey(t.getId())) {
|
||||||
|
Nodeparameter nodeparameter1 = nodeParameterMap.get(t.getId());
|
||||||
|
vo.setId(nodeparameter1.getId());
|
||||||
|
vo.setValue(nodeparameter1.getValue());
|
||||||
|
}
|
||||||
|
nodeparameterVOList.add(vo);
|
||||||
|
});
|
||||||
|
return R.ok(treenodeinstanceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("行为树实例节点保存或者跟新")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:add')")
|
||||||
|
@Log(title = "行为树实例节点", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/saveOrUpdate")
|
||||||
|
public R<Integer> saveOrUpdate(@RequestBody Treenodeinstance treenodeinstance) {
|
||||||
|
if (null == treenodeinstance.getId()) {
|
||||||
|
//新增
|
||||||
|
Templateparameterdef templateparameterdef = new Templateparameterdef();
|
||||||
|
templateparameterdef.setTemplateId(treenodeinstance.getTemplateId());
|
||||||
|
List<Templateparameterdef> templateparameterdefs = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
|
||||||
|
if (CollectionUtils.isEmpty(templateparameterdefs)) {
|
||||||
|
return R.ok(treenodeinstanceService.insertTreenodeinstance(treenodeinstance));
|
||||||
|
}
|
||||||
|
templateparameterdefs.forEach(t -> {
|
||||||
|
Nodeparameter nodeparameter = new Nodeparameter();
|
||||||
|
nodeparameter.setNodeInstanceId(treenodeinstance.getId());
|
||||||
|
nodeparameter.setParamDefId(t.getId());
|
||||||
|
nodeparameter.setValue(t.getDefaultValue());
|
||||||
|
nodeparameterService.insertNodeparameter(nodeparameter);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return R.ok(treenodeinstanceService.updateTreenodeinstance(treenodeinstance));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树实例节点
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:add')")
|
||||||
|
@Log(title = "行为树实例节点", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Treenodeinstance treenodeinstance) {
|
||||||
|
|
||||||
|
return toAjax(treenodeinstanceService.insertTreenodeinstance(treenodeinstance));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树实例节点
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:edit')")
|
||||||
|
@Log(title = "行为树实例节点", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Treenodeinstance treenodeinstance) {
|
||||||
|
return toAjax(treenodeinstanceService.updateTreenodeinstance(treenodeinstance));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树实例节点
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除行为树实例节点")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:remove')")
|
||||||
|
@Log(title = "行为树实例节点", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public R<Integer> remove(@PathVariable Long id) {
|
||||||
|
Nodeparameter nodeparameter = new Nodeparameter();
|
||||||
|
nodeparameter.setNodeInstanceId(id);
|
||||||
|
List<Nodeparameter> nodeparameters = nodeparameterService.selectNodeparameterList(nodeparameter);
|
||||||
|
if (!CollectionUtils.isEmpty(nodeparameters)) {
|
||||||
|
List<Long> ids = nodeparameters.stream()
|
||||||
|
.map(Nodeparameter::getId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
Long[] idsArray = ids.toArray(new Long[0]);
|
||||||
|
nodeparameterService.deleteNodeparameterByIds(idsArray);
|
||||||
|
}
|
||||||
|
return R.ok(treenodeinstanceService.deleteTreenodeinstanceById(id));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.solution.web.controller.behaviour.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
public class BehaviortreeVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
/** 行为树名称 */
|
||||||
|
@ApiModelProperty(name = "行为树名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 行为树描述 */
|
||||||
|
@ApiModelProperty(name = "行为树描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "英文名称")
|
||||||
|
private String englishName;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnglishName() {
|
||||||
|
return englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnglishName(String englishName) {
|
||||||
|
this.englishName = englishName;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package com.solution.web.controller.behaviour.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
@ApiModel(value = "NodeparameterVO", description = "节点参数vo")
|
||||||
|
public class NodeparameterVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 关联到哪个节点实例 (外键: TreeInstanceNode.id) */
|
||||||
|
@ApiModelProperty("节点实例id")
|
||||||
|
private Long nodeInstanceId;
|
||||||
|
|
||||||
|
/** 关联到哪个参数定义 (外键: TemplateParameterDef.id) */
|
||||||
|
@ApiModelProperty("模板参数定义表id")
|
||||||
|
private Long paramDefId;
|
||||||
|
|
||||||
|
/** 节点实例设置的具体参数值 (覆盖模板默认值) */
|
||||||
|
@ApiModelProperty("节点实例设置的具体参数值 (覆盖模板默认值)")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
@ApiModelProperty("参数键名, 例如: target_name, speed")
|
||||||
|
private String paramKey;
|
||||||
|
|
||||||
|
/** 参数数据类型, 例如: "float", "int", "string", "bool" */
|
||||||
|
@ApiModelProperty("参数数据类型, 例如: float, int, string, bool")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
/** 默认值 */
|
||||||
|
@ApiModelProperty("默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
@ApiModelProperty("参数名称描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getNodeInstanceId() {
|
||||||
|
return nodeInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeInstanceId(Long nodeInstanceId) {
|
||||||
|
this.nodeInstanceId = nodeInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getParamDefId() {
|
||||||
|
return paramDefId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamDefId(Long paramDefId) {
|
||||||
|
this.paramDefId = paramDefId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParamKey() {
|
||||||
|
return paramKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamKey(String paramKey) {
|
||||||
|
this.paramKey = paramKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataType() {
|
||||||
|
return dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataType(String dataType) {
|
||||||
|
this.dataType = dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefaultValue() {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefaultValue(String defaultValue) {
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.solution.web.controller.behaviour.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
@ApiModel(value = "NodetemplateDTO", description = "节点模板dto")
|
||||||
|
public class NodetemplateDTO {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 模板名称, 例如: "MoveToTarget", "IsTargetVisible" */
|
||||||
|
@ApiModelProperty("模板名称, 例如: MoveToTarget, IsTargetVisible")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 对应的逻辑执行代码/脚本/函数名 */
|
||||||
|
@ApiModelProperty("对应的逻辑执行代码/脚本/函数名")
|
||||||
|
private String logicHandler;
|
||||||
|
|
||||||
|
/** 模板描述 */
|
||||||
|
@ApiModelProperty("模板描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** afsim 中转换的节点名 */
|
||||||
|
@ApiModelProperty("afsim 中转换的节点名")
|
||||||
|
private String englishName;
|
||||||
|
|
||||||
|
private String templeteType;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogicHandler() {
|
||||||
|
return logicHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLogicHandler(String logicHandler) {
|
||||||
|
this.logicHandler = logicHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnglishName() {
|
||||||
|
return englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnglishName(String englishName) {
|
||||||
|
this.englishName = englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTempleteType() {
|
||||||
|
return templeteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTempleteType(String templeteType) {
|
||||||
|
this.templeteType = templeteType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.solution.web.controller.behaviour.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(value = "NodetemplateVO", description = "节点模板vo")
|
||||||
|
public class NodetemplateVO {
|
||||||
|
/** 模版类型,节点模版或者条件判断,例如“node”,precondition“ */
|
||||||
|
@ApiModelProperty("模版类型,节点模版或者条件判断,例如“node”,precondition“")
|
||||||
|
private String templeteType;
|
||||||
|
|
||||||
|
@ApiModelProperty("节点模板数据")
|
||||||
|
private List<NodetemplateDTO> dtoList;
|
||||||
|
|
||||||
|
public String getTempleteType() {
|
||||||
|
return templeteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTempleteType(String templeteType) {
|
||||||
|
this.templeteType = templeteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<NodetemplateDTO> getDtoList() {
|
||||||
|
return dtoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDtoList(List<NodetemplateDTO> dtoList) {
|
||||||
|
this.dtoList = dtoList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.solution.web.controller.behaviour.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(value = "TreenodeinstanceVO", description = "节点vo")
|
||||||
|
public class TreenodeinstanceVO {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("行为树id")
|
||||||
|
private Long treeId;
|
||||||
|
|
||||||
|
/** 引用哪个节点模板 (外键: NodeTemplate.id) */
|
||||||
|
@ApiModelProperty("节点模板id")
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
/** 节点的显示名称 (可能与模板名称不同, 用于区分实例) */
|
||||||
|
@ApiModelProperty("节点的显示名称")
|
||||||
|
private String instanceName;
|
||||||
|
|
||||||
|
/** 判断当前节点是否为根节点,默认情况下是非根节点 */
|
||||||
|
@ApiModelProperty("判断当前节点是否为根节点,默认情况下是非根节点")
|
||||||
|
private Long isRoot;
|
||||||
|
@ApiModelProperty("节点介绍")
|
||||||
|
private String desciption;
|
||||||
|
|
||||||
|
@ApiModelProperty("节点变量结合")
|
||||||
|
private List<NodeparameterVO> nodeparameterVOList;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTreeId() {
|
||||||
|
return treeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTreeId(Long treeId) {
|
||||||
|
this.treeId = treeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTemplateId() {
|
||||||
|
return templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateId(Long templateId) {
|
||||||
|
this.templateId = templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInstanceName() {
|
||||||
|
return instanceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstanceName(String instanceName) {
|
||||||
|
this.instanceName = instanceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsRoot() {
|
||||||
|
return isRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsRoot(Long isRoot) {
|
||||||
|
this.isRoot = isRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesciption() {
|
||||||
|
return desciption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesciption(String desciption) {
|
||||||
|
this.desciption = desciption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<NodeparameterVO> getNodeparameterVOList() {
|
||||||
|
return nodeparameterVOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeparameterVOList(List<NodeparameterVO> nodeparameterVOList) {
|
||||||
|
this.nodeparameterVOList = nodeparameterVOList;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@@ -24,15 +25,15 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger 用户测试方法
|
* swagger 用户测试方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Api("用户信息管理")
|
@Api("用户信息管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/test/user")
|
@RequestMapping("/test/user")
|
||||||
public class TestController extends BaseController
|
public class TestController extends BaseController {
|
||||||
{
|
|
||||||
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
||||||
|
|
||||||
{
|
{
|
||||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
||||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
||||||
@@ -40,8 +41,7 @@ public class TestController extends BaseController
|
|||||||
|
|
||||||
@ApiOperation("获取用户列表")
|
@ApiOperation("获取用户列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<List<UserEntity>> userList()
|
public R<List<UserEntity>> userList() {
|
||||||
{
|
|
||||||
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
|
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
|
||||||
return R.ok(userList);
|
return R.ok(userList);
|
||||||
}
|
}
|
||||||
@@ -49,30 +49,24 @@ public class TestController extends BaseController
|
|||||||
@ApiOperation("获取用户详细")
|
@ApiOperation("获取用户详细")
|
||||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||||
@GetMapping("/{userId}")
|
@GetMapping("/{userId}")
|
||||||
public R<UserEntity> getUser(@PathVariable Integer userId)
|
public R<UserEntity> getUser(@PathVariable Integer userId) {
|
||||||
{
|
if (!users.isEmpty() && users.containsKey(userId)) {
|
||||||
if (!users.isEmpty() && users.containsKey(userId))
|
|
||||||
{
|
|
||||||
return R.ok(users.get(userId));
|
return R.ok(users.get(userId));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return R.fail("用户不存在");
|
return R.fail("用户不存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增用户")
|
@ApiOperation("新增用户")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
|
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
|
||||||
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
|
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
|
||||||
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
|
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
|
||||||
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
|
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
|
||||||
})
|
})
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public R<String> save(UserEntity user)
|
public R<String> save(UserEntity user) {
|
||||||
{
|
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) {
|
||||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
|
||||||
{
|
|
||||||
return R.fail("用户ID不能为空");
|
return R.fail("用户ID不能为空");
|
||||||
}
|
}
|
||||||
users.put(user.getUserId(), user);
|
users.put(user.getUserId(), user);
|
||||||
@@ -81,14 +75,11 @@ public class TestController extends BaseController
|
|||||||
|
|
||||||
@ApiOperation("更新用户")
|
@ApiOperation("更新用户")
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
public R<String> update(@RequestBody UserEntity user)
|
public R<String> update(@RequestBody UserEntity user) {
|
||||||
{
|
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) {
|
||||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
|
||||||
{
|
|
||||||
return R.fail("用户ID不能为空");
|
return R.fail("用户ID不能为空");
|
||||||
}
|
}
|
||||||
if (users.isEmpty() || !users.containsKey(user.getUserId()))
|
if (users.isEmpty() || !users.containsKey(user.getUserId())) {
|
||||||
{
|
|
||||||
return R.fail("用户不存在");
|
return R.fail("用户不存在");
|
||||||
}
|
}
|
||||||
users.remove(user.getUserId());
|
users.remove(user.getUserId());
|
||||||
@@ -99,23 +90,18 @@ public class TestController extends BaseController
|
|||||||
@ApiOperation("删除用户信息")
|
@ApiOperation("删除用户信息")
|
||||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||||
@DeleteMapping("/{userId}")
|
@DeleteMapping("/{userId}")
|
||||||
public R<String> delete(@PathVariable Integer userId)
|
public R<String> delete(@PathVariable Integer userId) {
|
||||||
{
|
if (!users.isEmpty() && users.containsKey(userId)) {
|
||||||
if (!users.isEmpty() && users.containsKey(userId))
|
|
||||||
{
|
|
||||||
users.remove(userId);
|
users.remove(userId);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return R.fail("用户不存在");
|
return R.fail("用户不存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModel(value = "UserEntity", description = "用户实体")
|
@ApiModel(value = "UserEntity", description = "用户实体")
|
||||||
class UserEntity
|
class UserEntity {
|
||||||
{
|
|
||||||
@ApiModelProperty("用户ID")
|
@ApiModelProperty("用户ID")
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
@@ -128,56 +114,46 @@ class UserEntity
|
|||||||
@ApiModelProperty("用户手机")
|
@ApiModelProperty("用户手机")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
public UserEntity()
|
public UserEntity() {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserEntity(Integer userId, String username, String password, String mobile)
|
public UserEntity(Integer userId, String username, String password, String mobile) {
|
||||||
{
|
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.mobile = mobile;
|
this.mobile = mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getUserId()
|
public Integer getUserId() {
|
||||||
{
|
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserId(Integer userId)
|
public void setUserId(Integer userId) {
|
||||||
{
|
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUsername()
|
public String getUsername() {
|
||||||
{
|
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsername(String username)
|
public void setUsername(String username) {
|
||||||
{
|
|
||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPassword()
|
public String getPassword() {
|
||||||
{
|
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPassword(String password)
|
public void setPassword(String password) {
|
||||||
{
|
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMobile()
|
public String getMobile() {
|
||||||
{
|
|
||||||
return mobile;
|
return mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMobile(String mobile)
|
public void setMobile(String mobile) {
|
||||||
{
|
|
||||||
this.mobile = mobile;
|
this.mobile = mobile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,111 +0,0 @@
|
|||||||
package com.solution.algo.domain;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.solution.common.annotation.Excel;
|
|
||||||
import com.solution.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则对象 algorithm
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2026-02-06
|
|
||||||
*/
|
|
||||||
public class Algorithm
|
|
||||||
{
|
|
||||||
|
|
||||||
/** */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 算法名称 */
|
|
||||||
@Excel(name = "算法名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** 业务类型 */
|
|
||||||
@Excel(name = "业务类型")
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
/** 算法文件路径 */
|
|
||||||
@Excel(name = "算法文件路径")
|
|
||||||
private String codePath;
|
|
||||||
|
|
||||||
/** 算法描述 */
|
|
||||||
@Excel(name = "算法描述")
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
/** 算法参数定义信息 */
|
|
||||||
private List<AlgorithmParam> algorithmParamList;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type)
|
|
||||||
{
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType()
|
|
||||||
{
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCodePath(String codePath)
|
|
||||||
{
|
|
||||||
this.codePath = codePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCodePath()
|
|
||||||
{
|
|
||||||
return codePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description)
|
|
||||||
{
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<AlgorithmParam> getAlgorithmParamList()
|
|
||||||
{
|
|
||||||
return algorithmParamList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAlgorithmParamList(List<AlgorithmParam> algorithmParamList)
|
|
||||||
{
|
|
||||||
this.algorithmParamList = algorithmParamList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("name", getName())
|
|
||||||
.append("type", getType())
|
|
||||||
.append("codePath", getCodePath())
|
|
||||||
.append("description", getDescription())
|
|
||||||
.append("algorithmParamList", getAlgorithmParamList())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
package com.solution.algo.domain;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.solution.common.annotation.Excel;
|
|
||||||
import com.solution.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 算法参数定义对象 algorithm_param
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2026-02-06
|
|
||||||
*/
|
|
||||||
public class AlgorithmParam
|
|
||||||
{
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 算法ID */
|
|
||||||
@Excel(name = "算法ID")
|
|
||||||
private Long algorithmId;
|
|
||||||
|
|
||||||
/** 参数名 */
|
|
||||||
@Excel(name = "参数名")
|
|
||||||
private String paramName;
|
|
||||||
|
|
||||||
/** 默认值 */
|
|
||||||
@Excel(name = "默认值")
|
|
||||||
private String defaultValue;
|
|
||||||
|
|
||||||
/** 描述 */
|
|
||||||
@Excel(name = "描述")
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setAlgorithmId(Long algorithmId)
|
|
||||||
{
|
|
||||||
this.algorithmId = algorithmId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getAlgorithmId()
|
|
||||||
{
|
|
||||||
return algorithmId;
|
|
||||||
}
|
|
||||||
public void setParamName(String paramName)
|
|
||||||
{
|
|
||||||
this.paramName = paramName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParamName()
|
|
||||||
{
|
|
||||||
return paramName;
|
|
||||||
}
|
|
||||||
public void setDefaultValue(String defaultValue)
|
|
||||||
{
|
|
||||||
this.defaultValue = defaultValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDefaultValue()
|
|
||||||
{
|
|
||||||
return defaultValue;
|
|
||||||
}
|
|
||||||
public void setDescription(String description)
|
|
||||||
{
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("algorithmId", getAlgorithmId())
|
|
||||||
.append("paramName", getParamName())
|
|
||||||
.append("defaultValue", getDefaultValue())
|
|
||||||
.append("description", getDescription())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
package com.solution.algo.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态规则配置对象 sys_algo_config
|
||||||
|
*
|
||||||
|
* @author zouju
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class SysAlgoConfig extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 算法唯一标识(Type),用于接口路由 */
|
||||||
|
@Excel(name = "算法唯一标识(Type),用于接口路由")
|
||||||
|
private String algoType;
|
||||||
|
|
||||||
|
/** 算法名称,后台展示用 */
|
||||||
|
@Excel(name = "算法名称,后台展示用")
|
||||||
|
private String algoName;
|
||||||
|
|
||||||
|
/** 执行引擎类型: GROOVY, PYTHON, JS, LUA等 */
|
||||||
|
@Excel(name = "执行引擎类型: GROOVY, PYTHON, JS, LUA等")
|
||||||
|
private String engineType;
|
||||||
|
|
||||||
|
/** 参数定义模型(JSON Schema),用于自动校验入参 */
|
||||||
|
@Excel(name = "参数定义模型(JSON Schema),用于自动校验入参")
|
||||||
|
private String inputSchema;
|
||||||
|
|
||||||
|
/** 算法脚本代码或规则表达式 */
|
||||||
|
@Excel(name = "算法脚本代码或规则表达式")
|
||||||
|
private String scriptContent;
|
||||||
|
|
||||||
|
/** 算法描述 */
|
||||||
|
@Excel(name = "算法描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 状态: 1-启用, 0-禁用 */
|
||||||
|
@Excel(name = "状态: 1-启用, 0-禁用")
|
||||||
|
private Long status;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date createdAt;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date updatedAt;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlgoType(String algoType)
|
||||||
|
{
|
||||||
|
this.algoType = algoType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlgoType()
|
||||||
|
{
|
||||||
|
return algoType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlgoName(String algoName)
|
||||||
|
{
|
||||||
|
this.algoName = algoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlgoName()
|
||||||
|
{
|
||||||
|
return algoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEngineType(String engineType)
|
||||||
|
{
|
||||||
|
this.engineType = engineType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEngineType()
|
||||||
|
{
|
||||||
|
return engineType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInputSchema(String inputSchema)
|
||||||
|
{
|
||||||
|
this.inputSchema = inputSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInputSchema()
|
||||||
|
{
|
||||||
|
return inputSchema;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScriptContent(String scriptContent)
|
||||||
|
{
|
||||||
|
this.scriptContent = scriptContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getScriptContent()
|
||||||
|
{
|
||||||
|
return scriptContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description)
|
||||||
|
{
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Long status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(Date createdAt)
|
||||||
|
{
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatedAt()
|
||||||
|
{
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdatedAt(Date updatedAt)
|
||||||
|
{
|
||||||
|
this.updatedAt = updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdatedAt()
|
||||||
|
{
|
||||||
|
return updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("algoType", getAlgoType())
|
||||||
|
.append("algoName", getAlgoName())
|
||||||
|
.append("engineType", getEngineType())
|
||||||
|
.append("inputSchema", getInputSchema())
|
||||||
|
.append("scriptContent", getScriptContent())
|
||||||
|
.append("description", getDescription())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createdAt", getCreatedAt())
|
||||||
|
.append("updatedAt", getUpdatedAt())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
package com.solution.algo.mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.solution.algo.domain.Algorithm;
|
|
||||||
import com.solution.algo.domain.AlgorithmParam;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2026-02-06
|
|
||||||
*/
|
|
||||||
public interface AlgorithmMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询规则
|
|
||||||
*
|
|
||||||
* @param id 规则主键
|
|
||||||
* @return 规则
|
|
||||||
*/
|
|
||||||
public Algorithm selectAlgorithmById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询规则列表
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 规则集合
|
|
||||||
*/
|
|
||||||
public List<Algorithm> selectAlgorithmList(Algorithm algorithm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增规则
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertAlgorithm(Algorithm algorithm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改规则
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateAlgorithm(Algorithm algorithm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除规则
|
|
||||||
*
|
|
||||||
* @param id 规则主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAlgorithmById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除规则
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAlgorithmByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除算法参数定义
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAlgorithmParamByAlgorithmIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量新增算法参数定义
|
|
||||||
*
|
|
||||||
* @param algorithmParamList 算法参数定义列表
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int batchAlgorithmParam(List<AlgorithmParam> algorithmParamList);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过规则主键删除算法参数定义信息
|
|
||||||
*
|
|
||||||
* @param id 规则ID
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAlgorithmParamByAlgorithmId(Long id);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.algo.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.algo.domain.SysAlgoConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态规则配置Mapper接口
|
||||||
|
*
|
||||||
|
* @author zouju
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface SysAlgoConfigMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置
|
||||||
|
*
|
||||||
|
* @param id 动态规则配置主键
|
||||||
|
* @return 动态规则配置
|
||||||
|
*/
|
||||||
|
public SysAlgoConfig selectSysAlgoConfigById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置列表
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 动态规则配置集合
|
||||||
|
*/
|
||||||
|
public List<SysAlgoConfig> selectSysAlgoConfigList(SysAlgoConfig sysAlgoConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增动态规则配置
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改动态规则配置
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除动态规则配置
|
||||||
|
*
|
||||||
|
* @param id 动态规则配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysAlgoConfigById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除动态规则配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysAlgoConfigByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
package com.solution.algo.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.solution.algo.domain.Algorithm;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2026-02-06
|
|
||||||
*/
|
|
||||||
public interface IAlgorithmService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询规则
|
|
||||||
*
|
|
||||||
* @param id 规则主键
|
|
||||||
* @return 规则
|
|
||||||
*/
|
|
||||||
public Algorithm selectAlgorithmById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询规则列表
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 规则集合
|
|
||||||
*/
|
|
||||||
public List<Algorithm> selectAlgorithmList(Algorithm algorithm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增规则
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertAlgorithm(Algorithm algorithm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改规则
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateAlgorithm(Algorithm algorithm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除规则
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的规则主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAlgorithmByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除规则信息
|
|
||||||
*
|
|
||||||
* @param id 规则主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAlgorithmById(Long id);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.algo.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.algo.domain.SysAlgoConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态规则配置Service接口
|
||||||
|
*
|
||||||
|
* @author zouju
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface ISysAlgoConfigService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置
|
||||||
|
*
|
||||||
|
* @param id 动态规则配置主键
|
||||||
|
* @return 动态规则配置
|
||||||
|
*/
|
||||||
|
public SysAlgoConfig selectSysAlgoConfigById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置列表
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 动态规则配置集合
|
||||||
|
*/
|
||||||
|
public List<SysAlgoConfig> selectSysAlgoConfigList(SysAlgoConfig sysAlgoConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增动态规则配置
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改动态规则配置
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除动态规则配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的动态规则配置主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysAlgoConfigByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除动态规则配置信息
|
||||||
|
*
|
||||||
|
* @param id 动态规则配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysAlgoConfigById(Long id);
|
||||||
|
}
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
package com.solution.algo.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import com.solution.common.utils.StringUtils;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import com.solution.algo.domain.AlgorithmParam;
|
|
||||||
import com.solution.algo.mapper.AlgorithmMapper;
|
|
||||||
import com.solution.algo.domain.Algorithm;
|
|
||||||
import com.solution.algo.service.IAlgorithmService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2026-02-06
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class AlgorithmServiceImpl implements IAlgorithmService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private AlgorithmMapper algorithmMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询规则
|
|
||||||
*
|
|
||||||
* @param id 规则主键
|
|
||||||
* @return 规则
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Algorithm selectAlgorithmById(Long id)
|
|
||||||
{
|
|
||||||
return algorithmMapper.selectAlgorithmById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询规则列表
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 规则
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Algorithm> selectAlgorithmList(Algorithm algorithm)
|
|
||||||
{
|
|
||||||
return algorithmMapper.selectAlgorithmList(algorithm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增规则
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
@Override
|
|
||||||
public int insertAlgorithm(Algorithm algorithm)
|
|
||||||
{
|
|
||||||
int rows = algorithmMapper.insertAlgorithm(algorithm);
|
|
||||||
insertAlgorithmParam(algorithm);
|
|
||||||
return rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改规则
|
|
||||||
*
|
|
||||||
* @param algorithm 规则
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
@Override
|
|
||||||
public int updateAlgorithm(Algorithm algorithm)
|
|
||||||
{
|
|
||||||
algorithmMapper.deleteAlgorithmParamByAlgorithmId(algorithm.getId());
|
|
||||||
insertAlgorithmParam(algorithm);
|
|
||||||
return algorithmMapper.updateAlgorithm(algorithm);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除规则
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的规则主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
@Override
|
|
||||||
public int deleteAlgorithmByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
algorithmMapper.deleteAlgorithmParamByAlgorithmIds(ids);
|
|
||||||
return algorithmMapper.deleteAlgorithmByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除规则信息
|
|
||||||
*
|
|
||||||
* @param id 规则主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
@Override
|
|
||||||
public int deleteAlgorithmById(Long id)
|
|
||||||
{
|
|
||||||
algorithmMapper.deleteAlgorithmParamByAlgorithmId(id);
|
|
||||||
return algorithmMapper.deleteAlgorithmById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增算法参数定义信息
|
|
||||||
*
|
|
||||||
* @param algorithm 规则对象
|
|
||||||
*/
|
|
||||||
public void insertAlgorithmParam(Algorithm algorithm)
|
|
||||||
{
|
|
||||||
List<AlgorithmParam> algorithmParamList = algorithm.getAlgorithmParamList();
|
|
||||||
Long id = algorithm.getId();
|
|
||||||
if (StringUtils.isNotNull(algorithmParamList))
|
|
||||||
{
|
|
||||||
List<AlgorithmParam> list = new ArrayList<AlgorithmParam>();
|
|
||||||
for (AlgorithmParam algorithmParam : algorithmParamList)
|
|
||||||
{
|
|
||||||
algorithmParam.setAlgorithmId(id);
|
|
||||||
list.add(algorithmParam);
|
|
||||||
}
|
|
||||||
if (list.size() > 0)
|
|
||||||
{
|
|
||||||
algorithmMapper.batchAlgorithmParam(list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.algo.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.algo.mapper.SysAlgoConfigMapper;
|
||||||
|
import com.solution.algo.domain.SysAlgoConfig;
|
||||||
|
import com.solution.algo.service.ISysAlgoConfigService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态规则配置Service业务层处理
|
||||||
|
*
|
||||||
|
* @author zouju
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysAlgoConfigServiceImpl implements ISysAlgoConfigService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysAlgoConfigMapper sysAlgoConfigMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置
|
||||||
|
*
|
||||||
|
* @param id 动态规则配置主键
|
||||||
|
* @return 动态规则配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysAlgoConfig selectSysAlgoConfigById(Long id)
|
||||||
|
{
|
||||||
|
return sysAlgoConfigMapper.selectSysAlgoConfigById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态规则配置列表
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 动态规则配置
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysAlgoConfig> selectSysAlgoConfigList(SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
return sysAlgoConfigMapper.selectSysAlgoConfigList(sysAlgoConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增动态规则配置
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSysAlgoConfig(SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
return sysAlgoConfigMapper.insertSysAlgoConfig(sysAlgoConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改动态规则配置
|
||||||
|
*
|
||||||
|
* @param sysAlgoConfig 动态规则配置
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSysAlgoConfig(SysAlgoConfig sysAlgoConfig)
|
||||||
|
{
|
||||||
|
return sysAlgoConfigMapper.updateSysAlgoConfig(sysAlgoConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除动态规则配置
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的动态规则配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysAlgoConfigByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return sysAlgoConfigMapper.deleteSysAlgoConfigByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除动态规则配置信息
|
||||||
|
*
|
||||||
|
* @param id 动态规则配置主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysAlgoConfigById(Long id)
|
||||||
|
{
|
||||||
|
return sysAlgoConfigMapper.deleteSysAlgoConfigById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.solution.algo.mapper.AlgorithmMapper">
|
|
||||||
|
|
||||||
<resultMap type="Algorithm" id="AlgorithmResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="type" column="type" />
|
|
||||||
<result property="codePath" column="code_path" />
|
|
||||||
<result property="description" column="description" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap id="AlgorithmAlgorithmParamResult" type="Algorithm" extends="AlgorithmResult">
|
|
||||||
<collection property="algorithmParamList" ofType="AlgorithmParam" column="id" select="selectAlgorithmParamList" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<resultMap type="AlgorithmParam" id="AlgorithmParamResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="algorithmId" column="algorithm_id" />
|
|
||||||
<result property="paramName" column="param_name" />
|
|
||||||
<result property="defaultValue" column="default_value" />
|
|
||||||
<result property="description" column="description" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectAlgorithmVo">
|
|
||||||
select id, name, type, code_path, description from algorithm
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectAlgorithmList" parameterType="Algorithm" resultMap="AlgorithmAlgorithmParamResult">
|
|
||||||
<include refid="selectAlgorithmVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
||||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
||||||
<if test="codePath != null and codePath != ''"> and code_path = #{codePath}</if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectAlgorithmById" parameterType="Long" resultMap="AlgorithmAlgorithmParamResult">
|
|
||||||
select id, name, type, code_path, description
|
|
||||||
from algorithm
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectAlgorithmParamList" resultMap="AlgorithmParamResult">
|
|
||||||
select id, algorithm_id, param_name, default_value, description
|
|
||||||
from algorithm_param
|
|
||||||
where algorithm_id = #{algorithm_id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertAlgorithm" parameterType="Algorithm" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into algorithm
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="name != null and name != ''">name,</if>
|
|
||||||
<if test="type != null and type != ''">type,</if>
|
|
||||||
<if test="codePath != null">code_path,</if>
|
|
||||||
<if test="description != null">description,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
|
||||||
<if test="type != null and type != ''">#{type},</if>
|
|
||||||
<if test="codePath != null">#{codePath},</if>
|
|
||||||
<if test="description != null">#{description},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateAlgorithm" parameterType="Algorithm">
|
|
||||||
update algorithm
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
|
||||||
<if test="type != null and type != ''">type = #{type},</if>
|
|
||||||
<if test="codePath != null">code_path = #{codePath},</if>
|
|
||||||
<if test="description != null">description = #{description},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteAlgorithmById" parameterType="Long">
|
|
||||||
delete from algorithm where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAlgorithmByIds" parameterType="String">
|
|
||||||
delete from algorithm where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAlgorithmParamByAlgorithmIds" parameterType="String">
|
|
||||||
delete from algorithm_param where algorithm_id in
|
|
||||||
<foreach item="algorithmId" collection="array" open="(" separator="," close=")">
|
|
||||||
#{algorithmId}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAlgorithmParamByAlgorithmId" parameterType="Long">
|
|
||||||
delete from algorithm_param where algorithm_id = #{algorithmId}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<insert id="batchAlgorithmParam">
|
|
||||||
insert into algorithm_param( id, algorithm_id, param_name, default_value, description) values
|
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
|
||||||
( #{item.id}, #{item.algorithmId}, #{item.paramName}, #{item.defaultValue}, #{item.description})
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.algo.mapper.SysAlgoConfigMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysAlgoConfig" id="SysAlgoConfigResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="algoType" column="algo_type" />
|
||||||
|
<result property="algoName" column="algo_name" />
|
||||||
|
<result property="engineType" column="engine_type" />
|
||||||
|
<result property="inputSchema" column="input_schema" />
|
||||||
|
<result property="scriptContent" column="script_content" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createdAt" column="created_at" />
|
||||||
|
<result property="updatedAt" column="updated_at" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysAlgoConfigVo">
|
||||||
|
select id, algo_type, algo_name, engine_type, input_schema, script_content, description, status, created_at, updated_at from sys_algo_config
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysAlgoConfigList" parameterType="SysAlgoConfig" resultMap="SysAlgoConfigResult">
|
||||||
|
<include refid="selectSysAlgoConfigVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="algoType != null and algoType != ''"> and algo_type = #{algoType}</if>
|
||||||
|
<if test="algoName != null and algoName != ''"> and algo_name like concat('%', #{algoName}, '%')</if>
|
||||||
|
<if test="engineType != null and engineType != ''"> and engine_type = #{engineType}</if>
|
||||||
|
<if test="inputSchema != null and inputSchema != ''"> and input_schema = #{inputSchema}</if>
|
||||||
|
<if test="scriptContent != null and scriptContent != ''"> and script_content = #{scriptContent}</if>
|
||||||
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||||
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysAlgoConfigById" parameterType="Long" resultMap="SysAlgoConfigResult">
|
||||||
|
<include refid="selectSysAlgoConfigVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysAlgoConfig" parameterType="SysAlgoConfig" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into sys_algo_config
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="algoType != null and algoType != ''">algo_type,</if>
|
||||||
|
<if test="algoName != null and algoName != ''">algo_name,</if>
|
||||||
|
<if test="engineType != null and engineType != ''">engine_type,</if>
|
||||||
|
<if test="inputSchema != null">input_schema,</if>
|
||||||
|
<if test="scriptContent != null">script_content,</if>
|
||||||
|
<if test="description != null">description,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="createdAt != null">created_at,</if>
|
||||||
|
<if test="updatedAt != null">updated_at,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="algoType != null and algoType != ''">#{algoType},</if>
|
||||||
|
<if test="algoName != null and algoName != ''">#{algoName},</if>
|
||||||
|
<if test="engineType != null and engineType != ''">#{engineType},</if>
|
||||||
|
<if test="inputSchema != null">#{inputSchema},</if>
|
||||||
|
<if test="scriptContent != null">#{scriptContent},</if>
|
||||||
|
<if test="description != null">#{description},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="createdAt != null">#{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">#{updatedAt},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysAlgoConfig" parameterType="SysAlgoConfig">
|
||||||
|
update sys_algo_config
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="algoType != null and algoType != ''">algo_type = #{algoType},</if>
|
||||||
|
<if test="algoName != null and algoName != ''">algo_name = #{algoName},</if>
|
||||||
|
<if test="engineType != null and engineType != ''">engine_type = #{engineType},</if>
|
||||||
|
<if test="inputSchema != null">input_schema = #{inputSchema},</if>
|
||||||
|
<if test="scriptContent != null">script_content = #{scriptContent},</if>
|
||||||
|
<if test="description != null">description = #{description},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSysAlgoConfigById" parameterType="Long">
|
||||||
|
delete from sys_algo_config where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSysAlgoConfigByIds" parameterType="String">
|
||||||
|
delete from sys_algo_config where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树主对象 behaviortree
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class Behaviortree extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 行为树ID (主键) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 行为树名称 */
|
||||||
|
@Excel(name = "行为树名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 行为树描述 */
|
||||||
|
@Excel(name = "行为树描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date createdAt;
|
||||||
|
|
||||||
|
/** 最后更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date updatedAt;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
|
private String englishName;
|
||||||
|
|
||||||
|
/** 储存行为树的节点关系图 */
|
||||||
|
@Excel(name = "储存行为树的节点关系图")
|
||||||
|
private String xmlContent;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description)
|
||||||
|
{
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(Date createdAt)
|
||||||
|
{
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatedAt()
|
||||||
|
{
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdatedAt(Date updatedAt)
|
||||||
|
{
|
||||||
|
this.updatedAt = updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdatedAt()
|
||||||
|
{
|
||||||
|
return updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnglishName(String englishName)
|
||||||
|
{
|
||||||
|
this.englishName = englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnglishName()
|
||||||
|
{
|
||||||
|
return englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXmlContent(String xmlContent)
|
||||||
|
{
|
||||||
|
this.xmlContent = xmlContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXmlContent()
|
||||||
|
{
|
||||||
|
return xmlContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("description", getDescription())
|
||||||
|
.append("createdAt", getCreatedAt())
|
||||||
|
.append("updatedAt", getUpdatedAt())
|
||||||
|
.append("englishName", getEnglishName())
|
||||||
|
.append("xmlContent", getXmlContent())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点连接对象 nodeconnection
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class Nodeconnection extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 连接ID (主键) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 父节点 (外键: TreeInstanceNode.id) */
|
||||||
|
@Excel(name = "父节点 (外键: TreeInstanceNode.id)")
|
||||||
|
private Long parentNodeId;
|
||||||
|
|
||||||
|
/** 子节点 (外键: TreeInstanceNode.id) */
|
||||||
|
@Excel(name = "子节点 (外键: TreeInstanceNode.id)")
|
||||||
|
private Long childNodeId;
|
||||||
|
|
||||||
|
/** 子节点在父节点下的执行顺序 (对于 Sequence/Selector 等很重要) */
|
||||||
|
@Excel(name = "子节点在父节点下的执行顺序 (对于 Sequence/Selector 等很重要)")
|
||||||
|
private Long orderIndex;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentNodeId(Long parentNodeId)
|
||||||
|
{
|
||||||
|
this.parentNodeId = parentNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getParentNodeId()
|
||||||
|
{
|
||||||
|
return parentNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChildNodeId(Long childNodeId)
|
||||||
|
{
|
||||||
|
this.childNodeId = childNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getChildNodeId()
|
||||||
|
{
|
||||||
|
return childNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderIndex(Long orderIndex)
|
||||||
|
{
|
||||||
|
this.orderIndex = orderIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrderIndex()
|
||||||
|
{
|
||||||
|
return orderIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("parentNodeId", getParentNodeId())
|
||||||
|
.append("childNodeId", getChildNodeId())
|
||||||
|
.append("orderIndex", getOrderIndex())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点参数对象 nodeparameter
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class Nodeparameter extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 节点参数ID (主键) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 关联到哪个节点实例 (外键: TreeInstanceNode.id) */
|
||||||
|
@Excel(name = "关联到哪个节点实例 (外键: TreeInstanceNode.id)")
|
||||||
|
private Long nodeInstanceId;
|
||||||
|
|
||||||
|
/** 关联到哪个参数定义 (外键: TemplateParameterDef.id) */
|
||||||
|
@Excel(name = "关联到哪个参数定义 (外键: TemplateParameterDef.id)")
|
||||||
|
private Long paramDefId;
|
||||||
|
|
||||||
|
/** 节点实例设置的具体参数值 (覆盖模板默认值) */
|
||||||
|
@Excel(name = "节点实例设置的具体参数值 (覆盖模板默认值)")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeInstanceId(Long nodeInstanceId)
|
||||||
|
{
|
||||||
|
this.nodeInstanceId = nodeInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getNodeInstanceId()
|
||||||
|
{
|
||||||
|
return nodeInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamDefId(Long paramDefId)
|
||||||
|
{
|
||||||
|
this.paramDefId = paramDefId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getParamDefId()
|
||||||
|
{
|
||||||
|
return paramDefId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value)
|
||||||
|
{
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue()
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("nodeInstanceId", getNodeInstanceId())
|
||||||
|
.append("paramDefId", getParamDefId())
|
||||||
|
.append("value", getValue())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点模板对象 nodetemplate
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class Nodetemplate extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 节点模板ID (主键) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 节点类型: "Selector", "Sequence", "Action", "Condition", "Decorator" 等 */
|
||||||
|
@Excel(name = "节点类型: Selector, Sequence, Action, Condition, Decorator等")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 模板名称, 例如: "MoveToTarget", "IsTargetVisible" */
|
||||||
|
@Excel(name = "模板名称, 例如: MoveToTarget, IsTargetVisible")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 对应的逻辑执行代码/脚本/函数名 */
|
||||||
|
@Excel(name = "对应的逻辑执行代码/脚本/函数名")
|
||||||
|
private String logicHandler;
|
||||||
|
|
||||||
|
/** 模板描述 */
|
||||||
|
@Excel(name = "模板描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** afsim 中转换的节点名 */
|
||||||
|
@Excel(name = "afsim 中转换的节点名")
|
||||||
|
private String englishName;
|
||||||
|
|
||||||
|
/** 模版类型,节点模版或者条件判断,例如“node”,precondition“ */
|
||||||
|
@Excel(name = "模版类型,节点模版或者条件判断,例如“node”,precondition“")
|
||||||
|
private String templeteType;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType()
|
||||||
|
{
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLogicHandler(String logicHandler)
|
||||||
|
{
|
||||||
|
this.logicHandler = logicHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogicHandler()
|
||||||
|
{
|
||||||
|
return logicHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description)
|
||||||
|
{
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnglishName(String englishName)
|
||||||
|
{
|
||||||
|
this.englishName = englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnglishName()
|
||||||
|
{
|
||||||
|
return englishName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTempleteType(String templeteType)
|
||||||
|
{
|
||||||
|
this.templeteType = templeteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTempleteType()
|
||||||
|
{
|
||||||
|
return templeteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("type", getType())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("logicHandler", getLogicHandler())
|
||||||
|
.append("description", getDescription())
|
||||||
|
.append("englishName", getEnglishName())
|
||||||
|
.append("templeteType", getTempleteType())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板参数定义对象 templateparameterdef
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class Templateparameterdef extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 参数定义ID (主键) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 关联到哪个节点模板 (外键: NodeTemplate.id) */
|
||||||
|
@Excel(name = "关联到哪个节点模板 (外键: NodeTemplate.id)")
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
/** 参数键名, 例如: "target_name", "speed" */
|
||||||
|
@Excel(name = "参数键名, 例如: target_name, speed")
|
||||||
|
private String paramKey;
|
||||||
|
|
||||||
|
/** 参数数据类型, 例如: "float", "int", "string", "bool" */
|
||||||
|
@Excel(name = "参数数据类型, 例如: float, int, string, bool")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
/** 默认值 */
|
||||||
|
@Excel(name = "默认值")
|
||||||
|
private String defaultValue;
|
||||||
|
|
||||||
|
/** 参数描述 */
|
||||||
|
@Excel(name = "参数描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 判断参数模版是节点的参数模版还是条件的参数模版 */
|
||||||
|
@Excel(name = "判断参数模版是节点的参数模版还是条件的参数模版")
|
||||||
|
private String templateType;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateId(Long templateId)
|
||||||
|
{
|
||||||
|
this.templateId = templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTemplateId()
|
||||||
|
{
|
||||||
|
return templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParamKey(String paramKey)
|
||||||
|
{
|
||||||
|
this.paramKey = paramKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParamKey()
|
||||||
|
{
|
||||||
|
return paramKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataType(String dataType)
|
||||||
|
{
|
||||||
|
this.dataType = dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataType()
|
||||||
|
{
|
||||||
|
return dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefaultValue(String defaultValue)
|
||||||
|
{
|
||||||
|
this.defaultValue = defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDefaultValue()
|
||||||
|
{
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description)
|
||||||
|
{
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateType(String templateType)
|
||||||
|
{
|
||||||
|
this.templateType = templateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTemplateType()
|
||||||
|
{
|
||||||
|
return templateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("templateId", getTemplateId())
|
||||||
|
.append("paramKey", getParamKey())
|
||||||
|
.append("dataType", getDataType())
|
||||||
|
.append("defaultValue", getDefaultValue())
|
||||||
|
.append("description", getDescription())
|
||||||
|
.append("templateType", getTemplateType())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.solution.common.annotation.Excel;
|
||||||
|
import com.solution.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树实例节点对象 treenodeinstance
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public class Treenodeinstance extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 节点实例ID (主键) */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 属于哪棵行为树 (外键: BehaviorTree.id) */
|
||||||
|
@Excel(name = "属于哪棵行为树 (外键: BehaviorTree.id)")
|
||||||
|
private Long treeId;
|
||||||
|
|
||||||
|
/** 引用哪个节点模板 (外键: NodeTemplate.id) */
|
||||||
|
@Excel(name = "引用哪个节点模板 (外键: NodeTemplate.id)")
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
/** 节点的显示名称 (可能与模板名称不同, 用于区分实例) */
|
||||||
|
@Excel(name = "节点的显示名称 (可能与模板名称不同, 用于区分实例)")
|
||||||
|
private String instanceName;
|
||||||
|
|
||||||
|
/** 判断当前节点是否为根节点,默认情况下是非根节点 */
|
||||||
|
@Excel(name = "判断当前节点是否为根节点,默认情况下是非根节点")
|
||||||
|
private Long isRoot;
|
||||||
|
|
||||||
|
/** 节点执行的判断条件对应的模版id */
|
||||||
|
@Excel(name = "节点执行的判断条件对应的模版id")
|
||||||
|
private Long preconditionTempleteId;
|
||||||
|
|
||||||
|
@Excel(name = "节点介绍")
|
||||||
|
private String desciption;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
|
private String uuid;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTreeId(Long treeId)
|
||||||
|
{
|
||||||
|
this.treeId = treeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTreeId()
|
||||||
|
{
|
||||||
|
return treeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTemplateId(Long templateId)
|
||||||
|
{
|
||||||
|
this.templateId = templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTemplateId()
|
||||||
|
{
|
||||||
|
return templateId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInstanceName(String instanceName)
|
||||||
|
{
|
||||||
|
this.instanceName = instanceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInstanceName()
|
||||||
|
{
|
||||||
|
return instanceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsRoot(Long isRoot)
|
||||||
|
{
|
||||||
|
this.isRoot = isRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIsRoot()
|
||||||
|
{
|
||||||
|
return isRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPreconditionTempleteId(Long preconditionTempleteId)
|
||||||
|
{
|
||||||
|
this.preconditionTempleteId = preconditionTempleteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPreconditionTempleteId()
|
||||||
|
{
|
||||||
|
return preconditionTempleteId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUuid(String uuid)
|
||||||
|
{
|
||||||
|
this.uuid = uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUuid()
|
||||||
|
{
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesciption() {
|
||||||
|
return desciption;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesciption(String desciption) {
|
||||||
|
this.desciption = desciption;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("treeId", getTreeId())
|
||||||
|
.append("templateId", getTemplateId())
|
||||||
|
.append("instanceName", getInstanceName())
|
||||||
|
.append("isRoot", getIsRoot())
|
||||||
|
.append("preconditionTempleteId", getPreconditionTempleteId())
|
||||||
|
.append("uuid", getUuid())
|
||||||
|
.append("desciption", getDesciption())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Behaviortree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树主Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface BehaviortreeMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询行为树主
|
||||||
|
*
|
||||||
|
* @param id 行为树主主键
|
||||||
|
* @return 行为树主
|
||||||
|
*/
|
||||||
|
public Behaviortree selectBehaviortreeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树主列表
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 行为树主集合
|
||||||
|
*/
|
||||||
|
public List<Behaviortree> selectBehaviortreeList(Behaviortree behaviortree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树主
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBehaviortree(Behaviortree behaviortree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树主
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBehaviortree(Behaviortree behaviortree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树主
|
||||||
|
*
|
||||||
|
* @param id 行为树主主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBehaviortreeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行为树主
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBehaviortreeByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Nodeconnection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点连接Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface NodeconnectionMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询节点连接
|
||||||
|
*
|
||||||
|
* @param id 节点连接主键
|
||||||
|
* @return 节点连接
|
||||||
|
*/
|
||||||
|
public Nodeconnection selectNodeconnectionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点连接列表
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 节点连接集合
|
||||||
|
*/
|
||||||
|
public List<Nodeconnection> selectNodeconnectionList(Nodeconnection nodeconnection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点连接
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNodeconnection(Nodeconnection nodeconnection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点连接
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNodeconnection(Nodeconnection nodeconnection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点连接
|
||||||
|
*
|
||||||
|
* @param id 节点连接主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeconnectionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点连接
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeconnectionByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Nodeparameter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点参数Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface NodeparameterMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询节点参数
|
||||||
|
*
|
||||||
|
* @param id 节点参数主键
|
||||||
|
* @return 节点参数
|
||||||
|
*/
|
||||||
|
public Nodeparameter selectNodeparameterById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点参数列表
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 节点参数集合
|
||||||
|
*/
|
||||||
|
public List<Nodeparameter> selectNodeparameterList(Nodeparameter nodeparameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点参数
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNodeparameter(Nodeparameter nodeparameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点参数
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNodeparameter(Nodeparameter nodeparameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点参数
|
||||||
|
*
|
||||||
|
* @param id 节点参数主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeparameterById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点参数
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeparameterByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Nodetemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点模板Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface NodetemplateMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询节点模板
|
||||||
|
*
|
||||||
|
* @param id 节点模板主键
|
||||||
|
* @return 节点模板
|
||||||
|
*/
|
||||||
|
public Nodetemplate selectNodetemplateById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点模板列表
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 节点模板集合
|
||||||
|
*/
|
||||||
|
public List<Nodetemplate> selectNodetemplateList(Nodetemplate nodetemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点模板
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNodetemplate(Nodetemplate nodetemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点模板
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNodetemplate(Nodetemplate nodetemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点模板
|
||||||
|
*
|
||||||
|
* @param id 节点模板主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodetemplateById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点模板
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodetemplateByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Templateparameterdef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板参数定义Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface TemplateparameterdefMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义
|
||||||
|
*
|
||||||
|
* @param id 模板参数定义主键
|
||||||
|
* @return 模板参数定义
|
||||||
|
*/
|
||||||
|
public Templateparameterdef selectTemplateparameterdefById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义列表
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 模板参数定义集合
|
||||||
|
*/
|
||||||
|
public List<Templateparameterdef> selectTemplateparameterdefList(Templateparameterdef templateparameterdef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增模板参数定义
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTemplateparameterdef(Templateparameterdef templateparameterdef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改模板参数定义
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTemplateparameterdef(Templateparameterdef templateparameterdef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除模板参数定义
|
||||||
|
*
|
||||||
|
* @param id 模板参数定义主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTemplateparameterdefById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除模板参数定义
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTemplateparameterdefByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Treenodeinstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树实例节点Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface TreenodeinstanceMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点
|
||||||
|
*
|
||||||
|
* @param id 行为树实例节点主键
|
||||||
|
* @return 行为树实例节点
|
||||||
|
*/
|
||||||
|
public Treenodeinstance selectTreenodeinstanceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点列表
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 行为树实例节点集合
|
||||||
|
*/
|
||||||
|
public List<Treenodeinstance> selectTreenodeinstanceList(Treenodeinstance treenodeinstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树实例节点
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTreenodeinstance(Treenodeinstance treenodeinstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树实例节点
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTreenodeinstance(Treenodeinstance treenodeinstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树实例节点
|
||||||
|
*
|
||||||
|
* @param id 行为树实例节点主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTreenodeinstanceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行为树实例节点
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTreenodeinstanceByIds(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Behaviortree;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树主Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface IBehaviortreeService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询行为树主
|
||||||
|
*
|
||||||
|
* @param id 行为树主主键
|
||||||
|
* @return 行为树主
|
||||||
|
*/
|
||||||
|
public Behaviortree selectBehaviortreeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树主列表
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 行为树主集合
|
||||||
|
*/
|
||||||
|
public List<Behaviortree> selectBehaviortreeList(Behaviortree behaviortree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树主
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertBehaviortree(Behaviortree behaviortree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树主
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateBehaviortree(Behaviortree behaviortree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行为树主
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的行为树主主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBehaviortreeByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树主信息
|
||||||
|
*
|
||||||
|
* @param id 行为树主主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteBehaviortreeById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Nodeconnection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点连接Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface INodeconnectionService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询节点连接
|
||||||
|
*
|
||||||
|
* @param id 节点连接主键
|
||||||
|
* @return 节点连接
|
||||||
|
*/
|
||||||
|
public Nodeconnection selectNodeconnectionById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点连接列表
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 节点连接集合
|
||||||
|
*/
|
||||||
|
public List<Nodeconnection> selectNodeconnectionList(Nodeconnection nodeconnection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点连接
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNodeconnection(Nodeconnection nodeconnection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点连接
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNodeconnection(Nodeconnection nodeconnection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点连接
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的节点连接主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeconnectionByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点连接信息
|
||||||
|
*
|
||||||
|
* @param id 节点连接主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeconnectionById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Nodeparameter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点参数Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface INodeparameterService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询节点参数
|
||||||
|
*
|
||||||
|
* @param id 节点参数主键
|
||||||
|
* @return 节点参数
|
||||||
|
*/
|
||||||
|
public Nodeparameter selectNodeparameterById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点参数列表
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 节点参数集合
|
||||||
|
*/
|
||||||
|
public List<Nodeparameter> selectNodeparameterList(Nodeparameter nodeparameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点参数
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNodeparameter(Nodeparameter nodeparameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点参数
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNodeparameter(Nodeparameter nodeparameter);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点参数
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的节点参数主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeparameterByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点参数信息
|
||||||
|
*
|
||||||
|
* @param id 节点参数主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodeparameterById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Nodetemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点模板Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface INodetemplateService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询节点模板
|
||||||
|
*
|
||||||
|
* @param id 节点模板主键
|
||||||
|
* @return 节点模板
|
||||||
|
*/
|
||||||
|
public Nodetemplate selectNodetemplateById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点模板列表
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 节点模板集合
|
||||||
|
*/
|
||||||
|
public List<Nodetemplate> selectNodetemplateList(Nodetemplate nodetemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点模板
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertNodetemplate(Nodetemplate nodetemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点模板
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateNodetemplate(Nodetemplate nodetemplate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点模板
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的节点模板主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodetemplateByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点模板信息
|
||||||
|
*
|
||||||
|
* @param id 节点模板主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteNodetemplateById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Templateparameterdef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板参数定义Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface ITemplateparameterdefService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义
|
||||||
|
*
|
||||||
|
* @param id 模板参数定义主键
|
||||||
|
* @return 模板参数定义
|
||||||
|
*/
|
||||||
|
public Templateparameterdef selectTemplateparameterdefById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义列表
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 模板参数定义集合
|
||||||
|
*/
|
||||||
|
public List<Templateparameterdef> selectTemplateparameterdefList(Templateparameterdef templateparameterdef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增模板参数定义
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTemplateparameterdef(Templateparameterdef templateparameterdef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改模板参数定义
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTemplateparameterdef(Templateparameterdef templateparameterdef);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除模板参数定义
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的模板参数定义主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTemplateparameterdefByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除模板参数定义信息
|
||||||
|
*
|
||||||
|
* @param id 模板参数定义主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTemplateparameterdefById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.solution.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.solution.system.domain.Treenodeinstance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树实例节点Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
public interface ITreenodeinstanceService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点
|
||||||
|
*
|
||||||
|
* @param id 行为树实例节点主键
|
||||||
|
* @return 行为树实例节点
|
||||||
|
*/
|
||||||
|
public Treenodeinstance selectTreenodeinstanceById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点列表
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 行为树实例节点集合
|
||||||
|
*/
|
||||||
|
public List<Treenodeinstance> selectTreenodeinstanceList(Treenodeinstance treenodeinstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树实例节点
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTreenodeinstance(Treenodeinstance treenodeinstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树实例节点
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTreenodeinstance(Treenodeinstance treenodeinstance);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行为树实例节点
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的行为树实例节点主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTreenodeinstanceByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树实例节点信息
|
||||||
|
*
|
||||||
|
* @param id 行为树实例节点主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTreenodeinstanceById(Long id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.system.mapper.BehaviortreeMapper;
|
||||||
|
import com.solution.system.domain.Behaviortree;
|
||||||
|
import com.solution.system.service.IBehaviortreeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树主Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BehaviortreeServiceImpl implements IBehaviortreeService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private BehaviortreeMapper behaviortreeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树主
|
||||||
|
*
|
||||||
|
* @param id 行为树主主键
|
||||||
|
* @return 行为树主
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Behaviortree selectBehaviortreeById(Long id)
|
||||||
|
{
|
||||||
|
return behaviortreeMapper.selectBehaviortreeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树主列表
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 行为树主
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Behaviortree> selectBehaviortreeList(Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
return behaviortreeMapper.selectBehaviortreeList(behaviortree);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树主
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertBehaviortree(Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
return behaviortreeMapper.insertBehaviortree(behaviortree);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树主
|
||||||
|
*
|
||||||
|
* @param behaviortree 行为树主
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateBehaviortree(Behaviortree behaviortree)
|
||||||
|
{
|
||||||
|
return behaviortreeMapper.updateBehaviortree(behaviortree);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行为树主
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的行为树主主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBehaviortreeByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return behaviortreeMapper.deleteBehaviortreeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树主信息
|
||||||
|
*
|
||||||
|
* @param id 行为树主主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteBehaviortreeById(Long id)
|
||||||
|
{
|
||||||
|
return behaviortreeMapper.deleteBehaviortreeById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.system.mapper.NodeconnectionMapper;
|
||||||
|
import com.solution.system.domain.Nodeconnection;
|
||||||
|
import com.solution.system.service.INodeconnectionService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点连接Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NodeconnectionServiceImpl implements INodeconnectionService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private NodeconnectionMapper nodeconnectionMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点连接
|
||||||
|
*
|
||||||
|
* @param id 节点连接主键
|
||||||
|
* @return 节点连接
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Nodeconnection selectNodeconnectionById(Long id)
|
||||||
|
{
|
||||||
|
return nodeconnectionMapper.selectNodeconnectionById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点连接列表
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 节点连接
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Nodeconnection> selectNodeconnectionList(Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
return nodeconnectionMapper.selectNodeconnectionList(nodeconnection);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点连接
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertNodeconnection(Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
return nodeconnectionMapper.insertNodeconnection(nodeconnection);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点连接
|
||||||
|
*
|
||||||
|
* @param nodeconnection 节点连接
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateNodeconnection(Nodeconnection nodeconnection)
|
||||||
|
{
|
||||||
|
return nodeconnectionMapper.updateNodeconnection(nodeconnection);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点连接
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的节点连接主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNodeconnectionByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return nodeconnectionMapper.deleteNodeconnectionByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点连接信息
|
||||||
|
*
|
||||||
|
* @param id 节点连接主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNodeconnectionById(Long id)
|
||||||
|
{
|
||||||
|
return nodeconnectionMapper.deleteNodeconnectionById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.system.mapper.NodeparameterMapper;
|
||||||
|
import com.solution.system.domain.Nodeparameter;
|
||||||
|
import com.solution.system.service.INodeparameterService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点参数Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NodeparameterServiceImpl implements INodeparameterService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private NodeparameterMapper nodeparameterMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点参数
|
||||||
|
*
|
||||||
|
* @param id 节点参数主键
|
||||||
|
* @return 节点参数
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Nodeparameter selectNodeparameterById(Long id)
|
||||||
|
{
|
||||||
|
return nodeparameterMapper.selectNodeparameterById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点参数列表
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 节点参数
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Nodeparameter> selectNodeparameterList(Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
return nodeparameterMapper.selectNodeparameterList(nodeparameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点参数
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertNodeparameter(Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
return nodeparameterMapper.insertNodeparameter(nodeparameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点参数
|
||||||
|
*
|
||||||
|
* @param nodeparameter 节点参数
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateNodeparameter(Nodeparameter nodeparameter)
|
||||||
|
{
|
||||||
|
return nodeparameterMapper.updateNodeparameter(nodeparameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点参数
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的节点参数主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNodeparameterByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return nodeparameterMapper.deleteNodeparameterByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点参数信息
|
||||||
|
*
|
||||||
|
* @param id 节点参数主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNodeparameterById(Long id)
|
||||||
|
{
|
||||||
|
return nodeparameterMapper.deleteNodeparameterById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.system.mapper.NodetemplateMapper;
|
||||||
|
import com.solution.system.domain.Nodetemplate;
|
||||||
|
import com.solution.system.service.INodetemplateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点模板Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NodetemplateServiceImpl implements INodetemplateService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private NodetemplateMapper nodetemplateMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点模板
|
||||||
|
*
|
||||||
|
* @param id 节点模板主键
|
||||||
|
* @return 节点模板
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Nodetemplate selectNodetemplateById(Long id)
|
||||||
|
{
|
||||||
|
return nodetemplateMapper.selectNodetemplateById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节点模板列表
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 节点模板
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Nodetemplate> selectNodetemplateList(Nodetemplate nodetemplate)
|
||||||
|
{
|
||||||
|
return nodetemplateMapper.selectNodetemplateList(nodetemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节点模板
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertNodetemplate(Nodetemplate nodetemplate)
|
||||||
|
{
|
||||||
|
return nodetemplateMapper.insertNodetemplate(nodetemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节点模板
|
||||||
|
*
|
||||||
|
* @param nodetemplate 节点模板
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateNodetemplate(Nodetemplate nodetemplate)
|
||||||
|
{
|
||||||
|
return nodetemplateMapper.updateNodetemplate(nodetemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除节点模板
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的节点模板主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNodetemplateByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return nodetemplateMapper.deleteNodetemplateByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节点模板信息
|
||||||
|
*
|
||||||
|
* @param id 节点模板主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteNodetemplateById(Long id)
|
||||||
|
{
|
||||||
|
return nodetemplateMapper.deleteNodetemplateById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.system.mapper.TemplateparameterdefMapper;
|
||||||
|
import com.solution.system.domain.Templateparameterdef;
|
||||||
|
import com.solution.system.service.ITemplateparameterdefService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板参数定义Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TemplateparameterdefServiceImpl implements ITemplateparameterdefService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TemplateparameterdefMapper templateparameterdefMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义
|
||||||
|
*
|
||||||
|
* @param id 模板参数定义主键
|
||||||
|
* @return 模板参数定义
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Templateparameterdef selectTemplateparameterdefById(Long id)
|
||||||
|
{
|
||||||
|
return templateparameterdefMapper.selectTemplateparameterdefById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询模板参数定义列表
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 模板参数定义
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Templateparameterdef> selectTemplateparameterdefList(Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
return templateparameterdefMapper.selectTemplateparameterdefList(templateparameterdef);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增模板参数定义
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTemplateparameterdef(Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
return templateparameterdefMapper.insertTemplateparameterdef(templateparameterdef);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改模板参数定义
|
||||||
|
*
|
||||||
|
* @param templateparameterdef 模板参数定义
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTemplateparameterdef(Templateparameterdef templateparameterdef)
|
||||||
|
{
|
||||||
|
return templateparameterdefMapper.updateTemplateparameterdef(templateparameterdef);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除模板参数定义
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的模板参数定义主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTemplateparameterdefByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return templateparameterdefMapper.deleteTemplateparameterdefByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除模板参数定义信息
|
||||||
|
*
|
||||||
|
* @param id 模板参数定义主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTemplateparameterdefById(Long id)
|
||||||
|
{
|
||||||
|
return templateparameterdefMapper.deleteTemplateparameterdefById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.solution.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.solution.system.mapper.TreenodeinstanceMapper;
|
||||||
|
import com.solution.system.domain.Treenodeinstance;
|
||||||
|
import com.solution.system.service.ITreenodeinstanceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行为树实例节点Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-05
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TreenodeinstanceServiceImpl implements ITreenodeinstanceService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TreenodeinstanceMapper treenodeinstanceMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点
|
||||||
|
*
|
||||||
|
* @param id 行为树实例节点主键
|
||||||
|
* @return 行为树实例节点
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Treenodeinstance selectTreenodeinstanceById(Long id)
|
||||||
|
{
|
||||||
|
return treenodeinstanceMapper.selectTreenodeinstanceById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为树实例节点列表
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 行为树实例节点
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Treenodeinstance> selectTreenodeinstanceList(Treenodeinstance treenodeinstance)
|
||||||
|
{
|
||||||
|
return treenodeinstanceMapper.selectTreenodeinstanceList(treenodeinstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增行为树实例节点
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTreenodeinstance(Treenodeinstance treenodeinstance)
|
||||||
|
{
|
||||||
|
return treenodeinstanceMapper.insertTreenodeinstance(treenodeinstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改行为树实例节点
|
||||||
|
*
|
||||||
|
* @param treenodeinstance 行为树实例节点
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTreenodeinstance(Treenodeinstance treenodeinstance)
|
||||||
|
{
|
||||||
|
return treenodeinstanceMapper.updateTreenodeinstance(treenodeinstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除行为树实例节点
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的行为树实例节点主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTreenodeinstanceByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return treenodeinstanceMapper.deleteTreenodeinstanceByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除行为树实例节点信息
|
||||||
|
*
|
||||||
|
* @param id 行为树实例节点主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTreenodeinstanceById(Long id)
|
||||||
|
{
|
||||||
|
return treenodeinstanceMapper.deleteTreenodeinstanceById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.system.mapper.BehaviortreeMapper">
|
||||||
|
|
||||||
|
<resultMap type="Behaviortree" id="BehaviortreeResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
<result property="createdAt" column="created_at" />
|
||||||
|
<result property="updatedAt" column="updated_at" />
|
||||||
|
<result property="englishName" column="english_name" />
|
||||||
|
<result property="xmlContent" column="xml_content" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectBehaviortreeVo">
|
||||||
|
select id, name, description, created_at, updated_at, english_name, xml_content from behaviortree
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectBehaviortreeList" parameterType="Behaviortree" resultMap="BehaviortreeResult">
|
||||||
|
<include refid="selectBehaviortreeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||||
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||||
|
<if test="englishName != null and englishName != ''"> and english_name like concat('%', #{englishName}, '%')</if>
|
||||||
|
<if test="xmlContent != null and xmlContent != ''"> and xml_content = #{xmlContent}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectBehaviortreeById" parameterType="Long" resultMap="BehaviortreeResult">
|
||||||
|
<include refid="selectBehaviortreeVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertBehaviortree" parameterType="Behaviortree" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into behaviortree
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="description != null">description,</if>
|
||||||
|
<if test="createdAt != null">created_at,</if>
|
||||||
|
<if test="updatedAt != null">updated_at,</if>
|
||||||
|
<if test="englishName != null and englishName != ''">english_name,</if>
|
||||||
|
<if test="xmlContent != null">xml_content,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="description != null">#{description},</if>
|
||||||
|
<if test="createdAt != null">#{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">#{updatedAt},</if>
|
||||||
|
<if test="englishName != null and englishName != ''">#{englishName},</if>
|
||||||
|
<if test="xmlContent != null">#{xmlContent},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateBehaviortree" parameterType="Behaviortree">
|
||||||
|
update behaviortree
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="description != null">description = #{description},</if>
|
||||||
|
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||||
|
<if test="englishName != null and englishName != ''">english_name = #{englishName},</if>
|
||||||
|
<if test="xmlContent != null">xml_content = #{xmlContent},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteBehaviortreeById" parameterType="Long">
|
||||||
|
delete from behaviortree where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteBehaviortreeByIds" parameterType="String">
|
||||||
|
delete from behaviortree where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.system.mapper.NodeconnectionMapper">
|
||||||
|
|
||||||
|
<resultMap type="Nodeconnection" id="NodeconnectionResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="parentNodeId" column="parent_node_id" />
|
||||||
|
<result property="childNodeId" column="child_node_id" />
|
||||||
|
<result property="orderIndex" column="order_index" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectNodeconnectionVo">
|
||||||
|
select id, parent_node_id, child_node_id, order_index from nodeconnection
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectNodeconnectionList" parameterType="Nodeconnection" resultMap="NodeconnectionResult">
|
||||||
|
<include refid="selectNodeconnectionVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="parentNodeId != null "> and parent_node_id = #{parentNodeId}</if>
|
||||||
|
<if test="childNodeId != null "> and child_node_id = #{childNodeId}</if>
|
||||||
|
<if test="orderIndex != null "> and order_index = #{orderIndex}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNodeconnectionById" parameterType="Long" resultMap="NodeconnectionResult">
|
||||||
|
<include refid="selectNodeconnectionVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertNodeconnection" parameterType="Nodeconnection" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into nodeconnection
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="parentNodeId != null">parent_node_id,</if>
|
||||||
|
<if test="childNodeId != null">child_node_id,</if>
|
||||||
|
<if test="orderIndex != null">order_index,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="parentNodeId != null">#{parentNodeId},</if>
|
||||||
|
<if test="childNodeId != null">#{childNodeId},</if>
|
||||||
|
<if test="orderIndex != null">#{orderIndex},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateNodeconnection" parameterType="Nodeconnection">
|
||||||
|
update nodeconnection
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="parentNodeId != null">parent_node_id = #{parentNodeId},</if>
|
||||||
|
<if test="childNodeId != null">child_node_id = #{childNodeId},</if>
|
||||||
|
<if test="orderIndex != null">order_index = #{orderIndex},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteNodeconnectionById" parameterType="Long">
|
||||||
|
delete from nodeconnection where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteNodeconnectionByIds" parameterType="String">
|
||||||
|
delete from nodeconnection where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.system.mapper.NodeparameterMapper">
|
||||||
|
|
||||||
|
<resultMap type="Nodeparameter" id="NodeparameterResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="nodeInstanceId" column="node_instance_id" />
|
||||||
|
<result property="paramDefId" column="param_def_id" />
|
||||||
|
<result property="value" column="value" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectNodeparameterVo">
|
||||||
|
select id, node_instance_id, param_def_id, value from nodeparameter
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectNodeparameterList" parameterType="Nodeparameter" resultMap="NodeparameterResult">
|
||||||
|
<include refid="selectNodeparameterVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="nodeInstanceId != null "> and node_instance_id = #{nodeInstanceId}</if>
|
||||||
|
<if test="paramDefId != null "> and param_def_id = #{paramDefId}</if>
|
||||||
|
<if test="value != null and value != ''"> and value = #{value}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNodeparameterById" parameterType="Long" resultMap="NodeparameterResult">
|
||||||
|
<include refid="selectNodeparameterVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertNodeparameter" parameterType="Nodeparameter" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into nodeparameter
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="nodeInstanceId != null">node_instance_id,</if>
|
||||||
|
<if test="paramDefId != null">param_def_id,</if>
|
||||||
|
<if test="value != null">value,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="nodeInstanceId != null">#{nodeInstanceId},</if>
|
||||||
|
<if test="paramDefId != null">#{paramDefId},</if>
|
||||||
|
<if test="value != null">#{value},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateNodeparameter" parameterType="Nodeparameter">
|
||||||
|
update nodeparameter
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="nodeInstanceId != null">node_instance_id = #{nodeInstanceId},</if>
|
||||||
|
<if test="paramDefId != null">param_def_id = #{paramDefId},</if>
|
||||||
|
<if test="value != null">value = #{value},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteNodeparameterById" parameterType="Long">
|
||||||
|
delete from nodeparameter where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteNodeparameterByIds" parameterType="String">
|
||||||
|
delete from nodeparameter where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.system.mapper.NodetemplateMapper">
|
||||||
|
|
||||||
|
<resultMap type="Nodetemplate" id="NodetemplateResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="logicHandler" column="logic_handler" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
<result property="englishName" column="english_name" />
|
||||||
|
<result property="templeteType" column="templete_type" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectNodetemplateVo">
|
||||||
|
select id, type, name, logic_handler, description, english_name, templete_type from nodetemplate
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectNodetemplateList" parameterType="Nodetemplate" resultMap="NodetemplateResult">
|
||||||
|
<include refid="selectNodetemplateVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="logicHandler != null and logicHandler != ''"> and logic_handler = #{logicHandler}</if>
|
||||||
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||||
|
<if test="englishName != null and englishName != ''"> and english_name like concat('%', #{englishName}, '%')</if>
|
||||||
|
<if test="templeteType != null and templeteType != ''"> and templete_type = #{templeteType}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectNodetemplateById" parameterType="Long" resultMap="NodetemplateResult">
|
||||||
|
<include refid="selectNodetemplateVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertNodetemplate" parameterType="Nodetemplate" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into nodetemplate
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="type != null and type != ''">type,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="logicHandler != null">logic_handler,</if>
|
||||||
|
<if test="description != null">description,</if>
|
||||||
|
<if test="englishName != null">english_name,</if>
|
||||||
|
<if test="templeteType != null and templeteType != ''">templete_type,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="type != null and type != ''">#{type},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="logicHandler != null">#{logicHandler},</if>
|
||||||
|
<if test="description != null">#{description},</if>
|
||||||
|
<if test="englishName != null">#{englishName},</if>
|
||||||
|
<if test="templeteType != null and templeteType != ''">#{templeteType},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateNodetemplate" parameterType="Nodetemplate">
|
||||||
|
update nodetemplate
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="type != null and type != ''">type = #{type},</if>
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="logicHandler != null">logic_handler = #{logicHandler},</if>
|
||||||
|
<if test="description != null">description = #{description},</if>
|
||||||
|
<if test="englishName != null">english_name = #{englishName},</if>
|
||||||
|
<if test="templeteType != null and templeteType != ''">templete_type = #{templeteType},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteNodetemplateById" parameterType="Long">
|
||||||
|
delete from nodetemplate where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteNodetemplateByIds" parameterType="String">
|
||||||
|
delete from nodetemplate where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.system.mapper.TemplateparameterdefMapper">
|
||||||
|
|
||||||
|
<resultMap type="Templateparameterdef" id="TemplateparameterdefResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="templateId" column="template_id" />
|
||||||
|
<result property="paramKey" column="param_key" />
|
||||||
|
<result property="dataType" column="data_type" />
|
||||||
|
<result property="defaultValue" column="default_value" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
<result property="templateType" column="template_type" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTemplateparameterdefVo">
|
||||||
|
select id, template_id, param_key, data_type, default_value, description, template_type from templateparameterdef
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTemplateparameterdefList" parameterType="Templateparameterdef" resultMap="TemplateparameterdefResult">
|
||||||
|
<include refid="selectTemplateparameterdefVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="templateId != null "> and template_id = #{templateId}</if>
|
||||||
|
<if test="paramKey != null and paramKey != ''"> and param_key = #{paramKey}</if>
|
||||||
|
<if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if>
|
||||||
|
<if test="defaultValue != null and defaultValue != ''"> and default_value = #{defaultValue}</if>
|
||||||
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||||
|
<if test="templateType != null and templateType != ''"> and template_type = #{templateType}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTemplateparameterdefById" parameterType="Long" resultMap="TemplateparameterdefResult">
|
||||||
|
<include refid="selectTemplateparameterdefVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTemplateparameterdef" parameterType="Templateparameterdef" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into templateparameterdef
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="templateId != null">template_id,</if>
|
||||||
|
<if test="paramKey != null and paramKey != ''">param_key,</if>
|
||||||
|
<if test="dataType != null and dataType != ''">data_type,</if>
|
||||||
|
<if test="defaultValue != null and defaultValue != ''">default_value,</if>
|
||||||
|
<if test="description != null">description,</if>
|
||||||
|
<if test="templateType != null and templateType != ''">template_type,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="templateId != null">#{templateId},</if>
|
||||||
|
<if test="paramKey != null and paramKey != ''">#{paramKey},</if>
|
||||||
|
<if test="dataType != null and dataType != ''">#{dataType},</if>
|
||||||
|
<if test="defaultValue != null and defaultValue != ''">#{defaultValue},</if>
|
||||||
|
<if test="description != null">#{description},</if>
|
||||||
|
<if test="templateType != null and templateType != ''">#{templateType},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTemplateparameterdef" parameterType="Templateparameterdef">
|
||||||
|
update templateparameterdef
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="templateId != null">template_id = #{templateId},</if>
|
||||||
|
<if test="paramKey != null and paramKey != ''">param_key = #{paramKey},</if>
|
||||||
|
<if test="dataType != null and dataType != ''">data_type = #{dataType},</if>
|
||||||
|
<if test="defaultValue != null and defaultValue != ''">default_value = #{defaultValue},</if>
|
||||||
|
<if test="description != null">description = #{description},</if>
|
||||||
|
<if test="templateType != null and templateType != ''">template_type = #{templateType},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteTemplateparameterdefById" parameterType="Long">
|
||||||
|
delete from templateparameterdef where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTemplateparameterdefByIds" parameterType="String">
|
||||||
|
delete from templateparameterdef where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.solution.system.mapper.TreenodeinstanceMapper">
|
||||||
|
|
||||||
|
<resultMap type="Treenodeinstance" id="TreenodeinstanceResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="treeId" column="tree_id" />
|
||||||
|
<result property="templateId" column="template_id" />
|
||||||
|
<result property="instanceName" column="instance_name" />
|
||||||
|
<result property="isRoot" column="is_root" />
|
||||||
|
<result property="preconditionTempleteId" column="precondition_templete_id" />
|
||||||
|
<result property="uuid" column="uuid" />
|
||||||
|
<result property="desciption" column="desciption" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTreenodeinstanceVo">
|
||||||
|
select id, tree_id, template_id, instance_name, is_root, precondition_templete_id, uuid,desciption from treenodeinstance
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTreenodeinstanceList" parameterType="Treenodeinstance" resultMap="TreenodeinstanceResult">
|
||||||
|
<include refid="selectTreenodeinstanceVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="treeId != null "> and tree_id = #{treeId}</if>
|
||||||
|
<if test="templateId != null "> and template_id = #{templateId}</if>
|
||||||
|
<if test="instanceName != null and instanceName != ''"> and instance_name like concat('%', #{instanceName}, '%')</if>
|
||||||
|
<if test="isRoot != null "> and is_root = #{isRoot}</if>
|
||||||
|
<if test="preconditionTempleteId != null "> and precondition_templete_id = #{preconditionTempleteId}</if>
|
||||||
|
<if test="uuid != null and uuid != ''"> and uuid = #{uuid}</if>
|
||||||
|
<if test="desciption != null and desciption != ''"> and desciption = #{desciption}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTreenodeinstanceById" parameterType="Long" resultMap="TreenodeinstanceResult">
|
||||||
|
<include refid="selectTreenodeinstanceVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTreenodeinstance" parameterType="Treenodeinstance" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into treenodeinstance
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="treeId != null">tree_id,</if>
|
||||||
|
<if test="templateId != null">template_id,</if>
|
||||||
|
<if test="instanceName != null">instance_name,</if>
|
||||||
|
<if test="isRoot != null">is_root,</if>
|
||||||
|
<if test="preconditionTempleteId != null">precondition_templete_id,</if>
|
||||||
|
<if test="uuid != null">uuid,</if>
|
||||||
|
<if test="desciption != null">desciption,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="treeId != null">#{treeId},</if>
|
||||||
|
<if test="templateId != null">#{templateId},</if>
|
||||||
|
<if test="instanceName != null">#{instanceName},</if>
|
||||||
|
<if test="isRoot != null">#{isRoot},</if>
|
||||||
|
<if test="preconditionTempleteId != null">#{preconditionTempleteId},</if>
|
||||||
|
<if test="uuid != null">#{uuid},</if>
|
||||||
|
<if test="desciption != null">#{desciption},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTreenodeinstance" parameterType="Treenodeinstance">
|
||||||
|
update treenodeinstance
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="treeId != null">tree_id = #{treeId},</if>
|
||||||
|
<if test="templateId != null">template_id = #{templateId},</if>
|
||||||
|
<if test="instanceName != null">instance_name = #{instanceName},</if>
|
||||||
|
<if test="isRoot != null">is_root = #{isRoot},</if>
|
||||||
|
<if test="preconditionTempleteId != null">precondition_templete_id = #{preconditionTempleteId},</if>
|
||||||
|
<if test="uuid != null">uuid = #{uuid},</if>
|
||||||
|
<if test="desciption != null">desciption = #{desciption},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteTreenodeinstanceById" parameterType="Long">
|
||||||
|
delete from treenodeinstance where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTreenodeinstanceByIds" parameterType="String">
|
||||||
|
delete from treenodeinstance where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -63,7 +63,7 @@ public class SysLoginService
|
|||||||
public String login(String username, String password, String code, String uuid)
|
public String login(String username, String password, String code, String uuid)
|
||||||
{
|
{
|
||||||
// 验证码校验
|
// 验证码校验
|
||||||
// validateCaptcha(username, code, uuid);
|
validateCaptcha(username, code, uuid);
|
||||||
// 登录前置校验
|
// 登录前置校验
|
||||||
loginPreCheck(username, password);
|
loginPreCheck(username, password);
|
||||||
// 用户验证
|
// 用户验证
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# This file is part of the kernelstudio package.
|
|
||||||
#
|
|
||||||
# (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
#
|
|
||||||
# For the full copyright and license information, please view the LICENSE file
|
|
||||||
# that was distributed with this source code.
|
|
||||||
#
|
|
||||||
NODE_ENV=development
|
|
||||||
APP_BASE_URL=/
|
|
||||||
APP_API_URL=/api/v1
|
|
||||||
APP_API_TIMEOUT=60000
|
|
||||||
APP_PORT=9999
|
|
||||||
APP_PROXY_HOST=http://127.0.0.1
|
|
||||||
APP_PROXY_PORT=12000
|
|
||||||
APP_ASSETS_HOST=http://127.0.0.1:9999
|
|
||||||
APP_DIST_DIR=assets/web
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# This file is part of the kernelstudio package.
|
|
||||||
#
|
|
||||||
# (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
#
|
|
||||||
# For the full copyright and license information, please view the LICENSE file
|
|
||||||
# that was distributed with this source code.
|
|
||||||
#
|
|
||||||
APP_BASE_URL=/
|
|
||||||
APP_API_URL=/api/v1
|
|
||||||
APP_API_TIMEOUT=60000
|
|
||||||
APP_PORT=9999
|
|
||||||
APP_PROXY_HOST=http://127.0.0.1
|
|
||||||
APP_PROXY_PORT=12000
|
|
||||||
APP_ASSETS_HOST=http://app.kernelstudio.com
|
|
||||||
APP_DIST_DIR=assets/web
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
{
|
|
||||||
"globals": {
|
|
||||||
"Component": true,
|
|
||||||
"ComponentPublicInstance": true,
|
|
||||||
"ComputedRef": true,
|
|
||||||
"DirectiveBinding": true,
|
|
||||||
"EffectScope": true,
|
|
||||||
"ExtractDefaultPropTypes": true,
|
|
||||||
"ExtractPropTypes": true,
|
|
||||||
"ExtractPublicPropTypes": true,
|
|
||||||
"InjectionKey": true,
|
|
||||||
"MaybeRef": true,
|
|
||||||
"MaybeRefOrGetter": true,
|
|
||||||
"PropType": true,
|
|
||||||
"Ref": true,
|
|
||||||
"ShallowRef": true,
|
|
||||||
"Slot": true,
|
|
||||||
"Slots": true,
|
|
||||||
"VNode": true,
|
|
||||||
"WritableComputedRef": true,
|
|
||||||
"acceptHMRUpdate": true,
|
|
||||||
"computed": true,
|
|
||||||
"createApp": true,
|
|
||||||
"createPinia": true,
|
|
||||||
"customRef": true,
|
|
||||||
"defineAsyncComponent": true,
|
|
||||||
"defineComponent": true,
|
|
||||||
"defineStore": true,
|
|
||||||
"effectScope": true,
|
|
||||||
"getActivePinia": true,
|
|
||||||
"getCurrentInstance": true,
|
|
||||||
"getCurrentScope": true,
|
|
||||||
"getCurrentWatcher": true,
|
|
||||||
"inject": true,
|
|
||||||
"isProxy": true,
|
|
||||||
"isReactive": true,
|
|
||||||
"isReadonly": true,
|
|
||||||
"isRef": true,
|
|
||||||
"isShallow": true,
|
|
||||||
"mapActions": true,
|
|
||||||
"mapGetters": true,
|
|
||||||
"mapState": true,
|
|
||||||
"mapStores": true,
|
|
||||||
"mapWritableState": true,
|
|
||||||
"markRaw": true,
|
|
||||||
"nextTick": true,
|
|
||||||
"onActivated": true,
|
|
||||||
"onBeforeMount": true,
|
|
||||||
"onBeforeRouteLeave": true,
|
|
||||||
"onBeforeRouteUpdate": true,
|
|
||||||
"onBeforeUnmount": true,
|
|
||||||
"onBeforeUpdate": true,
|
|
||||||
"onDeactivated": true,
|
|
||||||
"onErrorCaptured": true,
|
|
||||||
"onMounted": true,
|
|
||||||
"onRenderTracked": true,
|
|
||||||
"onRenderTriggered": true,
|
|
||||||
"onScopeDispose": true,
|
|
||||||
"onServerPrefetch": true,
|
|
||||||
"onUnmounted": true,
|
|
||||||
"onUpdated": true,
|
|
||||||
"onWatcherCleanup": true,
|
|
||||||
"provide": true,
|
|
||||||
"reactive": true,
|
|
||||||
"readonly": true,
|
|
||||||
"ref": true,
|
|
||||||
"resolveComponent": true,
|
|
||||||
"setActivePinia": true,
|
|
||||||
"setMapStoreSuffix": true,
|
|
||||||
"shallowReactive": true,
|
|
||||||
"shallowReadonly": true,
|
|
||||||
"shallowRef": true,
|
|
||||||
"storeToRefs": true,
|
|
||||||
"toRaw": true,
|
|
||||||
"toRef": true,
|
|
||||||
"toRefs": true,
|
|
||||||
"toValue": true,
|
|
||||||
"triggerRef": true,
|
|
||||||
"unref": true,
|
|
||||||
"useAttrs": true,
|
|
||||||
"useClipboard": true,
|
|
||||||
"useCssModule": true,
|
|
||||||
"useCssVars": true,
|
|
||||||
"useDebounceFn": true,
|
|
||||||
"useId": true,
|
|
||||||
"useLink": true,
|
|
||||||
"useLocalStorage": true,
|
|
||||||
"useModel": true,
|
|
||||||
"useRoute": true,
|
|
||||||
"useRouter": true,
|
|
||||||
"useSlots": true,
|
|
||||||
"useTemplateRef": true,
|
|
||||||
"watch": true,
|
|
||||||
"watchEffect": true,
|
|
||||||
"watchPostEffect": true,
|
|
||||||
"watchSyncEffect": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
15
modeler/.gitattributes
vendored
@@ -1,15 +0,0 @@
|
|||||||
# .gitattributes
|
|
||||||
* text=auto eol=lf
|
|
||||||
*.html text eol=lf
|
|
||||||
*.css text eol=lf
|
|
||||||
*.js text eol=lf
|
|
||||||
*.scss text eol=lf
|
|
||||||
*.hbs text eol=lf
|
|
||||||
*.sh text eol=lf
|
|
||||||
*.md text eol=lf
|
|
||||||
*.json text eol=lf
|
|
||||||
*.yml text eol=lf
|
|
||||||
.browserslistrc text eol=lf
|
|
||||||
.gitignore text eol=lf
|
|
||||||
*.js linguist-detectable=true
|
|
||||||
*.vue linguist-detectable=true
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
/dist/*
|
|
||||||
/docs/*
|
|
||||||
.local
|
|
||||||
.output.js
|
|
||||||
auto-imports.d.ts
|
|
||||||
/node_modules/**
|
|
||||||
|
|
||||||
**/*.svg
|
|
||||||
**/*.sh
|
|
||||||
|
|
||||||
/public/*
|
|
||||||
/tmp/*
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"printWidth": 200,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": false,
|
|
||||||
"semi": true,
|
|
||||||
"vueIndentScriptAndStyle": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"quoteProps": "as-needed",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"trailingComma": "es5",
|
|
||||||
"jsxBracketSameLine": true,
|
|
||||||
"jsxSingleQuote": false,
|
|
||||||
"arrowParens": "always",
|
|
||||||
"insertPragma": false,
|
|
||||||
"requirePragma": false,
|
|
||||||
"proseWrap": "preserve",
|
|
||||||
"htmlWhitespaceSensitivity": "strict",
|
|
||||||
"endOfLine": "lf"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
/dist/*
|
|
||||||
/public/*
|
|
||||||
/docs/*
|
|
||||||
/tmp/*
|
|
||||||
/bin/*
|
|
||||||
/config/*
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
node_modules
|
|
||||||
.git
|
|
||||||
*.log
|
|
||||||
.DS_Store
|
|
||||||
dist
|
|
||||||
.vscode
|
|
||||||
.idea
|
|
||||||
3
modeler/.vscode/extensions.json
vendored
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": ["Vue.volar"]
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Vue 3 + TypeScript + Vite
|
|
||||||
|
|
||||||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
||||||
|
|
||||||
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
FROM grafana/grafana-enterprise:v12.3.1
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN mkdir -p /usr/share/grafana/public/views \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
COPY --chown=grafana:grafana ./views /usr/share/grafana/public/views
|
|
||||||
|
|
||||||
USER grafana
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
||||||
<meta name="viewport" content="width=device-width" />
|
|
||||||
<meta name="theme-color" content="#000" />
|
|
||||||
|
|
||||||
|
|
||||||
<title>[[.AppTitle]] - Error</title>
|
|
||||||
|
|
||||||
<base href="[[.AppSubUrl]]/" />
|
|
||||||
|
|
||||||
[[ if eq .ThemeType "light" ]]
|
|
||||||
<link rel="stylesheet" href="[[.Assets.Light]]" />
|
|
||||||
[[ else ]]
|
|
||||||
<link rel="stylesheet" href="[[.Assets.Dark]]" />
|
|
||||||
[[ end ]]
|
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="public/img/fav32.png" />
|
|
||||||
<link rel="mask-icon" href="public/img/grafana_mask_icon.svg" color="#F05A28" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="theme-[[ .ThemeType ]]">
|
|
||||||
<div class="main-view">
|
|
||||||
<div class="page-container">
|
|
||||||
<div class="page-header">
|
|
||||||
<div class="page-header__inner">
|
|
||||||
<span class="page-header__logo">
|
|
||||||
<i class="page-header__icon fa fa-frown-o"></i>
|
|
||||||
</span>
|
|
||||||
<div class="page-header__info-block">
|
|
||||||
<h1 class="page-header__title">
|
|
||||||
<a class="text-link" href="login">Grafana</a><span> / Server Error</span><span></span>
|
|
||||||
</h1>
|
|
||||||
<div class="page-header__sub-title">Sadly something went wrong</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="page-container page-body ng-scope" style="padding: 2rem">
|
|
||||||
<div class="alert">
|
|
||||||
<div class="alert-icon"><icon name="'exclamation-triangle'"></icon></div>
|
|
||||||
<div class="alert-body">
|
|
||||||
<div class="alert-title">[[.Title]]</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
[[if .ErrorMsg]]
|
|
||||||
<h4 class="page-heading">Error details</h4>
|
|
||||||
<div class="alert-text">
|
|
||||||
<pre>[[.ErrorMsg]]</pre>
|
|
||||||
</div>
|
|
||||||
[[end]]
|
|
||||||
<div style="padding: 2rem 0 0">
|
|
||||||
<p>Check the Grafana server logs for the detailed error message.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,387 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="[[.User.Language]]">
|
|
||||||
<head>
|
|
||||||
[[ if and .CSPEnabled .IsDevelopmentEnv ]]
|
|
||||||
<!-- Cypress overwrites CSP headers in HTTP requests, so this is required for e2e tests-->
|
|
||||||
<meta http-equiv="Content-Security-Policy" content="[[.CSPContent]]"/>
|
|
||||||
[[ end ]]
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
||||||
<meta name="viewport" content="width=device-width" />
|
|
||||||
<meta name="theme-color" content="#000" />
|
|
||||||
|
|
||||||
<title>[[.AppTitle]]</title>
|
|
||||||
|
|
||||||
<base href="[[.AppSubUrl]]/" />
|
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="[[.FavIcon]]" />
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="[[.AppleTouchIcon]]" />
|
|
||||||
<link rel="mask-icon" href="[[.Assets.ContentDeliveryURL]]public/img/grafana_mask_icon.svg" color="#F05A28" />
|
|
||||||
|
|
||||||
[[range $asset := .Assets.CSSFiles]]
|
|
||||||
<link rel="stylesheet" href="[[$asset.FilePath]]" />
|
|
||||||
[[end]]
|
|
||||||
|
|
||||||
<!-- If theme is "system", we inject the stylesheets with javascript further down the page -->
|
|
||||||
[[ if eq .ThemeType "light" ]]
|
|
||||||
<link rel="stylesheet" href="[[.Assets.Light]]" />
|
|
||||||
[[ else if eq .ThemeType "dark" ]]
|
|
||||||
<link rel="stylesheet" href="[[.Assets.Dark]]" />
|
|
||||||
[[ end ]]
|
|
||||||
|
|
||||||
<script nonce="[[.Nonce]]">
|
|
||||||
performance.mark('frontend_boot_css_time_seconds');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
|
||||||
<meta name="msapplication-TileColor" content="#2b5797" />
|
|
||||||
<meta name="msapplication-config" content="public/img/browserconfig.xml" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="theme-[[ .ThemeType ]] [[.AppNameBodyClass]]">
|
|
||||||
<style>
|
|
||||||
.preloader {
|
|
||||||
height: 100%;
|
|
||||||
flex-direction: column;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin: 0 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader__enter {
|
|
||||||
opacity: 0;
|
|
||||||
animation-name: preloader-fade-in;
|
|
||||||
animation-iteration-count: 1;
|
|
||||||
animation-duration: 0.9s;
|
|
||||||
animation-delay: 0.5s;
|
|
||||||
animation-fill-mode: forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader__bounce {
|
|
||||||
text-align: center;
|
|
||||||
animation-name: preloader-bounce;
|
|
||||||
animation-duration: 0.9s;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader__logo {
|
|
||||||
display: inline-block;
|
|
||||||
animation-name: preloader-squash;
|
|
||||||
animation-duration: 0.9s;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
background-image: url('[[.LoadingLogo]]');
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader__text {
|
|
||||||
margin-top: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 14px;
|
|
||||||
font-family: Sans-serif;
|
|
||||||
opacity: 0;
|
|
||||||
animation-name: preloader-fade-in;
|
|
||||||
animation-duration: 0.9s;
|
|
||||||
animation-delay: 0.5s;
|
|
||||||
animation-fill-mode: forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-light .preloader__text {
|
|
||||||
color: #52545c;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-dark .preloader__text {
|
|
||||||
color: #d8d9da;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes preloader-fade-in {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
/*animation-timing-function: linear;*/
|
|
||||||
animation-timing-function: cubic-bezier(0, 0, 0.5, 1);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes preloader-bounce {
|
|
||||||
from,
|
|
||||||
to {
|
|
||||||
transform: translateY(0px);
|
|
||||||
animation-timing-function: cubic-bezier(0.3, 0, 0.1, 1);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
transform: translateY(-50px);
|
|
||||||
animation-timing-function: cubic-bezier(0.9, 0, 0.7, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes preloader-squash {
|
|
||||||
0% {
|
|
||||||
transform: scaleX(1.3) scaleY(0.8);
|
|
||||||
animation-timing-function: cubic-bezier(0.3, 0, 0.1, 1);
|
|
||||||
}
|
|
||||||
15% {
|
|
||||||
transform: scaleX(0.75) scaleY(1.25);
|
|
||||||
animation-timing-function: cubic-bezier(0, 0, 0.7, 0.75);
|
|
||||||
}
|
|
||||||
55% {
|
|
||||||
transform: scaleX(1.05) scaleY(0.95);
|
|
||||||
animation-timing-function: cubic-bezier(0.9, 0, 1, 1);
|
|
||||||
}
|
|
||||||
95% {
|
|
||||||
transform: scaleX(0.75) scaleY(1.25);
|
|
||||||
animation-timing-function: cubic-bezier(0, 0, 0, 1);
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: scaleX(1.3) scaleY(0.8);
|
|
||||||
animation-timing-function: cubic-bezier(0, 0, 0.7, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Fail info */
|
|
||||||
.preloader__text--fail {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* stop logo animation */
|
|
||||||
.preloader--done .preloader__bounce,
|
|
||||||
.preloader--done .preloader__logo {
|
|
||||||
animation-name: none;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader--done .preloader__logo,
|
|
||||||
.preloader--done .preloader__text {
|
|
||||||
display: none;
|
|
||||||
color: #ff5705 !important;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-light .preloader--done .preloader__text {
|
|
||||||
color: #52545c !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader--done .preloader__text--fail {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader--done .preloader__text--fail a {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-light .preloader--done .preloader__text--fail a {
|
|
||||||
color: rgb(31, 98, 224);
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader--done code {
|
|
||||||
white-space: nowrap;
|
|
||||||
padding: 2px 5px;
|
|
||||||
margin: 0px 2px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
background-color: rgb(24, 27, 31);
|
|
||||||
color: rgb(204, 204, 220);
|
|
||||||
border: 1px solid rgba(204, 204, 220, 0.2);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.preloader__error-list li {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
[ng\:cloak],
|
|
||||||
[ng-cloak],
|
|
||||||
.ng-cloak {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="preloader">
|
|
||||||
<div class="preloader__enter">
|
|
||||||
<div class="preloader__bounce">
|
|
||||||
<div class="preloader__logo" aria-live="polite" role="status" aria-label="Loading Grafana"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="preloader__text preloader__text--fail">
|
|
||||||
<main>
|
|
||||||
<h1>If you're seeing this Grafana has failed to load its application files</h1>
|
|
||||||
<ol class="preloader__error-list">
|
|
||||||
<li>This could be caused by your reverse proxy settings.</li>
|
|
||||||
<li>If you host grafana under a subpath make sure your <code>grafana.ini</code> <code>root_url</code> setting
|
|
||||||
includes subpath. If not using a reverse proxy make sure to set <code>serve_from_sub_path</code> to true.</li>
|
|
||||||
<li>If you have a local dev build make sure you build frontend using: <code>yarn start</code>, or
|
|
||||||
<code>yarn build</code>.</li>
|
|
||||||
<li>Sometimes restarting <code>grafana-server</code> can help.</li>
|
|
||||||
<li>Check if you are using a non-supported browser. For more information, refer to the list of
|
|
||||||
<a href="https://grafana.com/docs/grafana/latest/installation/requirements/#supported-web-browsers">
|
|
||||||
supported browsers </a
|
|
||||||
>.</li>
|
|
||||||
</ol>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
<script nonce="[[.Nonce]]">
|
|
||||||
// Check to see if browser is not supported by Grafana
|
|
||||||
// Source file in app/core/utils/browser.ts & tests make edits there and copy compiled typescript here
|
|
||||||
function checkBrowserCompatibility() {
|
|
||||||
var isIE = navigator.userAgent.indexOf('MSIE') > -1;
|
|
||||||
var isEdge = navigator.userAgent.indexOf('Edge/') > -1 || navigator.userAgent.indexOf('Edg/') > -1;
|
|
||||||
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
||||||
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
|
|
||||||
|
|
||||||
/* Check for
|
|
||||||
<= IE11 (Trident 7)
|
|
||||||
Edge <= 16
|
|
||||||
Firefox <= 64
|
|
||||||
Chrome <= 54
|
|
||||||
*/
|
|
||||||
var isEdgeVersion = /Edge\/([0-9.]+)/.exec(navigator.userAgent);
|
|
||||||
|
|
||||||
if (isIE && parseFloat(/Trident\/([0-9.]+)/.exec(navigator.userAgent)[1]) <= 7) {
|
|
||||||
return false;
|
|
||||||
} else if (
|
|
||||||
isEdge &&
|
|
||||||
((isEdgeVersion && parseFloat(isEdgeVersion[1]) <= 16) ||
|
|
||||||
parseFloat(/Edg\/([0-9.]+)/.exec(navigator.userAgent)[1]) <= 16)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
} else if (isFirefox && parseFloat(/Firefox\/([0-9.]+)/.exec(navigator.userAgent)[1]) <= 64) {
|
|
||||||
return false;
|
|
||||||
} else if (isChrome && parseFloat(/Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1]) <= 54) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!checkBrowserCompatibility()) {
|
|
||||||
alert('Your browser is not fully supported, please try newer version.');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="reactRoot"></div>
|
|
||||||
|
|
||||||
<script nonce="[[.Nonce]]">
|
|
||||||
window.grafanaBootData = {
|
|
||||||
user: [[.User]],
|
|
||||||
settings: [[.Settings]],
|
|
||||||
navTree: [[.NavTree]],
|
|
||||||
assets: [[.Assets]]
|
|
||||||
};
|
|
||||||
|
|
||||||
// FEMT index.html uses this, and we want to keep the index.ts the same for both
|
|
||||||
window.__grafana_boot_data_promise = Promise.resolve();
|
|
||||||
|
|
||||||
// Set theme to match system only on startup.
|
|
||||||
// Do not react to changes in system theme after startup.
|
|
||||||
if (window.grafanaBootData.user.theme === "system") {
|
|
||||||
document.body.classList.remove("theme-system");
|
|
||||||
var darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
||||||
var cssLink = document.createElement("link");
|
|
||||||
cssLink.rel = 'stylesheet';
|
|
||||||
|
|
||||||
if (darkQuery.matches) {
|
|
||||||
document.body.classList.add("theme-dark");
|
|
||||||
cssLink.href = window.grafanaBootData.assets.dark;
|
|
||||||
window.grafanaBootData.user.lightTheme = false;
|
|
||||||
} else {
|
|
||||||
document.body.classList.add("theme-light");
|
|
||||||
cssLink.href = window.grafanaBootData.assets.light;
|
|
||||||
window.grafanaBootData.user.lightTheme = true;
|
|
||||||
}
|
|
||||||
document.head.appendChild(cssLink);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.__grafana_load_failed = function() {
|
|
||||||
var preloader = document.getElementsByClassName("preloader");
|
|
||||||
if (preloader.length) {
|
|
||||||
preloader[0].className = "preloader preloader--done";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// In case the js files fails to load the code below will show an info message.
|
|
||||||
window.onload = function() {
|
|
||||||
if (window.__grafana_app_bundle_loaded) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
window.__grafana_load_failed();
|
|
||||||
};
|
|
||||||
|
|
||||||
[[if .Assets.ContentDeliveryURL]]
|
|
||||||
window.public_cdn_path = '[[.Assets.ContentDeliveryURL]]public/build/';
|
|
||||||
[[end]]
|
|
||||||
[[if .Nonce]]
|
|
||||||
window.nonce = '[[.Nonce]]';
|
|
||||||
[[end]]
|
|
||||||
</script>
|
|
||||||
|
|
||||||
[[if .GoogleTagManagerId]]
|
|
||||||
<!-- Google Tag Manager -->
|
|
||||||
<script nonce="[[.Nonce]]">
|
|
||||||
dataLayer = [
|
|
||||||
{
|
|
||||||
IsSignedIn: '[[.User.IsSignedIn]]',
|
|
||||||
Email: '[[.User.Email]]',
|
|
||||||
Name: '[[.User.Name]]',
|
|
||||||
UserId: '[[.User.Id]]',
|
|
||||||
OrgId: '[[.User.OrgId]]',
|
|
||||||
OrgName: '[[.User.OrgName]]',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
</script>
|
|
||||||
<noscript>
|
|
||||||
<iframe
|
|
||||||
src="//www.googletagmanager.com/ns.html?id=[[.GoogleTagManagerId]]"
|
|
||||||
height="0"
|
|
||||||
width="0"
|
|
||||||
style="display: none; visibility: hidden"
|
|
||||||
></iframe>
|
|
||||||
</noscript>
|
|
||||||
<script nonce="[[.Nonce]]">
|
|
||||||
(function (w, d, s, l, i) {
|
|
||||||
w[l] = w[l] || [];
|
|
||||||
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
|
|
||||||
var f = d.getElementsByTagName(s)[0],
|
|
||||||
j = d.createElement(s),
|
|
||||||
dl = l != 'dataLayer' ? '&l=' + l : '';
|
|
||||||
j.async = true;
|
|
||||||
j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl;
|
|
||||||
f.parentNode.insertBefore(j, f);
|
|
||||||
})(window, document, 'script', 'dataLayer', '[[.GoogleTagManagerId]]');
|
|
||||||
</script>
|
|
||||||
<!-- End Google Tag Manager -->
|
|
||||||
[[end]]
|
|
||||||
|
|
||||||
[[if .Settings.FeatureToggles.assetSriChecks ]]
|
|
||||||
[[range $asset := .Assets.JSFiles]]
|
|
||||||
<script
|
|
||||||
nonce="[[$.Nonce]]"
|
|
||||||
src="[[$asset.FilePath]]"
|
|
||||||
integrity="[[$asset.Integrity]]"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
type="text/javascript"
|
|
||||||
defer
|
|
||||||
></script>
|
|
||||||
[[end]]
|
|
||||||
[[else]]
|
|
||||||
[[range $asset := .Assets.JSFiles]]
|
|
||||||
<script
|
|
||||||
nonce="[[$.Nonce]]"
|
|
||||||
src="[[$asset.FilePath]]"
|
|
||||||
type="text/javascript"
|
|
||||||
defer
|
|
||||||
></script>
|
|
||||||
[[end]]
|
|
||||||
[[end]]
|
|
||||||
|
|
||||||
<script nonce="[[.Nonce]]">
|
|
||||||
performance.mark('frontend_boot_js_done_time_seconds');
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
[[ if and .CSPEnabled .IsDevelopmentEnv ]]
|
|
||||||
<!-- Cypress overwrites CSP headers in HTTP requests, so this is required for e2e tests-->
|
|
||||||
<meta http-equiv="Content-Security-Policy" content="[[.CSPContent]]" />
|
|
||||||
[[ end ]]
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
|
||||||
<meta name="viewport" content="width=device-width" />
|
|
||||||
<meta name="theme-color" content="#000" />
|
|
||||||
|
|
||||||
<title>Grafana API Reference</title>
|
|
||||||
|
|
||||||
[[range $asset := .Assets.SwaggerCSSFiles]]
|
|
||||||
<link rel="stylesheet" href="[[$asset.FilePath]]" />
|
|
||||||
[[end]]
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="[[.Assets.Light]]" />
|
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="[[.FavIcon]]" />
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="[[.AppleTouchIcon]]" />
|
|
||||||
<link rel="mask-icon" href="[[.Assets.ContentDeliveryURL]]public/img/grafana_mask_icon.svg" color="#F05A28" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<noscript> You need to enable JavaScript to run this app. </noscript>
|
|
||||||
<script nonce="[[$.Nonce]]">
|
|
||||||
[[if .Assets.ContentDeliveryURL]]
|
|
||||||
window.public_cdn_path = '[[.Assets.ContentDeliveryURL]]public/build/';
|
|
||||||
[[end]]
|
|
||||||
</script>
|
|
||||||
<div id="root"></div>
|
|
||||||
[[range $asset := .Assets.Swagger]]
|
|
||||||
<script nonce="[[$.Nonce]]" src="[[$asset.FilePath]]" type="text/javascript"></script>
|
|
||||||
[[end]]
|
|
||||||
<script></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name monitor.kernelstudio.com;
|
|
||||||
include server/error.conf;
|
|
||||||
access_log /var/log/nginx/monitor.kernelstudio.com.access.log access;
|
|
||||||
error_log /var/log/nginx/monitor.kernelstudio.com.error.log debug; # 临时开启debug,排查WS错误
|
|
||||||
|
|
||||||
# 核心:屏蔽后端 X-Frame-Options + 统一设置
|
|
||||||
proxy_hide_header X-Frame-Options;
|
|
||||||
add_header X-Frame-Options "sameorigin" always;
|
|
||||||
|
|
||||||
# 全局跨域头(开发环境)
|
|
||||||
add_header Access-Control-Allow-Origin "*" always;
|
|
||||||
add_header Access-Control-Allow-Methods "GET,POST,PUT,DELETE,OPTIONS" always;
|
|
||||||
add_header Access-Control-Allow-Headers "Content-Type,Authorization,X-Grafana-Org-Id,Upgrade,Connection" always;
|
|
||||||
# 允许跨域预检请求(OPTIONS)
|
|
||||||
if ($request_method = OPTIONS) {
|
|
||||||
return 204;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 全局 proxy 基础配置
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_connect_timeout 60s;
|
|
||||||
proxy_set_header X-Host $host;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-Port $server_port;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
|
|
||||||
# ========== 最高优先级:Grafana Live WS(覆盖所有带参数的WS请求) ==========
|
|
||||||
# 正则匹配 /api/live/ws 及后续所有参数/路径
|
|
||||||
location ~ ^/api/live/ws {
|
|
||||||
# WebSocket 必须的头部
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
|
|
||||||
# 保持其他头部传递
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
|
|
||||||
# WebSocket 超时设置
|
|
||||||
proxy_read_timeout 86400;
|
|
||||||
proxy_connect_timeout 86400;
|
|
||||||
proxy_send_timeout 86400;
|
|
||||||
|
|
||||||
# 禁用缓冲
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_cache off;
|
|
||||||
|
|
||||||
proxy_pass http://192.168.1.200:3000;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ========== 次优先级:Grafana 其他 API/页面路径 ==========
|
|
||||||
# 1. 匹配 /apis/(带s)开头的所有路径
|
|
||||||
location ~ ^/apis/ {
|
|
||||||
proxy_next_upstream http_500 http_502 http_504 error timeout invalid_header;
|
|
||||||
proxy_read_timeout 300s;
|
|
||||||
proxy_pass http://192.168.1.200:3000;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 2. 匹配 /api/ 下的 Grafana 核心 API(排除 live/ws,已单独匹配)
|
|
||||||
location ~ ^/api/(user|frontend-metrics|datasources|ds|dashboards|prometheus|plugins|features\.grafana\.ap|public)($|/) {
|
|
||||||
proxy_next_upstream http_500 http_502 http_504 error timeout invalid_header;
|
|
||||||
proxy_read_timeout 300s;
|
|
||||||
proxy_pass http://192.168.1.200:3000;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 3. 匹配 Grafana 页面路径
|
|
||||||
location ~ ^/(d|login|public|avatar)($|/) {
|
|
||||||
proxy_next_upstream http_500 http_502 http_504 error timeout invalid_header;
|
|
||||||
proxy_read_timeout 300s;
|
|
||||||
proxy_pass http://192.168.1.200:3000;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ========== Vite 相关路径(最后匹配) ==========
|
|
||||||
# 1. Vite HMR 的 WebSocket 路径
|
|
||||||
location /ws {
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
proxy_read_timeout 86400s;
|
|
||||||
proxy_pass http://192.168.1.200:8888;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 2. Vite 开发环境兜底
|
|
||||||
location / {
|
|
||||||
include custom/api.access.conf;
|
|
||||||
proxy_next_upstream http_500 http_502 http_504 error timeout invalid_header;
|
|
||||||
# 禁用缓存
|
|
||||||
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
|
||||||
add_header Pragma "no-cache" always;
|
|
||||||
add_header Expires "0" always;
|
|
||||||
proxy_pass http://192.168.1.200:8888;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 660 KiB |
|
Before Width: | Height: | Size: 634 KiB |
|
Before Width: | Height: | Size: 698 KiB |
|
Before Width: | Height: | Size: 718 KiB |
|
Before Width: | Height: | Size: 667 KiB |
|
Before Width: | Height: | Size: 622 KiB |
|
Before Width: | Height: | Size: 625 KiB |
|
Before Width: | Height: | Size: 647 KiB |
|
Before Width: | Height: | Size: 650 KiB |
|
Before Width: | Height: | Size: 605 KiB |
|
Before Width: | Height: | Size: 643 KiB |
|
Before Width: | Height: | Size: 696 KiB |
|
Before Width: | Height: | Size: 746 KiB |
|
Before Width: | Height: | Size: 689 KiB |
|
Before Width: | Height: | Size: 623 KiB |
|
Before Width: | Height: | Size: 695 KiB |
|
Before Width: | Height: | Size: 633 KiB |
@@ -1,13 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>博弈竞赛环境</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app" class="w-full h-full"></div>
|
|
||||||
<script type="module" src="/src/main.ts"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es6",
|
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"@/*": [
|
|
||||||
"src/*"
|
|
||||||
],
|
|
||||||
"@/views/*": [
|
|
||||||
"src/views/*"
|
|
||||||
],
|
|
||||||
"@/components/*": [
|
|
||||||
"src/components/*"
|
|
||||||
],
|
|
||||||
"@/assets/*": [
|
|
||||||
"src/assets/*"
|
|
||||||
],
|
|
||||||
"@/config/*": [
|
|
||||||
"src/config/*"
|
|
||||||
],
|
|
||||||
"@/core/*": [
|
|
||||||
"src/core/*"
|
|
||||||
],
|
|
||||||
"@/api/*": [
|
|
||||||
"src/api/*"
|
|
||||||
],
|
|
||||||
"@/stores/*": [
|
|
||||||
"src/stores/*"
|
|
||||||
],
|
|
||||||
"@/utils/*": [
|
|
||||||
"src/utils/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"dist",
|
|
||||||
"docs",
|
|
||||||
"tmp",
|
|
||||||
"config",
|
|
||||||
"public"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/**/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,179 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the kernelstudio package.
|
|
||||||
*
|
|
||||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
import {MockMethod} from 'vite-plugin-mock';
|
|
||||||
import {createResponse} from './core';
|
|
||||||
|
|
||||||
const statusOption = {
|
|
||||||
type: 'select',
|
|
||||||
defaults: 0,
|
|
||||||
name: 'status',
|
|
||||||
tips: '状态',
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
name: '默认',
|
|
||||||
value: 'default',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '运行中',
|
|
||||||
value: 'running',
|
|
||||||
color: 'blue',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已完成',
|
|
||||||
value: 'finished',
|
|
||||||
color: 'teal'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '错误',
|
|
||||||
value: 'error',
|
|
||||||
color: 'red',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
const behaviors = [
|
|
||||||
{
|
|
||||||
id: 'behavior_001',
|
|
||||||
name: '行为树1',
|
|
||||||
desc: '行为树1说明',
|
|
||||||
status: null,
|
|
||||||
options: {},
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// id: '5a0c4b08-0b02-44f3-8918-79c6f9ab22fa',
|
|
||||||
// type: 'startEvent',
|
|
||||||
// name: '开始',
|
|
||||||
// description: '',
|
|
||||||
// width: 160,
|
|
||||||
// height: 40,
|
|
||||||
// position: {
|
|
||||||
// x: 460,
|
|
||||||
// y: 120,
|
|
||||||
// },
|
|
||||||
// data: {
|
|
||||||
// status: 'default',
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: 'ec8741db-9580-44ab-8a58-8c731bf1faad',
|
|
||||||
// type: 'sequenceFlow',
|
|
||||||
// name: null,
|
|
||||||
// description: null,
|
|
||||||
// source: '5a0c4b08-0b02-44f3-8918-79c6f9ab22fa',
|
|
||||||
// target: '7422aefc-7781-457a-b910-783f73ac0ac5',
|
|
||||||
// data: {
|
|
||||||
// status: 'default',
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// id: '7422aefc-7781-457a-b910-783f73ac0ac5',
|
|
||||||
// type: 'task',
|
|
||||||
// name: '任务',
|
|
||||||
// description: '',
|
|
||||||
// width: 160,
|
|
||||||
// height: 40,
|
|
||||||
// position: {
|
|
||||||
// x: 460,
|
|
||||||
// y: 120,
|
|
||||||
// },
|
|
||||||
// data: {
|
|
||||||
// status: 'default',
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
const definitions = [
|
|
||||||
{
|
|
||||||
type: 'sequenceFlow',
|
|
||||||
label: null,
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
type: 'input',
|
|
||||||
defaults: null,
|
|
||||||
name: 'label',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'startEvent',
|
|
||||||
label: '开始',
|
|
||||||
desc: '行为树的开始节点,每个行为树仅允许一个开始节点',
|
|
||||||
options: [
|
|
||||||
statusOption
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'task',
|
|
||||||
label: '任务节点',
|
|
||||||
desc: '执行特定任务',
|
|
||||||
options: [
|
|
||||||
statusOption,
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
defaults: 0,
|
|
||||||
name: 'counter',
|
|
||||||
tips: '统计数量'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'parallelGateway',
|
|
||||||
label: '并行网关',
|
|
||||||
desc: '并行执行子节点',
|
|
||||||
options: [
|
|
||||||
statusOption,
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
defaults: 0,
|
|
||||||
name: 'counter',
|
|
||||||
tips: '统计数量'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'exclusiveGateway',
|
|
||||||
label: '排他网关',
|
|
||||||
desc: '选择满足条件的一个子节点执行',
|
|
||||||
options: [
|
|
||||||
statusOption,
|
|
||||||
{
|
|
||||||
type: 'number',
|
|
||||||
defaults: 0,
|
|
||||||
name: 'counter',
|
|
||||||
tips: '统计数量'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
url: '/api/behavior/trees',
|
|
||||||
method: 'get',
|
|
||||||
response: () => {
|
|
||||||
return createResponse(behaviors)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
url: '/api/behavior/trees',
|
|
||||||
method: 'post',
|
|
||||||
response: ({body}) => {
|
|
||||||
let value = behaviors.filter((b) => b.id == body?.id)
|
|
||||||
if (value && value.length > 0) {
|
|
||||||
value[0] = Object.assign(value[0], body)
|
|
||||||
} else {
|
|
||||||
behaviors.push(body)
|
|
||||||
}
|
|
||||||
return createResponse(behaviors)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
] as MockMethod[];
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the kernelstudio package.
|
|
||||||
*
|
|
||||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const createResponse = (result: any,success: boolean = true, message: String = null)=> {
|
|
||||||
return {
|
|
||||||
success: success,
|
|
||||||
message: message,
|
|
||||||
result: result,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the kernelstudio package.
|
|
||||||
*
|
|
||||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
import {MockMethod} from 'vite-plugin-mock';
|
|
||||||
import {createResponse} from './core';
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
url: '/api/finder/browser',
|
|
||||||
method: 'post',
|
|
||||||
response: () => {
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
message: null,
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
name: 'home',
|
|
||||||
directory: true,
|
|
||||||
path: '/home',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'users',
|
|
||||||
directory: true,
|
|
||||||
path: '/users',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'usr',
|
|
||||||
directory: true,
|
|
||||||
path: '/usr',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'opt',
|
|
||||||
directory: true,
|
|
||||||
path: '/opt',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'var',
|
|
||||||
directory: true,
|
|
||||||
path: '/var',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
name: 'lib',
|
|
||||||
directory: true,
|
|
||||||
path: '/lib',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
] as MockMethod[];
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the kernelstudio package.
|
|
||||||
*
|
|
||||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
import {MockMethod} from 'vite-plugin-mock';
|
|
||||||
import {createResponse} from './core';
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
url: '/api/samples',
|
|
||||||
method: 'get',
|
|
||||||
response: () => {
|
|
||||||
return createResponse( {
|
|
||||||
name: 'vben',
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
|
||||||
] as MockMethod[];
|
|
||||||
6315
modeler/package-lock.json
generated
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "modeler",
|
|
||||||
"private": true,
|
|
||||||
"version": "0.0.0",
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vite",
|
|
||||||
"build": "vue-tsc -b && vite build",
|
|
||||||
"preview": "vite preview"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@antv/x6": "^3.1.2",
|
|
||||||
"@antv/x6-vue-shape": "^3.0.2",
|
|
||||||
"ant-design-vue": "^4.2.6",
|
|
||||||
"axios": "^1.13.2",
|
|
||||||
"echarts": "^6.0.0",
|
|
||||||
"js-cookie": "^3.0.5",
|
|
||||||
"pinia": "^3.0.4",
|
|
||||||
"vue": "^3.5.24",
|
|
||||||
"vue-draggable-next": "^2.3.0",
|
|
||||||
"vue-router": "^4.6.4",
|
|
||||||
"vuedraggable": "^2.24.3"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
||||||
"@tailwindcss/postcss": "^4.1.18",
|
|
||||||
"@tailwindcss/vite": "^4.1.18",
|
|
||||||
"@types/js-cookie": "^3.0.6",
|
|
||||||
"@types/node": "^24.10.1",
|
|
||||||
"@vitejs/plugin-vue": "^6.0.3",
|
|
||||||
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
|
||||||
"@vue/tsconfig": "^0.8.1",
|
|
||||||
"autoprefixer": "^10.4.22",
|
|
||||||
"less": "^4.4.2",
|
|
||||||
"mockjs": "^1.1.0",
|
|
||||||
"postcss-selector-parser": "^7.1.1",
|
|
||||||
"tailwindcss": "^4.1.18",
|
|
||||||
"typescript": "~5.9.3",
|
|
||||||
"unplugin-auto-import": "^20.3.0",
|
|
||||||
"unplugin-vue-components": "^30.0.0",
|
|
||||||
"vite": "^7.2.4",
|
|
||||||
"vite-plugin-dts": "^4.5.4",
|
|
||||||
"vite-plugin-mock": "^3.0.2",
|
|
||||||
"vitest": "^4.0.15",
|
|
||||||
"vue-tsc": "^3.1.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the kernelstudio package.
|
|
||||||
*
|
|
||||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export default {
|
|
||||||
plugins: {
|
|
||||||
'@tailwindcss/postcss': {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the kernelstudio package.
|
|
||||||
*
|
|
||||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE file
|
|
||||||
* that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
"printWidth": 200,
|
|
||||||
"tabWidth": 2,
|
|
||||||
"useTabs": false,
|
|
||||||
"semi": true,
|
|
||||||
"vueIndentScriptAndStyle": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"quoteProps": "as-needed",
|
|
||||||
"bracketSpacing": true,
|
|
||||||
"trailingComma": "es5",
|
|
||||||
"jsxBracketSameLine": true,
|
|
||||||
"jsxSingleQuote": false,
|
|
||||||
"arrowParens": "always",
|
|
||||||
"insertPragma": false,
|
|
||||||
"requirePragma": false,
|
|
||||||
"proseWrap": "preserve",
|
|
||||||
"htmlWhitespaceSensitivity": "strict",
|
|
||||||
"endOfLine": "lf"
|
|
||||||
};
|
|
||||||