优化规则代码,行为树的pagelist请求添加场景id与平台id条件
This commit is contained in:
@@ -28,7 +28,7 @@ public class RuleController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IRuleConfigService ruleConfigService;
|
private IRuleConfigService ruleConfigService;
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:rule:list')")
|
/*@PreAuthorize("@ss.hasPermi('system:rule:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询规则列表")
|
@ApiOperation("查询规则列表")
|
||||||
public TableDataInfo list(Rule rule) {
|
public TableDataInfo list(Rule rule) {
|
||||||
@@ -66,7 +66,7 @@ public class RuleController extends BaseController {
|
|||||||
@ApiOperation("删除规则")
|
@ApiOperation("删除规则")
|
||||||
public AjaxResult remove(@PathVariable Integer[] ids) {
|
public AjaxResult remove(@PathVariable Integer[] ids) {
|
||||||
return toAjax(ruleService.deleteRuleByIds(ids));
|
return toAjax(ruleService.deleteRuleByIds(ids));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@PreAuthorize("@ss.hasPermi('system:rule:list')")
|
@PreAuthorize("@ss.hasPermi('system:rule:list')")
|
||||||
@GetMapping("/config/list")
|
@GetMapping("/config/list")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ spring:
|
|||||||
master:
|
master:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/autosolution_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://127.0.0.1:3306/autosolution_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: 1234
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|||||||
@@ -23,9 +23,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<sql id="selectBehaviortreeVo">
|
<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>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectBehaviortreeList" parameterType="Behaviortree" resultMap="BehaviortreeResult">
|
<select id="selectBehaviortreeList" parameterType="Behaviortree" resultMap="BehaviortreeResult">
|
||||||
<include refid="selectBehaviortreeVo"/>
|
<include refid="selectBehaviortreeVo"/>
|
||||||
<where>
|
<where>
|
||||||
@@ -35,6 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="updatedAt != null "> and updated_at = #{updatedAt}</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="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="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>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ function Map buildParam(){
|
|||||||
param.put("missileScore", 1);
|
param.put("missileScore", 1);
|
||||||
|
|
||||||
// ===================== 目标分配参数(写入 Tasks.task.execute) =====================
|
// ===================== 目标分配参数(写入 Tasks.task.execute) =====================
|
||||||
// executeTypeDefault:生成 execute[0] 的类型字段
|
// executeTypeDefault:生成 execute[0] 的类型字段 取值:strike_test/assault
|
||||||
param.put("executeTypeDefault", "assault");
|
param.put("executeTypeDefault", "assault");
|
||||||
// targetPickMode:roundRobin(稳定轮询) / random(伪随机但同输入稳定)
|
// targetPickMode:roundRobin(稳定轮询) / random(伪随机但同输入稳定)
|
||||||
param.put("targetPickMode", "roundRobin");
|
param.put("targetPickMode", "roundRobin");
|
||||||
|
|||||||
Reference in New Issue
Block a user