4
This commit is contained in:
@@ -394,6 +394,8 @@
|
||||
| unit | VARCHAR(32) | YES | | 单位(文本) |
|
||||
| enum_options | JSON | YES | | 枚举项(type=enum) |
|
||||
| searchable | TINYINT(1) | NOT NULL | 0 | 参与检索 |
|
||||
| fuzzy_searchable | TINYINT(1) | NOT NULL | 0 | 可模糊查询(仅数值型) |
|
||||
| fuzzy_tolerance | DECIMAL(18,6) | YES | | 容差;NULL 使用平台默认 |
|
||||
| dedupe_participate | TINYINT(1) | NOT NULL | 0 | 参与去重键 |
|
||||
| sort_order | INT | NOT NULL | 0 | |
|
||||
| created_at | TIMESTAMP | NOT NULL | CURRENT_TIMESTAMP | |
|
||||
|
||||
@@ -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: 成功 } }
|
||||
|
||||
Reference in New Issue
Block a user