mirror of
https://gitee.com/freshday/radar.git
synced 2026-03-22 04:37:16 +08:00
fix: bug fix.
feihu wang
This commit is contained in:
@@ -77,7 +77,7 @@ public class ActivationApiController {
|
||||
return activationService.query(query);
|
||||
}
|
||||
|
||||
@GetMapping("/datacolumns/{modelId}")
|
||||
@GetMapping("/feature/columns/{modelId}")
|
||||
public CommonResult getDataColumns(@PathVariable Long modelId) {
|
||||
List<DataColumnInfo> list = new ArrayList<DataColumnInfo>();
|
||||
// 1、Data
|
||||
@@ -124,7 +124,7 @@ public class ActivationApiController {
|
||||
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 class ActivationApiController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("/rulecolumns/{modelId}")
|
||||
@GetMapping("/rule/columns/{modelId}")
|
||||
public CommonResult getRuleColumns(@PathVariable Long modelId) {
|
||||
List<DataColumnInfo> list = new ArrayList<>();
|
||||
List<ActivationVO> listActivation=activationService.listActivation(modelId);
|
||||
|
||||
@@ -362,17 +362,19 @@ public class AntiFraudEngineImpl implements AntiFraudEngine {
|
||||
default:
|
||||
}
|
||||
BigDecimal amount = initScore.add(extra);
|
||||
// 规则得分设置最大值.
|
||||
if (maxScore.compareTo(BigDecimal.ZERO) > 0 && amount.compareTo(maxScore) > 0) {
|
||||
amount = maxScore;
|
||||
}
|
||||
sum = sum.add(amount);
|
||||
|
||||
// hit detail
|
||||
HitObject hit = new HitObject();
|
||||
hit.setKey(rule.getId().toString());
|
||||
hit.setDesc(rule.getLabel());
|
||||
hit.setValue(amount.setScale(2, 4).doubleValue());
|
||||
result.getHitRulesMap().get(act.getActivationName()).add(hit);
|
||||
result.getHitRulesMap2().get(act.getActivationName()).put("rule_"+ hit.getKey(), hit);
|
||||
// 规则得分设置最大值.
|
||||
if (maxScore.compareTo(BigDecimal.ZERO) > 0 && amount.compareTo(maxScore) > 0) {
|
||||
amount = maxScore;
|
||||
}
|
||||
sum = sum.add(amount);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user