@Override
    public int update(final ScalePolicyDTO scalePolicyDTO) {
        final ScalePolicyDO scalePolicy = ScalePolicyDO.buildScalePolicyDO(scalePolicyDTO);
        int rows = scalePolicyMapper.updateByPrimaryKeySelective(scalePolicy);
        if (rows > 0) {
            scalePolicyCache.updatePolicy(scalePolicy);
            scaleService.executeScaling();
        }
        return rows;
    }
create or update scale policy.

@param scalePolicyDTO {@linkplain ScalePolicyDTO}
@return rows int
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/ScalePolicyServiceImpl.java