优化规则代码,行为树的pagelist请求添加场景id与平台id条件

This commit is contained in:
MHW
2026-04-15 13:54:09 +08:00
parent 44ff489c08
commit a67e3e42ba
4 changed files with 9 additions and 5 deletions

View File

@@ -28,7 +28,7 @@ public class RuleController extends BaseController {
@Autowired
private IRuleConfigService ruleConfigService;
@PreAuthorize("@ss.hasPermi('system:rule:list')")
/*@PreAuthorize("@ss.hasPermi('system:rule:list')")
@GetMapping("/list")
@ApiOperation("查询规则列表")
public TableDataInfo list(Rule rule) {
@@ -66,7 +66,7 @@ public class RuleController extends BaseController {
@ApiOperation("删除规则")
public AjaxResult remove(@PathVariable Integer[] ids) {
return toAjax(ruleService.deleteRuleByIds(ids));
}
}*/
@PreAuthorize("@ss.hasPermi('system:rule:list')")
@GetMapping("/config/list")

View File

@@ -8,7 +8,7 @@ spring:
master:
url: jdbc:mysql://127.0.0.1:3306/autosolution_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
password: 1234
# 从库数据源
slave:
# 从数据源开关/默认关闭

View File

@@ -23,9 +23,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<sql id="selectBehaviortreeVo">
select id, name, description, created_at, updated_at, english_name, xml_content from behaviortree
select id, name, description, created_at, updated_at, english_name, xml_content, platform_id, scenario_id from behaviortree
</sql>
<select id="selectBehaviortreeList" parameterType="Behaviortree" resultMap="BehaviortreeResult">
<include refid="selectBehaviortreeVo"/>
<where>
@@ -35,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="xmlContent != null and xmlContent != ''"> and xml_content = #{xmlContent}</if>
<if test="platformId != null">platform_id = #{platformId}</if>
<if test="scenarioId != null">scenario_id = #{scenarioId}</if>
</where>
</select>

View File

@@ -79,7 +79,7 @@ function Map buildParam(){
param.put("missileScore", 1);
// ===================== 目标分配参数(写入 Tasks.task.execute =====================
// executeTypeDefault生成 execute[0] 的类型字段
// executeTypeDefault生成 execute[0] 的类型字段 取值strike_test/assault
param.put("executeTypeDefault", "assault");
// targetPickModeroundRobin(稳定轮询) / random(伪随机但同输入稳定)
param.put("targetPickMode", "roundRobin");