feat: 新增业务人员公共接口(role_id=2,全量返回)

- PublicApiController 新增 staffList():通过 user_roles 关联筛选业务人员
- 返回 id/name/sn/phone/email,支持 keyword 模糊匹配,不分页全量返回
- 路由组新增 /common/public/staff/list
- .gitignore 忽略 docs/*.sql(数据导出文件,不入库)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
mzl
2026-06-18 13:37:48 +08:00
parent 71dca13119
commit b89ac48dd8
4 changed files with 103 additions and 3 deletions
+51
View File
@@ -146,6 +146,53 @@ GET /common/public/vin/list
---
### 3. 业务人员列表
查询业务人员(角色 role_id=2,在职),全量返回。
**请求**
```
GET /common/public/staff/list
```
**参数**
| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| keyword | string | 否 | 关键词,模糊匹配姓名/编号/电话/邮箱 |
**响应示例**
```json
{
"status": "success",
"code": 200,
"message": "请求成功",
"data": [
{
"id": 17,
"name": "张三",
"sn": "S0017",
"phone": "13800138000",
"email": "zhangsan@example.com"
}
]
}
```
**字段说明**
| 字段 | 类型 | 说明 |
|------|------|------|
| id | int | 用户ID |
| name | string | 姓名 |
| sn | string | 编号 |
| phone | string | 电话 |
| email | string | 邮箱 |
---
## 调用示例
```bash
@@ -164,6 +211,10 @@ curl -H "Fdesk-Api-Key: your-api-key" \
# 按 VIN 号搜索
curl -H "Fdesk-Api-Key: your-api-key" \
"https://your-domain.com/common/public/vin/list?vin=LSVAU2A3"
# 查询业务人员列表
curl -H "Fdesk-Api-Key: your-api-key" \
"https://your-domain.com/common/public/staff/list?page=1&page_size=50"
```
## 注意事项