feat(behaviour): 添加行为树系统核心功能模块
- 创建行为树主对象实体类Behaviortree,包含ID、名称、描述、创建时间、更新时间、英文名和XML内容字段 - 实现行为树控制器BehaviortreeController,提供增删改查和导出功能接口 - 开发行为树数据访问层,包括Mapper接口和MyBatis XML映射文件 - 构建行为树服务层接口及实现类,封装业务逻辑处理 - 添加节点连接、节点参数、节点模板、模板参数定义和行为树实例节点等相关实体和服务接口 - 实现节点连接管理功能,支持父子节点关系建立和执行顺序配置 - 提供完整的CRUD操作和权限控制,集成Excel导出功能
This commit is contained in:
@@ -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.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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/behaviortree")
|
||||
public class BehaviortreeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBehaviortreeService behaviortreeService;
|
||||
|
||||
/**
|
||||
* 查询行为树主列表
|
||||
*/
|
||||
@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, "行为树主数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行为树主详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:behaviortree:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(behaviortreeService.selectBehaviortreeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行为树主
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:behaviortree:add')")
|
||||
@Log(title = "行为树主", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Behaviortree behaviortree)
|
||||
{
|
||||
return toAjax(behaviortreeService.insertBehaviortree(behaviortree));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改行为树主
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:behaviortree:edit')")
|
||||
@Log(title = "行为树主", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Behaviortree behaviortree)
|
||||
{
|
||||
return toAjax(behaviortreeService.updateBehaviortree(behaviortree));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行为树主
|
||||
*/
|
||||
@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,105 @@
|
||||
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 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
|
||||
*/
|
||||
@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, "节点连接数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取节点连接详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:nodeconnection:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(nodeconnectionService.selectNodeconnectionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点连接
|
||||
*/
|
||||
@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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除节点连接
|
||||
*/
|
||||
@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,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.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
|
||||
*/
|
||||
@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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点参数
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:nodeparameter:add')")
|
||||
@Log(title = "节点参数", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Nodeparameter nodeparameter)
|
||||
{
|
||||
return toAjax(nodeparameterService.insertNodeparameter(nodeparameter));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改节点参数
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:nodeparameter:edit')")
|
||||
@Log(title = "节点参数", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Nodeparameter nodeparameter)
|
||||
{
|
||||
return toAjax(nodeparameterService.updateNodeparameter(nodeparameter));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除节点参数
|
||||
*/
|
||||
@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,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.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
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出节点模板列表
|
||||
*/
|
||||
@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,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.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
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/treenodeinstance")
|
||||
public class TreenodeinstanceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITreenodeinstanceService treenodeinstanceService;
|
||||
|
||||
/**
|
||||
* 查询行为树实例节点列表
|
||||
*/
|
||||
@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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增行为树实例节点
|
||||
*/
|
||||
@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));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除行为树实例节点
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:remove')")
|
||||
@Log(title = "行为树实例节点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(treenodeinstanceService.deleteTreenodeinstanceByIds(ids));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user