# 2026-03-31 BUG修复 + 字典接口说明 ## 1. [已修复] 游玩项目创建报"计费方式无效" **问题**:添加游玩项目时报错 `计费方式无效,只支持 PER_PERSON/PER_GROUP/PER_HOUR/PER_SESSION` **原因**:前端去掉了计费方式字段后,后端创建时仍强制校验 billingType **修复**:billingType 为空时跳过校验(与编辑逻辑一致) **影响服务**:hl-resource-service(已部署正式环境) **PR**: #84 --- ## 2. [前端排查] dict/all 接口已返回 traveler_type_age_rule 前端反馈 `dict/all` 没返回 `traveler_type_age_rule`,经排查**接口正常返回**。 ### 验证结果 `GET /dict/all` 响应中已包含: ```json { "dictType": "traveler_type_age_rule", "dictName": "出行人年龄规则", "dataList": [ { "dictValue": "BABY", "dictLabel": "幼童", "sort": 1, "remark": "{\"minAge\":0,\"maxAge\":4}" }, { "dictValue": "YOUNG_CHILD", "dictLabel": "小童", "sort": 2, "remark": "{\"minAge\":4,\"maxAge\":6}" }, { "dictValue": "CHILD", "dictLabel": "儿童", "sort": 3, "remark": "{\"minAge\":6,\"maxAge\":18}" }, { "dictValue": "ADULT", "dictLabel": "成人", "sort": 4, "remark": "{\"minAge\":18,\"maxAge\":200}" } ] } ``` ### 前端使用方式 年龄规则在每条数据的 **`remark`** 字段中(JSON字符串),需要 `JSON.parse(item.remark)` 解析: ```js const ageRules = dictAll.find(d => d.dictType === 'traveler_type_age_rule') ageRules.dataList.forEach(item => { const rule = JSON.parse(item.remark) // { minAge: 0, maxAge: 4 } // rule.minAge <= age < rule.maxAge → 该类型 }) ``` ### 另外:traveler_type 字典备注已更新 `traveler_type`(出行人类型)的备注已从旧的年龄描述(如"12周岁及以上")改为 `年龄规则见 traveler_type_age_rule`,年龄判断统一以 `traveler_type_age_rule` 为准。