79 行
2.1 KiB
Markdown
79 行
2.1 KiB
Markdown
# 集合地/解散地迁移到每日行程
|
|
|
|
- **日期**: 2026-04-16
|
|
- **服务**: hl-product-service-v2
|
|
- **PR**: #617
|
|
- **类型**: refactor (破坏性变更)
|
|
|
|
## ⚠️ 破坏性变更
|
|
|
|
`gatherPlace` 和 `dismissalPlace` 从**产品级**迁移到**每日行程天级**。
|
|
|
|
### 之前(已废弃)
|
|
|
|
```
|
|
PUT /admin/product/item/{id}/itinerary
|
|
{
|
|
"gatherPlace": "海拉尔", ← 产品级,已删除
|
|
"dismissalPlace": "海拉尔", ← 产品级,已删除
|
|
"days": [...]
|
|
}
|
|
```
|
|
|
|
### 现在
|
|
|
|
⚠️ **字段类型改为JSON对象**(存高德行政区搜索返回的完整数据)
|
|
|
|
```
|
|
PUT /admin/product/item/{id}/itinerary
|
|
{
|
|
"days": [{
|
|
"dayNumber": 1,
|
|
"gatherPlace": {
|
|
"name": "海拉尔区",
|
|
"adcode": "150702",
|
|
"center": "119.736279,49.212189",
|
|
"level": "district"
|
|
},
|
|
"dismissalPlace": {
|
|
"name": "额尔古纳市",
|
|
"adcode": "150784",
|
|
"center": "120.180506,50.243102",
|
|
"level": "city"
|
|
},
|
|
"dayTitle": "D1",
|
|
"nodes": [...]
|
|
}, {
|
|
"dayNumber": 2,
|
|
"gatherPlace": {"name": "额尔古纳市", "adcode": "150784", "center": "120.18,50.24", "level": "city"},
|
|
"dismissalPlace": {"name": "满洲里市", "adcode": "150781", "center": "117.45,49.59", "level": "city"},
|
|
...
|
|
}]
|
|
}
|
|
```
|
|
|
|
### 管理端详情响应
|
|
|
|
`GET /admin/product/item/{id}` 的 `itinerary[]` 中每天包含:
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|------|------|------|
|
|
| `gatherPlace` | Object | 当日集合地 `{name, adcode, center, level}` |
|
|
| `dismissalPlace` | Object | 当日解散地 `{name, adcode, center, level}` |
|
|
| `dailyMileage` | BigDecimal | 当日里程(km),自动计算 |
|
|
| `dailyDuration` | Integer | 当日驾车时长(分钟),自动计算 |
|
|
|
|
### 小程序端详情响应
|
|
|
|
`GET /mp/product/{id}` 的 `itinerary[]` 中每天同样包含 `gatherPlace`/`dismissalPlace`/`dailyMileage`/`dailyDuration`。
|
|
|
|
**产品级不再有这两个字段。**
|
|
|
|
### Step3路线与备品
|
|
|
|
`PUT /admin/product/item/{id}/route` 也不再有 `gatherPlace`/`dismissalPlace`。
|
|
|
|
### 途经路线自动生成
|
|
|
|
每天的途经路线格式:`当天集合地 → 景区/活动节点 → 当天解散地`
|