1
This commit is contained in:
228
doc/openapi.yaml
228
doc/openapi.yaml
@@ -361,6 +361,7 @@ paths:
|
||||
/api/product-categories:
|
||||
get:
|
||||
summary: 类别列表(✅ Fully Implemented)
|
||||
description: 仅返回全局字典(shop_id=0)的类别列表。
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
@@ -412,6 +413,7 @@ paths:
|
||||
/api/product-units:
|
||||
get:
|
||||
summary: 单位列表(✅ Fully Implemented)
|
||||
description: 仅返回全局字典(shop_id=0)的单位列表。
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
@@ -944,8 +946,234 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
/api/auth/register:
|
||||
post:
|
||||
summary: 手机号注册创建店铺与店主(✅ Fully Implemented)
|
||||
description: |
|
||||
直接提交手机号进行注册:若手机号尚不存在,则创建店铺与店主用户(owner,`users.is_owner=1`),并初始化默认账户(现金/银行存款/微信)。
|
||||
若手机号已存在,则直接签发 JWT 并返回用户/店铺信息。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
phone: { type: string }
|
||||
name: { type: string, nullable: true }
|
||||
password: { type: string, nullable: true, description: '预留字段,当前不校验' }
|
||||
required: [phone]
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
token: { type: string }
|
||||
expiresIn: { type: integer }
|
||||
user:
|
||||
type: object
|
||||
properties:
|
||||
userId: { type: integer }
|
||||
shopId: { type: integer }
|
||||
phone: { type: string }
|
||||
/api/admin/vips:
|
||||
get:
|
||||
summary: 管理端-会员列表(❌ Partially Implemented)
|
||||
description: 返回店铺会员(或待启用)列表,基于 `vip_users` 表。
|
||||
parameters:
|
||||
- in: query
|
||||
name: phone
|
||||
schema: { type: string }
|
||||
- in: query
|
||||
name: page
|
||||
schema: { type: integer, default: 1 }
|
||||
- in: query
|
||||
name: size
|
||||
schema: { type: integer, default: 20 }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
list:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/VipUser'
|
||||
total: { type: integer }
|
||||
post:
|
||||
summary: 管理端-新增/申请会员(❌ Partially Implemented)
|
||||
description: 向 `vip_users` 插入一条记录,支持作为“申请”进入待启用状态。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateVipUserRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
/api/admin/vips/{id}:
|
||||
put:
|
||||
summary: 管理端-更新会员(❌ Partially Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UpdateVipUserRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
/api/admin/vips/{id}/approve:
|
||||
post:
|
||||
summary: 管理端-审核通过VIP(❌ Partially Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
responses:
|
||||
'200': { description: 成功 }
|
||||
/api/admin/vips/{id}/reject:
|
||||
post:
|
||||
summary: 管理端-审核驳回VIP(❌ Partially Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
responses:
|
||||
'200': { description: 成功 }
|
||||
/api/admin/dicts/units:
|
||||
post:
|
||||
summary: 管理端-新增主单位(✅ Fully Implemented)
|
||||
description: 仅平台管理员可用;写入 `shop_id=0` 全局字典。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name: { type: string }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
/api/admin/dicts/units/{id}:
|
||||
put:
|
||||
summary: 管理端-更新主单位(✅ Fully Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name: { type: string }
|
||||
responses: { '200': { description: 成功 } }
|
||||
delete:
|
||||
summary: 管理端-删除主单位(✅ Fully Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
responses: { '200': { description: 成功 } }
|
||||
/api/admin/dicts/categories:
|
||||
post:
|
||||
summary: 管理端-新增主类别(✅ Fully Implemented)
|
||||
description: 仅平台管理员可用;写入 `shop_id=0` 全局字典。
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name: { type: string }
|
||||
responses:
|
||||
'200':
|
||||
description: 成功
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
/api/admin/dicts/categories/{id}:
|
||||
put:
|
||||
summary: 管理端-更新主类别(✅ Fully Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name: { type: string }
|
||||
responses: { '200': { description: 成功 } }
|
||||
delete:
|
||||
summary: 管理端-删除主类别(✅ Fully Implemented)
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema: { type: integer, format: int64 }
|
||||
responses: { '200': { description: 成功 } }
|
||||
components:
|
||||
schemas:
|
||||
VipUser:
|
||||
type: object
|
||||
properties:
|
||||
id: { type: integer, format: int64 }
|
||||
userId: { type: integer, format: int64 }
|
||||
isVip: { type: integer, enum: [0,1] }
|
||||
status: { type: integer, enum: [0,1] }
|
||||
expireAt: { type: string, format: date-time, nullable: true }
|
||||
remark: { type: string, nullable: true }
|
||||
reviewerId: { type: integer, format: int64, nullable: true }
|
||||
reviewedAt: { type: string, format: date-time, nullable: true }
|
||||
CreateVipUserRequest:
|
||||
type: object
|
||||
properties:
|
||||
userId: { type: integer, format: int64 }
|
||||
isVip: { type: integer, enum: [0,1], default: 1 }
|
||||
expireAt: { type: string, format: date-time, nullable: true }
|
||||
remark: { type: string, nullable: true }
|
||||
UpdateVipUserRequest:
|
||||
type: object
|
||||
properties:
|
||||
isVip: { type: integer, enum: [0,1] }
|
||||
status: { type: integer, enum: [0,1] }
|
||||
expireAt: { type: string, format: date-time, nullable: true }
|
||||
remark: { type: string, nullable: true }
|
||||
DashboardOverview:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user