|
@@ -158,15 +158,35 @@ public class MatchLogic {
|
|
|
return flag;
|
|
|
}
|
|
|
}
|
|
|
+ } else if (threshold.contains("[")) {
|
|
|
+ List<String> thresholds = strToList(threshold);
|
|
|
+ if ("contain".equals(condition)) {
|
|
|
+ for (String thr : thresholds) {
|
|
|
+ if (value.toString().contains(thr)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ boolean flag = true;
|
|
|
+ for (String thr : thresholds) {
|
|
|
+ if (value.toString().contains(thr)) {
|
|
|
+ flag = false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return flag;
|
|
|
+ }
|
|
|
} else {
|
|
|
if ("contain".equals(condition)) {
|
|
|
- return value.contains(threshold);
|
|
|
+ return value.toString().contains(threshold);
|
|
|
} else {
|
|
|
- return !value.contains(threshold);
|
|
|
+ return !value.toString().contains(threshold);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
+ } catch (
|
|
|
+ Exception e) {
|
|
|
log.error("条件匹配异常,入参为:type={},condition={},threshold={},value={},", type, condition, threshold, value, e);
|
|
|
}
|
|
|
return false;
|