changelog #5706 移除:internal Feign 接口应归 hl-backend-changelog(后端同事向),非 hl-api-changelog(前端向)
一些检查失败了
changelog-filename-gate / validate (push) Failing after 2s
一些检查失败了
changelog-filename-gate / validate (push) Failing after 2s
这个提交包含在:
父节点
988058474c
当前提交
957622305b
@ -1,62 +0,0 @@
|
|||||||
---
|
|
||||||
schema: "hl-changelog/v2"
|
|
||||||
ticket: "5706"
|
|
||||||
title: "车辆异步下拉 options 出参加 dayPrice 车型当日牌价(核单选型参考价)"
|
|
||||||
consumer: "internal"
|
|
||||||
author: "wx"
|
|
||||||
change_type: "修改接口"
|
|
||||||
backend_status: "deployed"
|
|
||||||
gateway_status: "verified"
|
|
||||||
frontend_status: "not_required"
|
|
||||||
frontend_owner: ""
|
|
||||||
frontend_ref: ""
|
|
||||||
target_release: ""
|
|
||||||
verified_at: ""
|
|
||||||
status_note: "后端完成:PR #5714 合并 dev-v3(cba9a1ed16432f33c823a211472c10169766790c)并部署 TEST,网关验证 options 返回 dayPrice。internal Feign 接口,消费方为后端服务(order 核单侧),前端无关。order 侧配套(FleetVehicleOptionFeignVO + SettlementVehicleOptionRespVO 加 dayPrice 透传)由腰苏图负责。"
|
|
||||||
updated_at: "2026-08-08"
|
|
||||||
base: "dev-v3"
|
|
||||||
generated: "2026-08-08T16:05:00+08:00"
|
|
||||||
---
|
|
||||||
|
|
||||||
# 车辆异步下拉 options 出参加 dayPrice 车型当日牌价(#5706)
|
|
||||||
|
|
||||||
> **影响范围**:仅后端服务间 Feign 内部调用(order 核单侧 → fleet),**前端无关**。`/internal/fleet/vehicles/options` 经 9443 网关访问直接 403(网关白名单只放通 admin/mp/internal-feign),前端/小程序不需要也不应调用。本 changelog 告知**后端同事**(order 核单侧 / 腰苏图)接入 `dayPrice` 透传。
|
|
||||||
|
|
||||||
## 需求
|
|
||||||
|
|
||||||
order-v3 核单 Step3 车辆费用「选车」下拉走 `GET /internal/fleet/vehicles/options`,原只回车辆身份字段不带价格。本单给选型下拉带「车型当日牌价」作参考,让定制师选车时心里有数。
|
|
||||||
|
|
||||||
**核算单价维持现状不动**:核单侧核算价仍来自派单后冻结快照 `dailyPrice`(按车型+用车日从价格日历冻结)。
|
|
||||||
|
|
||||||
## 变更接口:`GET /internal/fleet/vehicles/options`
|
|
||||||
|
|
||||||
### 入参(新增可选)
|
|
||||||
|
|
||||||
| 字段 | 类型 | 说明 |
|
|
||||||
|---|---|---|
|
|
||||||
| `serviceDate` | LocalDate(YYYY-MM-DD),可选 | 取牌价服务日;**缺省回退今天**。order 核单侧调用时**固定传订单出发日 departureDate**——下拉里看到的价 = 该车在本订单出发那天的牌价,与后续派单快照口径对齐 |
|
|
||||||
|
|
||||||
### 出参 `VehicleOptionVO`(新增字段)
|
|
||||||
|
|
||||||
| 字段 | 类型 | 说明 |
|
|
||||||
|---|---|---|
|
|
||||||
| `dayPrice` | BigDecimal,可空 | **车型当日牌价(元/车天),仅供核单选型参考,非最终核算价**。按车型型号层 `vehicle_model_id` × `serviceDate` 从价格日历取价;未设价日回退车型 `basePrice`;双无(日历无设价且无 basePrice)返回 `null`(不报错,参考价缺失不阻断下拉)。最终核算价仍走派单后冻结快照 `step3/vehicles` 的 `dailyPrice` |
|
|
||||||
|
|
||||||
### 取价口径(三坑已避)
|
|
||||||
|
|
||||||
1. **按车型型号层取价**(`fleet_vehicle.vehicle_model_id` 关联价格日历),非 type 大类——价格日历 `fleet_pricing_calendar` 按 `vehicle_model_id + calendar_date` 定价
|
|
||||||
2. **未设价日回退车型 basePrice**(`fleet_vehicle_model.basePrice`),双无则 `dayPrice=null` 不抛错;已软删(deleted_at)设价行不取
|
|
||||||
3. **批量取价禁 N+1**:`PricingCalendarService.getDayPrices(车型集合, serviceDate)` 一次批量查价格日历 + 未设价车型 `VehicleModelService.listByIds` 一次批量取 basePrice,内存 join(20 车仅 2 次批量查询)
|
|
||||||
|
|
||||||
### 内部说明
|
|
||||||
|
|
||||||
- `vehicleModelId`(价格日历取价键)仅服务端取价中间键,`@JsonIgnore` 不下发出参——前端只看到新增 `dayPrice`。
|
|
||||||
|
|
||||||
## order 侧配套(腰苏图负责,不在本单)
|
|
||||||
|
|
||||||
**后端同事交接(order 核单侧 / 腰苏图)**:`FleetVehicleOptionFeignVO` + `SettlementVehicleOptionRespVO` 各加 `dayPrice` 透传;fleet 端点已上测试服,可接入。order 核单 Step3 选车下拉如需展示参考价,用 `dayPrice`(标注「参考价,非最终价」);**最终核算价仍以 step3/vehicles 的 `dailyPrice`(派单后冻结快照)为准,不要用 `dayPrice` 当核算金额**。
|
|
||||||
|
|
||||||
## 验证证据
|
|
||||||
|
|
||||||
- VehicleServiceTest **115/115**(新增 2 dayPrice 用例:日历命中/basePrice回退/双无null/无N+1 + 默认日期回退今天/全日历命中不查basePrice);VehicleInternalControllerTest 3/3(serviceDate 透传+dayPrice 返回+vehicleModelId 不下发);dev-v3 全量 verify 3299/0F/0E。
|
|
||||||
- 网关实证(TEST fleet 实例直连):①日历价优先 GL8 2026-10-09 设价500(basePrice900)→dayPrice=500;②未设价日回退 basePrice(2027-01-15→GL8=900/汉兰达=800/普拉多=1000);③软删设价行不取(汉兰达2099-02-12已软删→回退800);④dayPrice 下发+vehicleModelId 不下发。探针 `tools/probe_5706_vehicle_options_dayprice.py` 5/5 PASS。
|
|
||||||
正在加载...
x
在新工单中引用
屏蔽一个用户