class GroupController {

    @RequestMapping(value = {"", "/", "/delete"}, method = RequestMethod.DELETE)
    public ServiceResult<String> delete(@Validated(DeleteGroup.class) @RequestBody DasGroup group, @CurrentUser LoginUser user, Errors errors) throws Exception {
        Long groupId = group.getId();
        ValidateResult validateRes = groupService.validatePermision(user, errors)
                .addAssert(() -> CollectionUtils.isEmpty(projectDao.getProjectByGroupId(groupId)), "当前DAS Team中还有Project，请清空Project后再操作！")
                .addAssert(() -> CollectionUtils.isEmpty(dataBaseDao.getGroupDBsByGroup(groupId)), "当前DAS Team中还有DataBase，请清空DataBase后再操作！")
                .addAssert(() -> CollectionUtils.isEmpty(databaseSetDao.getAllDatabaseSetByGroupId(groupId)), "当前DAL Team中还有DataBaseSet，请清空DataBaseSet后再操作！")
                .addAssert(() -> CollectionUtils.isEmpty(loginUserDao.getUserByGroupId(groupId)), "当前DAS Team中还有Member，请清空Member后再操作！")
                .addAssert(() -> groupDao.deleteDalGroup(groupId) > 0, message.db_message_delete_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}