meta { name: 发布查重规则 type: http seq: 4 tags: [ generated ] } post { url: {{baseUrl}}/api/rule/opp-dedup-rule/publish body: formUrlEncoded auth: inherit } body:form-urlencoded { id: 8101 ruleName: 全商机默认查重 applyScopeType: 1 isDefault: 1 wizardConfig: {"triggerScenarios":["OPP_TO_PROJECT","DIRECT_CREATE"],"projectStatuses":["进行中","已中止暂停","已关闭","已结项"],"searchConditions":[{"field":"项目名称","source":"商机","matchMode":"SIMILAR","threshold":80},{"field":"甲方","source":"客户","matchMode":"EXACT","threshold":null}],"analysisRules":[{"seq":1,"expression":"{\"op\":\"AND\",\"children\":[]}","conclusion":"明确重复"}],"strategies":{"intercept":["明确重复"],"confirm":["疑似重复","同商机多客户"],"normal":["一般风险标签提醒","无明显冲突"]}} } docs { # 发布查重规则 `POST /api/rule/opp-dedup-rule/publish` 保存并发布(原发布中转停用、仅全部商机档默认顶替)。 ## 请求参数 | 参数 | 类型 | 必填 | 默认 | 说明 | | --- | --- | --- | --- | --- | | id | string | 否 | - | 版本行 ID(编辑已有草稿发布时传) | | ruleName | string | 是 | - | 规则名称 | | applyScopeType | int | 是 | - | 适用范围:1全部商机 2按项目属地 3按所属公司 | | applyScopeValue | string | 否 | - | 适用对象(applyScopeType=2 时必填) | | isDefault | int | 否 | 0 | 是否默认:1是 0否(仅全部商机档可设) | | ruleDesc | string | 否 | - | 规则说明 | | wizardConfig | string(json) | 是 | - | 4 步骤向导配置整体 JSON(结构见详情接口) | ## 请求示例 请求头:Authorization: Bearer {{token}} Content-Type: application/x-www-form-urlencoded POST /api/rule/opp-dedup-rule/publish id=8101&ruleName=全商机默认查重&applyScopeType=1&isDefault=1&wizardConfig=%7B...%7D ## 响应 data 结构 null ## 响应示例 ```json { "code": 0, "success": true, "message": "success", "data": null } ``` }