resource.getName(), resource.getType().name(), resource.getUrl(), resource.getPermission(), resource.getParentId(), resource.getParentIds(), resource.getAvailable(), resource.getId());
return resource;
}
public void deleteResource(Long resourceId) {
Resource resource = findOne(resourceId);
final String deleteSelfSql = "delete from sys_resource where id=?";
jdbcTemplate.update(deleteSelfSql, resourceId);
final String deleteDescendantsSql = "delete from sys_resource where parent_ids like ?";
jdbcTemplate.update(deleteDescendantsSql, resource.makeSelfAsParentIds() + "%");
}