3
This commit is contained in:
@@ -728,6 +728,30 @@ paths:
|
||||
responses:
|
||||
'200': { description: 成功 }
|
||||
|
||||
/api/normal-admin/application/status:
|
||||
get:
|
||||
summary: 普通管理员-本人申请状态查询(✅ Fully Implemented)
|
||||
description: 返回当前用户最近一次申请状态与是否已具备普通管理员权限。
|
||||
parameters:
|
||||
- in: header
|
||||
name: X-User-Id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
description: 当前登录用户ID
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
isNormalAdmin: { type: boolean }
|
||||
applicationStatus: { type: string, enum: [none, pending, approved, rejected, revoked] }
|
||||
lastAction: { type: string, nullable: true }
|
||||
lastActionAt: { type: string, format: date-time, nullable: true }
|
||||
lastRemark: { type: string, nullable: true }
|
||||
|
||||
/api/admin/normal-admin/applications:
|
||||
get:
|
||||
summary: 平台-普通管理员申请列表(❌ Partially Implemented)
|
||||
@@ -1149,12 +1173,18 @@ paths:
|
||||
/api/products:
|
||||
get:
|
||||
summary: 商品搜索(✅ Fully Implemented)
|
||||
description: 支持 kw/page/size/categoryId;返回 {list:[]} 以兼容前端。
|
||||
description: 支持 kw/page/size/categoryId/templateId 以及模板参数过滤。模板参数以 param_ 前缀传入,如 param_颜色=黑、param_内径=10;后端对 JSON attributes 进行 LIKE 匹配(字符串化),多个参数为 AND 关系。返回 {list:[]} 以兼容前端。
|
||||
parameters:
|
||||
- in: query
|
||||
name: kw
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: categoryId
|
||||
schema: { type: integer, format: int64 }
|
||||
- in: query
|
||||
name: templateId
|
||||
schema: { type: integer, format: int64 }
|
||||
- in: query
|
||||
name: page
|
||||
schema:
|
||||
@@ -1165,6 +1195,11 @@ paths:
|
||||
schema:
|
||||
type: integer
|
||||
default: 50
|
||||
- in: query
|
||||
name: param_*
|
||||
schema:
|
||||
type: string
|
||||
description: 模板参数过滤,星号代表任意模板参数键;示例 param_颜色=黑
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
@@ -1204,11 +1239,16 @@ paths:
|
||||
/api/products/{id}:
|
||||
get:
|
||||
summary: 商品详情(✅ Fully Implemented)
|
||||
description: 默认对软删记录返回 404;仅当 includeDeleted=true 时返回已软删详情(仅管理端使用)。
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer }
|
||||
- in: query
|
||||
name: includeDeleted
|
||||
required: false
|
||||
schema: { type: boolean, default: false }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
@@ -2232,7 +2272,6 @@ paths:
|
||||
spec: { type: string, nullable: true }
|
||||
origin: { type: string, nullable: true }
|
||||
barcode: { type: string, nullable: true }
|
||||
unitId: { type: integer, format: int64, nullable: true }
|
||||
categoryId: { type: integer, format: int64, nullable: true }
|
||||
parameters: { type: object, additionalProperties: true, nullable: true }
|
||||
images:
|
||||
@@ -2311,7 +2350,6 @@ paths:
|
||||
spec: { type: string, nullable: true }
|
||||
origin: { type: string, nullable: true }
|
||||
barcode: { type: string, nullable: true }
|
||||
unitId: { type: integer, format: int64, nullable: true }
|
||||
categoryId: { type: integer, format: int64, nullable: true }
|
||||
parameters: { type: object, additionalProperties: true, nullable: true }
|
||||
images:
|
||||
@@ -2401,7 +2439,6 @@ paths:
|
||||
name: { type: string, nullable: true }
|
||||
brand: { type: string, nullable: true }
|
||||
spec: { type: string, nullable: true }
|
||||
unitId: { type: integer, format: int64, nullable: true }
|
||||
categoryId: { type: integer, format: int64, nullable: true }
|
||||
parameters: { type: object, additionalProperties: true, nullable: true }
|
||||
images:
|
||||
@@ -2482,7 +2519,7 @@ paths:
|
||||
|
||||
/api/admin/part-templates:
|
||||
get:
|
||||
summary: 管理端-模板列表(❌ Partially Implemented)
|
||||
summary: 管理端-模板列表(✅ Fully Implemented)
|
||||
responses: { '200': { description: 成功 } }
|
||||
post:
|
||||
summary: 管理端-创建模板(❌ Partially Implemented)
|
||||
@@ -2514,11 +2551,27 @@ paths:
|
||||
responses: { '200': { description: 成功 } }
|
||||
/api/admin/part-templates/{id}:
|
||||
get:
|
||||
summary: 管理端-模板详情(❌ Partially Implemented)
|
||||
summary: 管理端-模板详情(✅ Fully Implemented)
|
||||
parameters: [ { in: path, name: id, required: true, schema: { type: integer, format: int64 } } ]
|
||||
responses: { '200': { description: 成功 } }
|
||||
put:
|
||||
summary: 管理端-更新模板(❌ Partially Implemented)
|
||||
delete:
|
||||
summary: 管理端-删除模板(软删除,✅ Fully Implemented)
|
||||
description: |-
|
||||
默认行为:软删除(隐藏)——仅将 `part_templates.status` 置为 0,前台列表默认不再显示。
|
||||
强制模式:`force=true` 时,执行永久删除:删除参数定义并清理关联商品(软删)与提交(软删),最后删除模板记录。
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
- in: query
|
||||
name: force
|
||||
required: false
|
||||
schema: { type: boolean }
|
||||
responses:
|
||||
'200': { description: 成功 }
|
||||
parameters: [ { in: path, name: id, required: true, schema: { type: integer, format: int64 } } ]
|
||||
requestBody:
|
||||
required: true
|
||||
|
||||
Reference in New Issue
Block a user