This commit is contained in:
2025-09-30 00:03:43 +08:00
parent 19117de6c8
commit 8885fb766a
39 changed files with 517 additions and 159 deletions

View File

@@ -230,7 +230,7 @@ paths:
/api/admin/parts:
get:
summary: 管理端-用户配件列表(✅ Fully Implemented
description: 返回商品列表;支持 shopId/kw 分页查询。
description: 返回商品列表;支持 shopId/kw 分页查询。自 0.2.1 起附带模板信息与模板参数JSON。
parameters:
- in: header
name: X-Admin-Id
@@ -270,7 +270,10 @@ paths:
name: { type: string }
brand: { type: string }
model: { type: string }
spec: { type: string }
spec: { type: string, nullable: true }
templateId: { type: integer, format: int64, nullable: true }
templateName: { type: string, nullable: true }
attributesJson: { type: string, description: '模板参数JSON字符串键值对如 {"内径":10,"长度":200}' }
images:
type: array
items: { type: string, description: '图片URL可能为绝对或以 / 开头的相对路径' }
@@ -455,8 +458,8 @@ paths:
createdAt: { type: string, format: date-time }
/api/admin/consults/{id}/reply:
post:
summary: 管理端-回复咨询(✅ Fully Implemented仅允许一次回复)
description: 当该咨询已存在回复时返回 409。
summary: 管理端-回复咨询(✅ Fully Implemented回复后自动标记已解决
description: 当该咨询已存在回复时返回 409。自 0.2.1 起:成功回复后,该咨询状态将自动更新为 resolved。
requestBody:
required: true
content:
@@ -467,7 +470,14 @@ paths:
content: { type: string }
required: [content]
responses:
'200': { description: 成功 }
'200':
description: 成功
content:
application/json:
schema:
type: object
properties:
status: { type: string, enum: [open, resolved, closed] }
'409': { description: 该咨询已被回复 }
/api/admin/consults/{id}/resolve:
put:
@@ -1173,7 +1183,7 @@ paths:
/api/products:
get:
summary: 商品搜索(✅ Fully Implemented
description: 支持 kw/page/size/categoryId/templateId 以及模板参数过滤。模板参数以 param_ 前缀传入,如 param_颜色=黑、param_内径=10后端对 JSON attributes 进行 LIKE 匹配(字符串化),多个参数为 AND 关系。返回 {list:[]} 以兼容前端。
description: 支持 kw/page/size/categoryId/templateId 以及模板参数过滤。模板参数以 param_ 前缀传入,如 param_颜色=黑、param_内径=10当某字段在其对应模板中配置为可模糊查询(仅 number 类型)时,按 [v-tol, v+tol]下限截断为0进行行级匹配否则等值。未提供 templateId 亦会启用行级模糊(按每行 template_id 判定)。返回 {list:[]} 以兼容前端。
parameters:
- in: query
name: kw
@@ -2546,6 +2556,8 @@ paths:
unit: { type: string, nullable: true }
enumOptions: { type: array, items: { type: string }, nullable: true }
searchable: { type: boolean }
fuzzySearchable: { type: boolean, description: '仅 type=number 生效' }
fuzzyTolerance: { type: number, nullable: true, description: '容差;为空使用平台默认' }
dedupeParticipate: { type: boolean }
sortOrder: { type: integer }
responses: { '200': { description: 成功 } }
@@ -2597,6 +2609,8 @@ paths:
unit: { type: string, nullable: true }
enumOptions: { type: array, items: { type: string }, nullable: true }
searchable: { type: boolean }
fuzzySearchable: { type: boolean, description: '仅 type=number 生效' }
fuzzyTolerance: { type: number, nullable: true, description: '容差;为空使用平台默认' }
dedupeParticipate: { type: boolean }
sortOrder: { type: integer }
responses: { '200': { description: 成功 } }