火力规则:返回平台以及组件
This commit is contained in:
@@ -70,6 +70,12 @@
|
||||
<groupId>com.solution</groupId>
|
||||
<artifactId>solution-algo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.solution</groupId>
|
||||
<artifactId>solution-rule</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.solution.web.controller.rule;
|
||||
|
||||
import com.solution.common.core.controller.BaseController;
|
||||
import com.solution.common.core.domain.AjaxResult;
|
||||
import com.solution.rule.domain.dto.RequestDTO;
|
||||
import com.solution.rule.domain.dto.WeaponModelDTO;
|
||||
import com.solution.rule.domain.vo.WeaponModelVO;
|
||||
import com.solution.rule.service.RuleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Api("火力规则")
|
||||
@RestController
|
||||
@RequestMapping("/api/system/firerule")
|
||||
public class RuleController extends BaseController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private RuleService ruleService;
|
||||
|
||||
|
||||
/**
|
||||
* 开始执行规则匹配
|
||||
* @param sceneType 场景参数
|
||||
* @param weaponModelDTO 敌方参数
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/start")
|
||||
@ApiOperation("开始执行规则匹配")
|
||||
public AjaxResult execute(Integer sceneType, WeaponModelDTO weaponModelDTO){
|
||||
return success(ruleService.execute(sceneType,weaponModelDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有武器平台和组件
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/weapon")
|
||||
@ApiOperation("获取所有武器平台和组件")
|
||||
public AjaxResult getPlatformComponentNames(){
|
||||
return success(ruleService.getPlatformComponentNames());
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,11 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://192.168.166.71:3306/behaviortreedb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://192.168.166.71:3306/behaviortreedb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/autosolution_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: 123456
|
||||
# password: 123456
|
||||
password: 1234
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
@@ -67,13 +67,15 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: 192.168.166.71
|
||||
# host: 192.168.166.71
|
||||
host: 127.0.0.1
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password:
|
||||
# password:
|
||||
password: 123456
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@@ -104,6 +106,8 @@ mybatis:
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
|
||||
Reference in New Issue
Block a user