class ProjectController {

    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    public ServiceResult<String> delete(@Validated(DeleteProject.class) @RequestBody Project project, @CurrentUser LoginUser user, Errors errors) throws Exception {
        ValidateResult validateRes = projectService.validatePermision(user, project, errors)
                .addAssert(() -> projectService.deleteCheck(project.getId()))
                .addAssert(() -> projectService.deleteDataCenter(user, project))
                .addAssert(() -> projectService.deleteProject(project).getCode() == 200, message.db_message_delete_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}