class TableEntityController {

    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    public ServiceResult<String> delete(@Validated(DeleteTableEntity.class) @RequestBody TaskTable taskTable, @CurrentUser LoginUser user, Errors errors) throws Exception {
        ValidateResult validateRes = tableEntityService.validatePermision(user, taskTable, errors)
                .addAssert(() -> tableEntityDao.deleteTask(taskTable) > 0, message.db_message_delete_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}