UPDATE: fk
This commit is contained in:
@@ -32,7 +32,7 @@ import com.solution.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@Api("行为树管理")
|
||||
@RestController
|
||||
@RequestMapping("/system/behaviortree")
|
||||
@RequestMapping("/api/system/behaviortree")
|
||||
public class BehaviortreeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.solution.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@Api("节点连接管理")
|
||||
@RestController
|
||||
@RequestMapping("/system/nodeconnection")
|
||||
@RequestMapping("/api/system/nodeconnection")
|
||||
public class NodeconnectionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.solution.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@Api("节点参数管理")
|
||||
@RestController
|
||||
@RequestMapping("/system/nodeparameter")
|
||||
@RequestMapping("/api/system/nodeparameter")
|
||||
public class NodeparameterController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
|
||||
@@ -14,6 +14,7 @@ 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.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@@ -39,7 +40,7 @@ import com.solution.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@Api("节点模板管理")
|
||||
@RestController
|
||||
@RequestMapping("/system/nodetemplate")
|
||||
@RequestMapping("/api/system/nodetemplate")
|
||||
public class NodetemplateController extends BaseController {
|
||||
@Autowired
|
||||
private INodetemplateService nodetemplateService;
|
||||
@@ -58,32 +59,33 @@ public class NodetemplateController extends BaseController {
|
||||
@ApiOperation("节点模板列表")
|
||||
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
|
||||
@GetMapping("/listAll")
|
||||
public R<List<NodetemplateVO>> listAll() {
|
||||
public R<List<Nodetemplate>> 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);
|
||||
// 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());
|
||||
// dto.setTempleteType(template.getTempleteType());
|
||||
// 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(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.solution.common.core.page.TableDataInfo;
|
||||
* @date 2026-02-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/templateparameterdef")
|
||||
@RequestMapping("/api/system/templateparameterdef")
|
||||
public class TemplateparameterdefController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
|
||||
@@ -48,7 +48,7 @@ import com.solution.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@Api("行为树实例节点管理")
|
||||
@RestController
|
||||
@RequestMapping("/system/treenodeinstance")
|
||||
@RequestMapping("/api/system/treenodeinstance")
|
||||
public class TreenodeinstanceController extends BaseController {
|
||||
@Autowired
|
||||
private ITreenodeinstanceService treenodeinstanceService;
|
||||
|
||||
Reference in New Issue
Block a user