@Override
    public int update(final ResourceDTO resourceDTO) {
        final ResourceDO before = resourceMapper.selectById(resourceDTO.getId());
        final ResourceDO resource = ResourceDO.buildResourceDO(resourceDTO);
        final int updateCount = resourceMapper.updateSelective(resource);
        if (updateCount > 0) {
            publisher.onUpdated(resource, before);
        }
        return updateCount;
    }
update resource.

@param resourceDTO {@linkplain ResourceDTO}
@return rows int
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ResourceServiceImpl.java