根据场景id获取总指挥的行为树的原数据

This commit is contained in:
MHW
2026-04-15 09:38:15 +08:00
parent 3ae6a693e1
commit f9eb10c783
6 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package com.solution.system.domain;
import lombok.Data;
import java.time.LocalDateTime;
/**
* 收集数据用来生成总指挥官
*/
@Data
public class PlatformChiefCommander {
/**
* Primary Key 主键ID自增
*/
private Integer id;
/**
* Create Time 创建时间
*/
private LocalDateTime createTime;
/**
* 名称
*/
private String name;
/**
* 时间
*/
private Integer time;
/**
* 指令
*/
private String command;
/**
* 下属指挥官
*/
private String subordinateCommander;
/**
* 场景ID
*/
private Integer scenarioId;
}

View File

@@ -3,6 +3,7 @@ package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Behaviortree;
import com.solution.system.domain.PlatformChiefCommander;
/**
* 行为树主Mapper接口
@@ -62,4 +63,11 @@ public interface BehaviortreeMapper
* @return 结果
*/
public int deleteBehaviortreeByIds(Long[] ids);
/**
* 根据场景id获取总指挥的行为树的原数据
* @param scenarioId
* @return
*/
List<PlatformChiefCommander> getCommander(Integer scenarioId);
}

View File

@@ -3,6 +3,7 @@ package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Behaviortree;
import com.solution.system.domain.PlatformChiefCommander;
/**
* 行为树主Service接口
@@ -69,4 +70,11 @@ public interface IBehaviortreeService
* @return
*/
List<String> getUnderling(Integer treeId);
/**
* 根据场景id获取总指挥的行为树的原数据
* @param scenarioId
* @return
*/
List<PlatformChiefCommander> getCommander(Integer scenarioId);
}

View File

@@ -5,6 +5,7 @@ import java.util.List;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.solution.common.constant.ExceptionConstants;
import com.solution.system.domain.PlatformChiefCommander;
import com.solution.system.domain.PlatformTree;
import com.solution.system.mapper.PlatformCommunicationMapper;
import com.solution.system.mapper.PlatformMapper;
@@ -135,4 +136,14 @@ public class BehaviortreeServiceImpl implements IBehaviortreeService
}
return underlingChineseName;
}
/**
* 根据场景id获取总指挥的行为树的原数据
* @param scenarioId
* @return
*/
@Override
public List<PlatformChiefCommander> getCommander(Integer scenarioId) {
return behaviortreeMapper.getCommander(scenarioId);
}
}