yumeng преди 4 години
родител
ревизия
171cc27bad
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      module-alarm/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleAccountThresholdServiceImpl.java

+ 5 - 1
module-alarm/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleAccountThresholdServiceImpl.java

@@ -103,7 +103,11 @@ public class RuleAccountThresholdServiceImpl extends ServiceImpl<RuleAccountThre
                     }
                     String threshold = ruleJson.getString("threshold");
                     RuleAccountThreshold updateThreshold = new RuleAccountThreshold();
-                    updateThreshold.setThreshold(threshold);
+                    if (Check.isNull(threshold)) {
+                        updateThreshold.setThreshold(null);
+                    } else {
+                        updateThreshold.setThreshold(threshold);
+                    }
                     QueryWrapper<RuleAccountThreshold> updateQueryWrapper = new QueryWrapper();
                     updateQueryWrapper.eq("account_id", accountId);
                     updateQueryWrapper.eq("rule_id", ruleId);