diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/AlarmRuleFacadeImpl.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/AlarmRuleFacadeImpl.java index 38296c2e1..848c6a277 100644 --- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/AlarmRuleFacadeImpl.java +++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/controller/AlarmRuleFacadeImpl.java @@ -96,7 +96,7 @@ public class AlarmRuleFacadeImpl extends BaseFacade { @PostMapping("/create") @ResponseBody @MonitorScopeAuth(targetType = AuthTargetType.TENANT, needPower = PowerConstants.EDIT) - public JsonResult save(@RequestBody AlarmRuleDTO alarmRuleDTO) { + public JsonResult create(@RequestBody AlarmRuleDTO alarmRuleDTO) { final JsonResult result = new JsonResult<>(); facadeTemplate.manage(result, new ManageCallback() { @Override diff --git a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmBlockFacadeImplChecker.java b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmBlockFacadeImplChecker.java index 878c2b810..54e7a6aff 100644 --- a/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmBlockFacadeImplChecker.java +++ b/server/home/home-web/src/main/java/io/holoinsight/server/home/web/security/custom/AlarmBlockFacadeImplChecker.java @@ -173,8 +173,7 @@ private boolean checkUniqueId(String uniqueId, String tenant, String workspace) QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("rule_type", arr[0]); queryWrapper.eq("id", Long.parseLong(arr[1])); - queryWrapper.eq("tenant", tenant); - queryWrapper.eq("workspace", workspace); + requestContextAdapter.queryWrapperTenantAdapt(queryWrapper, tenant, workspace); List rules = this.alarmRuleMapper.selectList(queryWrapper); if (CollectionUtils.isEmpty(rules)) { return false;