Commit 05a5a413 authored by lilin's avatar lilin
Browse files

delAlertgroupById add entity exist check

parent 9c6f9fce
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);