规则命中返回配置
This commit is contained in:
@@ -12,4 +12,5 @@ public class SessionData {
|
||||
private Long organId; // 组织id
|
||||
private Long engineId; // 引擎id
|
||||
private Integer reqType;//请求类型
|
||||
private Integer ruleHitRspConfig; // 规则命中返回配置,默认1(0:未命中不返回,1:未命中返回)
|
||||
}
|
||||
|
||||
@@ -272,10 +272,7 @@ public class RuleServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo> imple
|
||||
|
||||
@Override
|
||||
public List<JSONObject> setComplexRuleOutput(Long versionId, Map<String,Object> temp, Map<String, Object> input, String outType) {
|
||||
List<JSONObject> jsonObjectList = outputService.setOutput(new StrategyOutput(versionId, StrategyType.COMPLEX_RULE,outType), temp);
|
||||
// for (JSONObject jsonObject : jsonObjectList) {
|
||||
// input.putAll(jsonObject);
|
||||
// }
|
||||
List<JSONObject> jsonObjectList = outputService.setOutput(new StrategyOutput(versionId, StrategyType.COMPLEX_RULE,outType), input, temp);
|
||||
return jsonObjectList;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,5 +24,7 @@ public interface StrategyOutputService extends IService<StrategyOutput> {
|
||||
|
||||
List<JSONObject> setOutput(StrategyOutput entity, Map<String,Object> input);
|
||||
|
||||
List<JSONObject> setOutput(StrategyOutput entity, Map<String,Object> input, Map<String,Object> temp);
|
||||
|
||||
boolean judgeOutCondition(String condition,Map<String,Object> input);
|
||||
}
|
||||
|
||||
@@ -130,6 +130,11 @@ public class StrategyOutputServiceImpl extends ServiceImpl<StrategyOutputMapper,
|
||||
//设置输出,传入map向map中放入输出并且返回输出列表
|
||||
@Override
|
||||
public List<JSONObject> setOutput(StrategyOutput entity, Map<String, Object> input) {
|
||||
return setOutput(entity, input, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> setOutput(StrategyOutput entity, Map<String, Object> input, Map<String,Object> temp) {
|
||||
List<StrategyOutput> strategyOutputList = this.queryByTactics(entity);
|
||||
List<JSONObject> jsonList = new ArrayList<>();
|
||||
if (strategyOutputList != null && strategyOutputList.size() > 0) {
|
||||
@@ -161,6 +166,9 @@ public class StrategyOutputServiceImpl extends ServiceImpl<StrategyOutputMapper,
|
||||
if(!field.getIsLocalVariable()){
|
||||
input.put(fieldEn, value);
|
||||
}
|
||||
if(temp != null){
|
||||
temp.put(fieldEn, value);
|
||||
}
|
||||
jsonList.add(json);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user