mirror of
https://gitee.com/freshday/radar.git
synced 2026-03-22 04:37:16 +08:00
9
pom.xml
9
pom.xml
@@ -34,7 +34,7 @@
|
||||
<springboot.version>2.2.5.RELEASE</springboot.version>
|
||||
<tensorflow.version>1.12.0</tensorflow.version>
|
||||
<es.version>7.6.1</es.version>
|
||||
<mapstruct.version>1.3.1.Final</mapstruct.version>
|
||||
<mapstruct.version>1.4.1.Final</mapstruct.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -248,12 +248,7 @@
|
||||
<!-- MapStruct START -->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
<!-- MapStruct end -->
|
||||
|
||||
@@ -31,7 +31,7 @@ sys:
|
||||
conf:
|
||||
app: admin # admin 或者 engine, 根据启动的项目名称进行选择
|
||||
entity-duplicate-insert: false # 事件是否允许重复插入
|
||||
mongo-restore-days: 93 # 事件保存时间,默认3个月
|
||||
mongo-restore-days: 3650 # 事件保存时间,默认3个月
|
||||
workdir: d:/radar # 工作目录
|
||||
server:
|
||||
port: 6580
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>风控引擎管理平台</title> <link rel="shortcut icon" href="/images/anquan.png"> <!--[if lt IE 10]>
|
||||
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.5.7/es5-shim.min.js,es5-shim/4.5.7/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
|
||||
<![endif]--> <link href="./index.7269f78c-1.css" rel="stylesheet"><link href="./index.7269f78c-2.css" rel="stylesheet"><link href="./index.7269f78c-3.css" rel="stylesheet"></head> <body> <div id="react-content"></div> <script type="text/javascript" src="./main.7269f78c.js"></script></body> </html>
|
||||
<![endif]--> <link href="./index.3bb53ece-1.css" rel="stylesheet"><link href="./index.3bb53ece-2.css" rel="stylesheet"><link href="./index.3bb53ece-3.css" rel="stylesheet"></head> <body> <div id="react-content"></div> <script type="text/javascript" src="./main.3bb53ece.js"></script></body> </html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -30,11 +30,7 @@
|
||||
<!-- MapStruct START -->
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
</dependency>
|
||||
<!-- MapStruct end -->
|
||||
</dependencies>
|
||||
@@ -45,6 +41,19 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source> <!-- depending on your project -->
|
||||
<target>${java.version}</target> <!-- depending on your project -->
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
<!-- other annotation processors -->
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.mapstruct.Mapping;
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface AbstractionMapping extends BaseMapping<AbstractionPO, AbstractionVO> {
|
||||
|
||||
@Mapping(target = "dataCollectionNames", source = "")
|
||||
@Mapping(target = "dataCollectionNames", ignore = true)
|
||||
@Mapping(target = "ruleDefinition", expression = "java(com.pgmmers.radar.util.JsonUtils.getJsonNode(var1.getRuleDefinition()))")
|
||||
@Override
|
||||
AbstractionVO sourceToTarget(AbstractionPO var1);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DataListRecordServiceImpl implements DataListRecordService,
|
||||
Map<String, String> dataListRecords = (Map<String, String>) listRecordMap
|
||||
.get(dataListVO.getName());
|
||||
String opt = record.getOpt();
|
||||
if (opt.equals("delete")) {
|
||||
if (("delete").equals(opt)) {
|
||||
dataListRecords.remove(record.getDataRecord());
|
||||
} else {
|
||||
dataListRecords.put(record.getDataRecord(), "");
|
||||
|
||||
@@ -177,12 +177,19 @@ public class DataListsServiceImpl implements DataListsService, SubscribeHandle {
|
||||
@Override
|
||||
public CommonResult saveRecord(DataListRecordVO dataListRecord) {
|
||||
CommonResult result = new CommonResult();
|
||||
DataListsVO dataListVO = dataListDal.get(dataListRecord.getDataListId());
|
||||
if (dataListRecord.getId() != null) {
|
||||
// 通知engine 先删除已经存在的,再update.
|
||||
DataListRecordVO oldRecord = dataListDal.getRecord(dataListRecord.getId());
|
||||
oldRecord.setModelId(dataListVO.getModelId());
|
||||
oldRecord.setOpt("delete");
|
||||
cacheService.publishDataListRecord(oldRecord);
|
||||
}
|
||||
int count = dataListDal.saveRecord(dataListRecord);
|
||||
if (count > 0) {
|
||||
result.getData().put("id", dataListRecord.getId());
|
||||
result.setSuccess(true);
|
||||
// 通知更新
|
||||
DataListsVO dataListVO = dataListDal.get(dataListRecord.getDataListId());
|
||||
dataListRecord.setModelId(dataListVO.getModelId());
|
||||
dataListRecord.setOpt("update");
|
||||
cacheService.publishDataListRecord(dataListRecord);
|
||||
|
||||
Reference in New Issue
Block a user