mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-05 05:38:30 +08:00
delAlertgroupById add entity exist check (#1602)
* misspell words * modify common queue TaskQueueZKImplTest.java unit test * extends BaseTaskQueueTest get zkServer * modify zk config * add MonitorServiceTest * mobile phone need 11 number * delete file * delAlertgroupById add entity exist check
This commit is contained in:
parent
8b2b5ba684
commit
597d685955
@ -193,6 +193,12 @@ public class AlertGroupService extends BaseService{
|
|||||||
if (checkAdmin(loginUser, result)){
|
if (checkAdmin(loginUser, result)){
|
||||||
return 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);
|
userAlertGroupMapper.deleteByAlertgroupId(id);
|
||||||
alertGroupMapper.deleteById(id);
|
alertGroupMapper.deleteById(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user