class UserController {

    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    public ServiceResult<String> delete(@Validated(DeleteUser.class) @RequestBody LoginUser user, @CurrentUser LoginUser currentUser, Errors errors) throws Exception {
        ValidateResult validateRes = userService.validatePermision(currentUser, errors)
                .addAssert(() -> userService.canUpdateOrDeleteUser(currentUser, user), message.permisson_user_crud)
                .addAssert(() -> loginUserDao.deleteUser(user.getId()) > 1, message.db_message_delete_operation_failed).validate();
        if (!validateRes.isValid()) {
            return ServiceResult.fail(validateRes.getSummarize());
        }
        return ServiceResult.success();
    }

}