You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.5 KiB

7 days ago
meta {
name: 候选客户搜索
type: http
seq: 3
tags: [
generated
]
}
post {
url: {{baseUrl}}/api/opportunity/customer/search
body: formUrlEncoded
auth: inherit
}
body:form-urlencoded {
oppId: 748556126794022912
keyword: 园科
current: 1
size: 10
}
docs {
# 候选客户搜索
`POST /api/opportunity/customer/search`
商机详情「客户」Tab「添加关联客户」弹窗的客户查询区数据源。快照池降级拍板(20260829):客户模块 A4 未建,候选池取全系统 opportunity_customer 存活行按 customer_id 去重后的「引用 id + 名快照」;keyword 模糊匹配客户名快照,并排除当前商机已关联客户。A4 建成后切真源,接口签名不变(类型/地区/联系人/电话/负责人列届时补齐)。
## 请求参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
| --- | --- | --- | --- | --- |
| oppId | string | 是 | - | 商机 ID(用于排除当前商机已关联客户) |
| keyword | string | 否 | - | 模糊搜索关键字(匹配客户名快照) |
| customerType | string | 否 | - | 客户类型字典 code(A4 建成前无数据维度,参数预留) |
| current | number | 否 | 1 | 当前页码,从 1 开始 |
| size | number | 否 | 10 | 每页条数,上限 500 |
| orderBy | string | 否 | - | 排序字段 |
| asc | boolean | 否 | false | 是否升序(默认新数据在前) |
## 请求示例
请求头:Authorization: Bearer {{token}}
Content-Type: application/x-www-form-urlencoded
POST /api/opportunity/customer/search
oppId=748556126794022912&keyword=园科&current=1&size=10
## 响应 data 结构
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| content | array | 候选客户数组(快照池) |
| content[].customerId | string | 客户 ID |
| content[].customerName | string | 客户名快照 |
| total | number | 总条数 |
| size | number | 每页条数 |
| current | number | 当前页 |
| pages | number | 总页数 |
| empty | boolean | 是否为空 |
## 响应示例
// 示例数据,字段结构以上表为准,非真实返回
```json
{
"code": 0,
"success": true,
"message": "success",
"data": {
"content": [
{
"customerId": "920000000000000100",
"customerName": "园科集团(seed快照)"
}
],
"total": 1,
"size": 10,
"current": 1,
"pages": 1,
"empty": false
}
}
```
}