diff --git a/.gitignore b/.gitignore
index 617967e..ff2141e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@ webapp/node_modules/
.settings
.classpath
.factorypath
+/radar-kafka-demo/target/
diff --git a/README_en.md b/README_en.md
new file mode 100644
index 0000000..4c3fdbd
--- /dev/null
+++ b/README_en.md
@@ -0,0 +1,74 @@
+# Risk Engine(Radar)
+## Introduction
+
+A real-time risk analysis engine,which can update risk rule in real-time and make it effective immediately.
+It applies to the anti-fraud application perfectly.
+The project code called Radar, like the code, monitor the transaction at the back.
+
+## FEATURE
+
+ * real-time
+ * visual rule editor
+ * plugin design
+ * nosql, easy extended
+ * simple configuration
+ * out-of-the-box
+
+## Relation Site
+ Gitee: https://gitee.com/freshday/radar
+ Github: https://github.com/wfh45678/radar
+ Official Site: https://www.91risk.com
+ Wiki: https://gitee.com/freshday/radar/wikis/home
+
+
+## Architecture
+
+
+Server-end: SpringBoot + Mybatis + tkMapper + Mysql + MongoDB + Redis + Groovy + ES + Swagger
+
+Front-end: React(SPA)
+
+### System Component Diagram
+![Architecture](https://www.91risk.com/radar/sys_model_arch.png)
+
+## Technology stack
+* Springboot:base spring boot 2.x framework.
+
+* Mybatis + tkMapper: data persistence layer framework.
+
+* Mysql : model meta data storage.
+
+* MongoDB: for event data storage.
+
+* ES: risk result data analysis.
+
+* Redis: cache, pub sub when model meta data change.
+
+* Groovy: rule engine.
+
+* Swagger: Rest API.
+
+
+---
+
+## [manual](https://gitee.com/freshday/radar/wikis/manual)
+https://gitee.com/freshday/radar/wikis/manual
+
+
+## Demo site
+[Demo URL:](http://121.36.168.6:6580/) http://121.36.168.6:6580/
+
+## wiki
+[WIKI:](https://gitee.com/freshday/radar/wikis/home?sort_id=1637444) https://gitee.com/freshday/radar/wikis/home?sort_id=1637444
+
+
+
+## Thanks
+
+千面怪, 烈日下的从容, DerekDingLu, king, sanying2012, 紫泉夜, 玄梦
+成书平, 徐帅,郭锐, 王成,马兆永...
+
+
+
+ ## Statement
+ Copyright © 2019-2021 WangFeiHu
diff --git a/pom.xml b/pom.xml
index da2c504..7433bdc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
com.pgmmers
radar
- 1.0.7-SNAPSHOT
+ 1.0.8-SNAPSHOT
radar
Demo project for Spring Boot
pom
diff --git a/radar-admin/pom.xml b/radar-admin/pom.xml
index 87b64cd..02403ea 100644
--- a/radar-admin/pom.xml
+++ b/radar-admin/pom.xml
@@ -5,7 +5,7 @@
radar
com.pgmmers
- 1.0.7-SNAPSHOT
+ 1.0.8-SNAPSHOT
4.0.0
radar-admin
diff --git a/radar-admin/src/main/java/com/pgmmers/radar/controller/ActivationApiController.java b/radar-admin/src/main/java/com/pgmmers/radar/controller/ActivationApiController.java
index 786ee07..599316a 100644
--- a/radar-admin/src/main/java/com/pgmmers/radar/controller/ActivationApiController.java
+++ b/radar-admin/src/main/java/com/pgmmers/radar/controller/ActivationApiController.java
@@ -77,7 +77,7 @@ public CommonResult query(@RequestBody ActivationQuery query) {
return activationService.query(query);
}
- @GetMapping("/datacolumns/{modelId}")
+ @GetMapping("/feature/columns/{modelId}")
public CommonResult getDataColumns(@PathVariable Long modelId) {
List list = new ArrayList();
// 1、Data
@@ -124,7 +124,7 @@ public CommonResult getDataColumns(@PathVariable Long modelId) {
return result;
}
- @GetMapping("/absColumns/{modelId}")
+ @GetMapping("/abstraction/columns/{modelId}")
public CommonResult getAbstractionColumns(@PathVariable Long modelId) {
CommonResult result = new CommonResult();
result.setSuccess(true);
@@ -140,7 +140,7 @@ public CommonResult getAbstractionColumns(@PathVariable Long modelId) {
return result;
}
- @GetMapping("/rulecolumns/{modelId}")
+ @GetMapping("/rule/columns/{modelId}")
public CommonResult getRuleColumns(@PathVariable Long modelId) {
List list = new ArrayList<>();
List listActivation=activationService.listActivation(modelId);
@@ -185,4 +185,14 @@ private void extractMetaColumn(DataColumnInfo ds, PreItemVO preItem, String json
}
ds.addChildren(preItem.getLabel(), preItem.getDestField(), children);
}
+
+ @PostMapping("/disable/{activationId}")
+ public CommonResult disable(@PathVariable Long activationId) {
+ return activationService.updateStatus(activationId, 0);
+ }
+
+ @PostMapping("/enable/{activationId}")
+ public CommonResult enable(@PathVariable Long activationId) {
+ return activationService.updateStatus(activationId, 1);
+ }
}
diff --git a/radar-admin/src/main/java/com/pgmmers/radar/controller/ModelApiController.java b/radar-admin/src/main/java/com/pgmmers/radar/controller/ModelApiController.java
index 0527046..6dc7d28 100644
--- a/radar-admin/src/main/java/com/pgmmers/radar/controller/ModelApiController.java
+++ b/radar-admin/src/main/java/com/pgmmers/radar/controller/ModelApiController.java
@@ -56,13 +56,7 @@ public CommonResult get(@PathVariable Long id) {
@GetMapping("/list")
public CommonResult list(HttpServletRequest request) {
-// HttpSession session = request.getSession();
-// UserVO user = (UserVO) session.getAttribute("user");
CommonResult result = new CommonResult();
-// if (user == null) {
-// result.setMsg("session已过期");
-// return result;
-// }
result.setSuccess(true);
result.getData().put("modelList", modelService.listModel(contextHolder.getContext().getCode(), null));
return result;
@@ -79,14 +73,6 @@ public CommonResult list(@PathVariable String merchantCode) {
@PostMapping
public CommonResult query(@RequestBody ModelQuery query, HttpServletRequest request) {
CommonResult result = new CommonResult();
-
-// HttpSession session = request.getSession();
-// UserVO user = (UserVO) session.getAttribute("user");
-// if (user == null) {
-// result.setMsg("session已过期");
-// return result;
-// }
-// query.setMerchantCode(user.getCode());
query.setMerchantCode(contextHolder.getContext().getCode());
return modelService.query(query);
}
@@ -94,9 +80,6 @@ public CommonResult query(@RequestBody ModelQuery query, HttpServletRequest requ
@PutMapping
public CommonResult save(@RequestBody ModelVO model, HttpServletRequest request) {
-// HttpSession session = request.getSession();
-// UserVO user = (UserVO) session.getAttribute("user");
-// model.setCode(user.getCode());
model.setCode(contextHolder.getContext().getCode());
return modelService.save(model);
}
diff --git a/radar-admin/src/main/java/com/pgmmers/radar/controller/RuleApiController.java b/radar-admin/src/main/java/com/pgmmers/radar/controller/RuleApiController.java
index 129f566..e1c0c82 100644
--- a/radar-admin/src/main/java/com/pgmmers/radar/controller/RuleApiController.java
+++ b/radar-admin/src/main/java/com/pgmmers/radar/controller/RuleApiController.java
@@ -56,7 +56,7 @@ public CommonResult query(@RequestBody RuleQuery query) {
}
@PutMapping
- public CommonResult save(@RequestBody RuleVO rule, HttpServletRequest request) {
+ public CommonResult save(@RequestBody RuleVO rule) {
return ruleService.save(rule, contextHolder.getContext().getUsername());
}
diff --git a/radar-admin/src/main/resources/static/index.fd241aec-1.css b/radar-admin/src/main/resources/static/index.da6b2009-1.css
similarity index 100%
rename from radar-admin/src/main/resources/static/index.fd241aec-1.css
rename to radar-admin/src/main/resources/static/index.da6b2009-1.css
diff --git a/radar-admin/src/main/resources/static/index.fd241aec-2.css b/radar-admin/src/main/resources/static/index.da6b2009-2.css
similarity index 100%
rename from radar-admin/src/main/resources/static/index.fd241aec-2.css
rename to radar-admin/src/main/resources/static/index.da6b2009-2.css
diff --git a/radar-admin/src/main/resources/static/index.fd241aec-3.css b/radar-admin/src/main/resources/static/index.da6b2009-3.css
similarity index 100%
rename from radar-admin/src/main/resources/static/index.fd241aec-3.css
rename to radar-admin/src/main/resources/static/index.da6b2009-3.css
diff --git a/radar-admin/src/main/resources/static/index.html b/radar-admin/src/main/resources/static/index.html
index 5d18a77..da0febe 100644
--- a/radar-admin/src/main/resources/static/index.html
+++ b/radar-admin/src/main/resources/static/index.html
@@ -1,3 +1,3 @@
风控引擎管理平台
\ No newline at end of file
+