changelog: 89b08620 - feat(product-v2): 搬迁报价公式+温馨提示+预订条款到v2
这个提交包含在:
父节点
1ea141e0c2
当前提交
5305d0160c
@ -0,0 +1,736 @@
|
|||||||
|
# 接口变更记录 — 2026-04-13 19:14
|
||||||
|
|
||||||
|
> **提交** `89b08620` · **作者** wx · **时间** 2026-04-13 19:14:52 +0800
|
||||||
|
>
|
||||||
|
> feat(product-v2): 搬迁报价公式+温馨提示+预订条款到v2
|
||||||
|
|
||||||
|
## 变更总览
|
||||||
|
|
||||||
|
- **hl-product-service-v2**
|
||||||
|
- 🆕 AdminBookingTerms (+7 接口)
|
||||||
|
- 🆕 AdminWarmTips (+7 接口)
|
||||||
|
- 🆕 Formula (+19 接口)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## hl-product-service-v2
|
||||||
|
|
||||||
|
### 🆕 新增: AdminBookingTerms
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/booking-terms/list — 预订条款列表
|
||||||
|
|
||||||
|
> 返回所有预订条款(含禁用),按创建时间倒序
|
||||||
|
|
||||||
|
**响应** `Result<List<BookingTermsRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsId` | `Long` | 预订条款ID |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/booking-terms/enabled — 启用的预订条款列表
|
||||||
|
|
||||||
|
> 仅返回启用状态的条款,供产品设计时选择
|
||||||
|
|
||||||
|
**响应** `Result<List<BookingTermsRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsId` | `Long` | 预订条款ID |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/booking-terms/{termsId} — 预订条款详情
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{termsId}` (`Long`) — 路径参数:预订条款ID
|
||||||
|
|
||||||
|
**响应** `Result<BookingTermsRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsId` | `Long` | 预订条款ID |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `POST` /admin/product/booking-terms — 创建预订条款
|
||||||
|
|
||||||
|
> 创建后默认启用
|
||||||
|
|
||||||
|
**请求体** `BookingTermsSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
|
||||||
|
**响应** `Result<BookingTermsRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsId` | `Long` | 预订条款ID |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/booking-terms/{termsId} — 修改预订条款
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{termsId}` (`Long`) — 路径参数:预订条款ID
|
||||||
|
|
||||||
|
**请求体** `BookingTermsSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
|
||||||
|
**响应** `Result<BookingTermsRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `termsId` | `Long` | 预订条款ID |
|
||||||
|
| `termsName` | `String` | 条款名称 |
|
||||||
|
| `content` | `String` | 条款内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `DELETE` /admin/product/booking-terms/{termsId} — 删除预订条款
|
||||||
|
|
||||||
|
> 软删除,已绑定的产品不受影响
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{termsId}` (`Long`) — 路径参数:预订条款ID
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/booking-terms/{termsId}/toggle — 启用/禁用预订条款
|
||||||
|
|
||||||
|
> 禁用后不再出现在产品设计的可选列表中
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{termsId}` (`Long`) — 路径参数:预订条款ID
|
||||||
|
- `enabled` (`boolean`) — 查询参数:是否启用
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 🆕 新增: AdminWarmTips
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/warm-tips/list — 温馨提示列表
|
||||||
|
|
||||||
|
> 返回所有温馨提示(含禁用),按创建时间倒序
|
||||||
|
|
||||||
|
**响应** `Result<List<WarmTipsRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsId` | `Long` | 温馨提示ID |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/warm-tips/enabled — 启用的温馨提示列表
|
||||||
|
|
||||||
|
> 仅返回启用状态的提示,供产品设计时选择
|
||||||
|
|
||||||
|
**响应** `Result<List<WarmTipsRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsId` | `Long` | 温馨提示ID |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/warm-tips/{tipsId} — 温馨提示详情
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{tipsId}` (`Long`) — 路径参数:温馨提示ID
|
||||||
|
|
||||||
|
**响应** `Result<WarmTipsRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsId` | `Long` | 温馨提示ID |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `POST` /admin/product/warm-tips — 创建温馨提示
|
||||||
|
|
||||||
|
> 创建后默认启用
|
||||||
|
|
||||||
|
**请求体** `WarmTipsSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
|
||||||
|
**响应** `Result<WarmTipsRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsId` | `Long` | 温馨提示ID |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/warm-tips/{tipsId} — 修改温馨提示
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{tipsId}` (`Long`) — 路径参数:温馨提示ID
|
||||||
|
|
||||||
|
**请求体** `WarmTipsSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
|
||||||
|
**响应** `Result<WarmTipsRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `tipsId` | `Long` | 温馨提示ID |
|
||||||
|
| `tipsName` | `String` | 提示名称 |
|
||||||
|
| `content` | `String` | 提示内容(富文本) |
|
||||||
|
| `enabled` | `Boolean` | 是否启用 |
|
||||||
|
| `remark` | `String` | 备注 |
|
||||||
|
| `createdBy` | `Long` | 创建人ID |
|
||||||
|
| `createdAt` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updatedAt` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `DELETE` /admin/product/warm-tips/{tipsId} — 删除温馨提示
|
||||||
|
|
||||||
|
> 软删除,已绑定的产品不受影响
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{tipsId}` (`Long`) — 路径参数:温馨提示ID
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/warm-tips/{tipsId}/toggle — 启用/禁用温馨提示
|
||||||
|
|
||||||
|
> 禁用后不再出现在产品设计的可选列表中
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{tipsId}` (`Long`) — 路径参数:温馨提示ID
|
||||||
|
- `enabled` (`boolean`) — 查询参数:是否启用
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 🆕 新增: Formula
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/formula/group/list — 公式组列表
|
||||||
|
|
||||||
|
> 获取定价公式组列表,可按产品类型筛选。
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `productType` (`String`) — 查询参数
|
||||||
|
|
||||||
|
**响应** `Result<List<FormulaGroupRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `groupCode` | `String` | 公式组编码 |
|
||||||
|
| `groupName` | `String` | 公式组名称 |
|
||||||
|
| `productType` | `String` | 适用产品类型 |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isActive` | `Boolean` | 是否激活 |
|
||||||
|
| `version` | `Integer` | 版本号 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `stepCount` | `Integer` | 步骤数量 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/formula/group/{groupId} — 公式组详情
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{groupId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<FormulaGroupRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `groupCode` | `String` | 公式组编码 |
|
||||||
|
| `groupName` | `String` | 公式组名称 |
|
||||||
|
| `productType` | `String` | 适用产品类型 |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isActive` | `Boolean` | 是否激活 |
|
||||||
|
| `version` | `Integer` | 版本号 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `stepCount` | `Integer` | 步骤数量 |
|
||||||
|
|
||||||
|
### 📌 `POST` /admin/product/formula/group — 创建公式组
|
||||||
|
|
||||||
|
**请求体** `FormulaGroupSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupCode` | `String` | 公式组编码 |
|
||||||
|
| `groupName` | `String` | 公式组名称 |
|
||||||
|
| `productType` | `String` | 适用产品类型(字典product_type: CORE=核心产品, GROUP=小蒙马拼团, CUSTOM=定制产品, ROUTE=线路产品) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaGroupRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `groupCode` | `String` | 公式组编码 |
|
||||||
|
| `groupName` | `String` | 公式组名称 |
|
||||||
|
| `productType` | `String` | 适用产品类型 |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isActive` | `Boolean` | 是否激活 |
|
||||||
|
| `version` | `Integer` | 版本号 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `stepCount` | `Integer` | 步骤数量 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/formula/group/{groupId} — 更新公式组
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{groupId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**请求体** `FormulaGroupSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupCode` | `String` | 公式组编码 |
|
||||||
|
| `groupName` | `String` | 公式组名称 |
|
||||||
|
| `productType` | `String` | 适用产品类型(字典product_type: CORE=核心产品, GROUP=小蒙马拼团, CUSTOM=定制产品, ROUTE=线路产品) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaGroupRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `groupCode` | `String` | 公式组编码 |
|
||||||
|
| `groupName` | `String` | 公式组名称 |
|
||||||
|
| `productType` | `String` | 适用产品类型 |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isActive` | `Boolean` | 是否激活 |
|
||||||
|
| `version` | `Integer` | 版本号 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `stepCount` | `Integer` | 步骤数量 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/formula/group/{groupId}/activate — 激活公式组
|
||||||
|
|
||||||
|
> 激活指定公式组,同时自动停用同产品类型下的其他公式组
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{groupId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 📌 `DELETE` /admin/product/formula/group/{groupId} — 删除公式组
|
||||||
|
|
||||||
|
> 已激活的公式组不能删除,需先激活其他公式组
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{groupId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/formula/group/{groupId}/steps — 公式步骤列表
|
||||||
|
|
||||||
|
> 获取公式组下所有步骤,按执行顺序升序排列
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{groupId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<List<FormulaStepRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `formulaId` | `String` | 公式ID |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isEnabled` | `Boolean` | 是否启用 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updateTime` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/formula/step/{formulaId} — 公式步骤详情
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{formulaId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<FormulaStepRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `formulaId` | `String` | 公式ID |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isEnabled` | `Boolean` | 是否启用 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updateTime` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `POST` /admin/product/formula/step — 创建公式步骤
|
||||||
|
|
||||||
|
**请求体** `FormulaStepSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `Long` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | Aviator表达式(支持数学运算、条件判断、内置函数;可引用前置步骤的输出变量和公式变量表中的变量) |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `changeNote` | `String` | 变更说明 |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaStepRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `formulaId` | `String` | 公式ID |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isEnabled` | `Boolean` | 是否启用 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updateTime` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/formula/step/{formulaId} — 更新公式步骤
|
||||||
|
|
||||||
|
> 更新时自动保存版本快照,可通过版本历史接口查看和回滚
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{formulaId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**请求体** `FormulaStepSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `Long` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | Aviator表达式(支持数学运算、条件判断、内置函数;可引用前置步骤的输出变量和公式变量表中的变量) |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `changeNote` | `String` | 变更说明 |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaStepRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `formulaId` | `String` | 公式ID |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isEnabled` | `Boolean` | 是否启用 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updateTime` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/formula/step/{formulaId}/toggle — 启用/禁用公式步骤
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{formulaId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 📌 `DELETE` /admin/product/formula/step/{formulaId} — 删除公式步骤
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{formulaId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/formula/step/{formulaId}/versions — 公式步骤版本历史
|
||||||
|
|
||||||
|
> 按版本号倒序返回历史版本列表
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{formulaId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<List<FormulaVersionRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `versionId` | `String` | 版本ID |
|
||||||
|
| `formulaId` | `String` | 公式ID |
|
||||||
|
| `versionNum` | `Integer` | 版本号 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `changeNote` | `String` | 变更说明 |
|
||||||
|
| `changedBy` | `String` | 变更人ID |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/formula/step/{formulaId}/rollback/{versionNum} — 回滚公式步骤到指定版本
|
||||||
|
|
||||||
|
> 回滚前自动备份当前表达式
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{formulaId}` (`Long`) — 路径参数
|
||||||
|
- `{versionNum}` (`Integer`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<FormulaStepRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `formulaId` | `String` | 公式ID |
|
||||||
|
| `groupId` | `String` | 公式组ID |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `executionOrder` | `Integer` | 执行顺序 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `inputVars` | `String` | 输入变量(逗号分隔) |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `isEnabled` | `Boolean` | 是否启用 |
|
||||||
|
| `createTime` | `LocalDateTime` | 创建时间 |
|
||||||
|
| `updateTime` | `LocalDateTime` | 更新时间 |
|
||||||
|
|
||||||
|
### 📌 `POST` /admin/product/formula/test — 测试公式执行
|
||||||
|
|
||||||
|
> 使用自定义变量值测试公式组的执行结果,不影响业务数据
|
||||||
|
|
||||||
|
**请求体** `FormulaTestReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `groupId` | `Long` | 公式组ID |
|
||||||
|
| `variables` | `Map<String, Object>` | 测试变量(变量名->值) |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaTestResultVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `success` | `Boolean` | 是否成功 |
|
||||||
|
| `errorMessage` | `String` | 错误信息 |
|
||||||
|
| `stepResults` | `List<StepResult>` | 各步骤执行结果 |
|
||||||
|
| `finalVariables` | `Map<String, Object>` | 最终变量表 |
|
||||||
|
| `totalTimeMs` | `Long` | 总耗时(毫秒) |
|
||||||
|
| `stepCode` | `String` | 步骤编码 |
|
||||||
|
| `stepName` | `String` | 步骤名称 |
|
||||||
|
| `outputVar` | `String` | 输出变量名 |
|
||||||
|
| `outputValue` | `Object` | 输出值 |
|
||||||
|
| `expression` | `String` | 表达式 |
|
||||||
|
| `executionTimeMs` | `Long` | 执行耗时(毫秒) |
|
||||||
|
| `success` | `Boolean` | 是否成功 |
|
||||||
|
| `errorMessage` | `String` | 错误信息 |
|
||||||
|
|
||||||
|
### 📌 `GET` /admin/product/formula/var/list — 公式变量列表
|
||||||
|
|
||||||
|
> 获取公式变量列表,可按变量分类筛选(INPUT/INTERMEDIATE/OUTPUT)
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `category` (`String`) — 查询参数
|
||||||
|
|
||||||
|
**响应** `Result<List<FormulaVarRespVO>>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `varId` | `String` | 变量ID |
|
||||||
|
| `varName` | `String` | 变量名 |
|
||||||
|
| `varType` | `String` | 变量类型:DECIMAL/INTEGER/BOOLEAN/STRING |
|
||||||
|
| `category` | `String` | 变量分类:INPUT/INTERMEDIATE/OUTPUT |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `defaultValue` | `String` | 默认值 |
|
||||||
|
| `productTypes` | `List<String>` | 适用产品类型列表 |
|
||||||
|
|
||||||
|
### 📌 `POST` /admin/product/formula/var — 创建公式变量
|
||||||
|
|
||||||
|
**请求体** `FormulaVarSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `varName` | `String` | 变量名 |
|
||||||
|
| `varType` | `String` | 变量类型:DECIMAL/INTEGER/BOOLEAN/STRING |
|
||||||
|
| `category` | `String` | 变量分类:INPUT/INTERMEDIATE/OUTPUT |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `defaultValue` | `String` | 默认值 |
|
||||||
|
| `productTypes` | `List<String>` | 适用产品类型列表 |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaVarRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `varId` | `String` | 变量ID |
|
||||||
|
| `varName` | `String` | 变量名 |
|
||||||
|
| `varType` | `String` | 变量类型:DECIMAL/INTEGER/BOOLEAN/STRING |
|
||||||
|
| `category` | `String` | 变量分类:INPUT/INTERMEDIATE/OUTPUT |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `defaultValue` | `String` | 默认值 |
|
||||||
|
| `productTypes` | `List<String>` | 适用产品类型列表 |
|
||||||
|
|
||||||
|
### 📌 `PUT` /admin/product/formula/var/{varId} — 更新公式变量
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{varId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**请求体** `FormulaVarSaveReqVO`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `varName` | `String` | 变量名 |
|
||||||
|
| `varType` | `String` | 变量类型:DECIMAL/INTEGER/BOOLEAN/STRING |
|
||||||
|
| `category` | `String` | 变量分类:INPUT/INTERMEDIATE/OUTPUT |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `defaultValue` | `String` | 默认值 |
|
||||||
|
| `productTypes` | `List<String>` | 适用产品类型列表 |
|
||||||
|
|
||||||
|
**响应** `Result<FormulaVarRespVO>`
|
||||||
|
|
||||||
|
| 字段 | 类型 | 说明 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `varId` | `String` | 变量ID |
|
||||||
|
| `varName` | `String` | 变量名 |
|
||||||
|
| `varType` | `String` | 变量类型:DECIMAL/INTEGER/BOOLEAN/STRING |
|
||||||
|
| `category` | `String` | 变量分类:INPUT/INTERMEDIATE/OUTPUT |
|
||||||
|
| `description` | `String` | 描述 |
|
||||||
|
| `defaultValue` | `String` | 默认值 |
|
||||||
|
| `productTypes` | `List<String>` | 适用产品类型列表 |
|
||||||
|
|
||||||
|
### 📌 `DELETE` /admin/product/formula/var/{varId} — 删除公式变量
|
||||||
|
|
||||||
|
> 如果有公式步骤引用了该变量,删除后步骤执行时会报错
|
||||||
|
|
||||||
|
**参数**
|
||||||
|
|
||||||
|
- `{varId}` (`Long`) — 路径参数
|
||||||
|
|
||||||
|
**响应** `Result<Void>`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>📁 全部变更文件 (点击展开)</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
M hl-product-service-v2/pom.xml
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/controller/admin/AdminBookingTermsController.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/controller/admin/AdminWarmTipsController.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/controller/admin/FormulaController.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/AviatorCeil10Function.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/AviatorMaxFunction.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/AviatorSafeFunction.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/AviatorSellPriceFunction.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/FormulaEngine.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/FormulaEngineConfig.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/engine/PricingContext.java
|
||||||
|
M hl-product-service-v2/src/main/java/com/hulalv/product/entity/BookingTermsDO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/entity/PricingFormulaDO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/entity/PricingFormulaGroupDO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/entity/PricingFormulaVarDO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/entity/PricingFormulaVersionDO.java
|
||||||
|
M hl-product-service-v2/src/main/java/com/hulalv/product/entity/WarmTipsDO.java
|
||||||
|
M hl-product-service-v2/src/main/java/com/hulalv/product/mapper/BookingTermsMapper.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/mapper/PricingFormulaGroupMapper.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/mapper/PricingFormulaMapper.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/mapper/PricingFormulaVarMapper.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/mapper/PricingFormulaVersionMapper.java
|
||||||
|
M hl-product-service-v2/src/main/java/com/hulalv/product/mapper/WarmTipsMapper.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/service/admin/BookingTermsService.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/service/admin/FormulaGroupService.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/service/admin/FormulaStepService.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/service/admin/FormulaTestService.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/service/admin/FormulaVarService.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/service/admin/WarmTipsService.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/BookingTermsRespVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/BookingTermsSaveReqVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/WarmTipsRespVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/WarmTipsSaveReqVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaGroupRespVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaGroupSaveReqVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaStepRespVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaStepSaveReqVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaTestReqVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaTestResultVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaVarRespVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaVarSaveReqVO.java
|
||||||
|
A hl-product-service-v2/src/main/java/com/hulalv/product/vo/admin/formula/FormulaVersionRespVO.java
|
||||||
|
```
|
||||||
|
</details>
|
||||||
正在加载...
x
在新工单中引用
屏蔽一个用户