浏览代码

阈值修改

yumeng 4 年之前
父节点
当前提交
171cc27bad

+ 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");
                     String threshold = ruleJson.getString("threshold");
                     RuleAccountThreshold updateThreshold = new RuleAccountThreshold();
                     RuleAccountThreshold updateThreshold = new RuleAccountThreshold();
-                    updateThreshold.setThreshold(threshold);
+                    if (Check.isNull(threshold)) {
+                        updateThreshold.setThreshold(null);
+                    } else {
+                        updateThreshold.setThreshold(threshold);
+                    }
                     QueryWrapper<RuleAccountThreshold> updateQueryWrapper = new QueryWrapper();
                     QueryWrapper<RuleAccountThreshold> updateQueryWrapper = new QueryWrapper();
                     updateQueryWrapper.eq("account_id", accountId);
                     updateQueryWrapper.eq("account_id", accountId);
                     updateQueryWrapper.eq("rule_id", ruleId);
                     updateQueryWrapper.eq("rule_id", ruleId);