class DatabaseController {

    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    public ServiceResult<String> delete(@Validated(DeleteDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors) throws Exception {
        dataBaseInfo.setUpdateUserNo(user.getUserNo());
        ValidateResult validateRes = databaseService.validatePermision(user, errors)
                .addAssert(() -> databaseService.deleteCheck(dataBaseInfo.getId()))
                .addAssert(() -> databaseService.deleteDataCenter(user, dataBaseInfo))
                .addAssert(() -> dataBaseDao.deleteDataBaseInfo(dataBaseInfo.getId()) > 0, message.db_message_delete_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}