@Override
    public int update(final ScaleRuleDTO scaleRuleDTO) {
        final ScaleRuleDO after = ScaleRuleDO.buildScaleRuleDO(scaleRuleDTO);
        int rows = scaleRuleMapper.updateByPrimaryKey(after);
        if (rows > 0) {
            scaleRuleCache.addOrUpdateRuleToCache(ScaleRuleDO.buildScaleRuleDO(scaleRuleDTO));
        }
        return rows;
    }
create or update rule.

@param scaleRuleDTO {@linkplain ScaleRuleDTO}
@return rows int
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ScaleRuleServiceImpl.java