@PutMapping("/{id}")
    public ShenyuAdminResult updateRule(@PathVariable("id") @Valid
                                        @Existed(provider = RuleMapper.class,
                                                message = "rule is not existed") final String id,
                                        @Valid @RequestBody final RuleDTO ruleDTO) {
        ruleDTO.setId(id);
        Integer updateCount = ruleService.createOrUpdate(ruleDTO);
        return ShenyuAdminResult.success(ShenyuResultMessage.UPDATE_SUCCESS, updateCount);
    }
update rule.

@param id      primary key.
@param ruleDTO rule.
@return {@linkplain ShenyuAdminResult}
shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/RuleController.java