2 Commits cb505a7c8f ... 17abb6b132

Author SHA1 Message Date
  xujiaheng 17abb6b132 Merge remote-tracking branch 'origin/v2.0.0' into v2.0.0 3 years ago
  xujiaheng 3cd7722a33 修改公式校验 3 years ago

+ 1 - 1
src/main/java/com/persagy/apm/alarmservice/project/alarmcondition/service/impl/AlarmConditionServiceImpl.java

@@ -543,7 +543,7 @@ public class AlarmConditionServiceImpl extends ServiceImpl<AlarmConditionMapper,
         //            return ResultHelper.failure(ResponseCode.C0134.getCode(), "内置变量为空");
         //        }
         // 去空格
-        expression = expression.replaceAll(" ", "");
+        expression = expression.replaceAll(" ", "").replaceAll("÷","/").replaceAll("x","*");
         // 连续运算符处理
         if (expression.split("[\\+\\-\\*\\/]{2,}").length > 1) {
             return ResultHelper.failure(ResponseCode.C0134.getCode(), "公式不合法");