Add lawyer information reporting interface and update routes

This commit is contained in:
nepiedg
2026-01-09 10:37:57 +00:00
parent 0d97946123
commit 0b26ba6d35
7 changed files with 172 additions and 1 deletions
+35
View File
@@ -0,0 +1,35 @@
# 律师信息上报接口
该接口将律师线索数据写入 `lawyer` 库中的 `lawyer` 表(复用 `.env` 中的 `DB_INSTANCES=lawyer` 配置)。接口无需登录即可调用,调用方需自行做风控。
## POST `/api/v1/lawyers`
### 请求参数
| 字段 | 类型 | 说明 |
| --- | --- | --- |
| `phone` | string, required | 手机号(会被去除首尾空格) |
| `province` | string | 省份 |
| `city` | string | 城市 |
| `law_firm` | string | 职业律所 |
| `url` | string | 律师详情页链接 |
| `create_time` | int | 创建时间(Unix 时间戳,单位秒,不传则后端使用当前时间) |
| `domain` | string | 来源站点标识 |
| `name` | string | 律师姓名 |
| `params` | string | 附加信息(例如 JSON 字符串) |
### 响应
成功:
```json
{
"code": 200,
"message": "success",
"data": {
"id": 146500
}
}
```
失败会返回对应的 HTTP 状态码以及 `code/message`