Browse Source

delAlertgroupById add entity exist check

pull/2/head
lilin 5 years ago
parent
commit
05a5a413cf
  1. 6
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/AlertGroupService.java

6
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/AlertGroupService.java

@ -193,6 +193,12 @@ public class AlertGroupService extends BaseService{
if (checkAdmin(loginUser, result)){
return result;
}
//check exist
AlertGroup alertGroup = alertGroupMapper.selectById(id);
if (alertGroup == null) {
putMsg(result, Status.ALERT_GROUP_NOT_EXIST);
return result;
}
userAlertGroupMapper.deleteByAlertgroupId(id);
alertGroupMapper.deleteById(id);

Loading…
Cancel
Save