完整的管理系统,包含账户管理、卡片管理、套餐管理、财务管理等功能模块。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
21 KiB
21 KiB
在商品管理 /account-management 下面新增一个 店铺管理 需要对接的API如下, 然后页面样式可以参考 /account-management/account
店铺列表
OpenAPI Specification
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/api/admin/shops:
get:
summary: 店铺列表
deprecated: false
description: ''
tags:
- 店铺管理
- 店铺管理
parameters:
- name: page
in: query
description: 页码
required: false
schema:
description: 页码
minimum: 1
type: integer
- name: page_size
in: query
description: 每页数量
required: false
schema:
description: 每页数量
maximum: 100
minimum: 1
type: integer
- name: shop_name
in: query
description: 店铺名称模糊查询
required: false
schema:
description: 店铺名称模糊查询
maxLength: 100
type: string
- name: shop_code
in: query
description: 店铺编号模糊查询
required: false
schema:
description: 店铺编号模糊查询
maxLength: 50
type: string
- name: parent_id
in: query
description: 上级店铺ID
required: false
schema:
description: 上级店铺ID
minimum: 1
type: integer
nullable: true
- name: level
in: query
description: 店铺层级 (1-7级)
required: false
schema:
description: 店铺层级 (1-7级)
maximum: 7
minimum: 1
type: integer
nullable: true
- name: status
in: query
description: 状态 (0:禁用, 1:启用)
required: false
schema:
description: 状态 (0:禁用, 1:启用)
type: integer
nullable: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ModelShopPageResult'
headers: {}
x-apifox-name: ''
'400':
description: 请求参数错误
content:
application/json:
schema: &ref_0
$ref: '#/components/schemas/ErrorResponse'
headers: {}
x-apifox-name: ''
'401':
description: 未认证或认证已过期
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'403':
description: 无权访问
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'500':
description: 服务器内部错误
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
security:
- BearerAuth: []
x-apifox:
schemeGroups:
- id: AiK0MKfrzIq2Np2gS4yVd
schemeIds:
- BearerAuth
required: true
use:
id: AiK0MKfrzIq2Np2gS4yVd
scopes:
AiK0MKfrzIq2Np2gS4yVd:
BearerAuth: []
x-apifox-folder: 店铺管理
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366339-run
components:
schemas:
ModelShopPageResult:
properties:
items:
description: 店铺列表
items:
$ref: '#/components/schemas/ModelShopResponse'
type: array
nullable: true
page:
description: 当前页码
type: integer
size:
description: 每页数量
type: integer
total:
description: 总记录数
type: integer
type: object
x-apifox-orders:
- items
- page
- size
- total
x-apifox-ignore-properties: []
x-apifox-folder: ''
ModelShopResponse:
properties:
address:
description: 详细地址
type: string
city:
description: 城市
type: string
contact_name:
description: 联系人姓名
type: string
contact_phone:
description: 联系人电话
type: string
created_at:
description: 创建时间
type: string
district:
description: 区县
type: string
id:
description: 店铺ID
minimum: 0
type: integer
level:
description: 店铺层级 (1-7级)
type: integer
parent_id:
description: 上级店铺ID
minimum: 0
type: integer
nullable: true
province:
description: 省份
type: string
shop_code:
description: 店铺编号
type: string
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
updated_at:
description: 更新时间
type: string
type: object
x-apifox-orders:
- address
- city
- contact_name
- contact_phone
- created_at
- district
- id
- level
- parent_id
- province
- shop_code
- shop_name
- status
- updated_at
x-apifox-ignore-properties: []
x-apifox-folder: ''
ErrorResponse:
properties:
code:
description: 错误码
type: integer
message:
description: 错误消息
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- message
- timestamp
type: object
x-apifox-orders:
- code
- message
- timestamp
x-apifox-ignore-properties: []
x-apifox-folder: ''
securitySchemes:
BearerAuth:
bearerFormat: JWT
scheme: bearer
type: jwt
servers:
- url: https://cmp-api.boss160.cn
description: 测试环境
security: []
创建店铺
OpenAPI Specification
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/api/admin/shops:
post:
summary: 创建店铺
deprecated: false
description: ''
tags:
- 店铺管理
- 店铺管理
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ModelCreateShopRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ModelShopResponse'
headers: {}
x-apifox-name: ''
'400':
description: 请求参数错误
content:
application/json:
schema: &ref_0
$ref: '#/components/schemas/ErrorResponse'
headers: {}
x-apifox-name: ''
'401':
description: 未认证或认证已过期
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'403':
description: 无权访问
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'500':
description: 服务器内部错误
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
security:
- BearerAuth: []
x-apifox:
schemeGroups:
- id: CgtLTd_zQ5XPrx3y7BdLh
schemeIds:
- BearerAuth
required: true
use:
id: CgtLTd_zQ5XPrx3y7BdLh
scopes:
CgtLTd_zQ5XPrx3y7BdLh:
BearerAuth: []
x-apifox-folder: 店铺管理
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366340-run
components:
schemas:
ModelCreateShopRequest:
properties:
address:
description: 详细地址
maxLength: 255
type: string
city:
description: 城市
maxLength: 50
type: string
contact_name:
description: 联系人姓名
maxLength: 50
type: string
contact_phone:
description: 联系人电话
maxLength: 11
minLength: 11
type: string
district:
description: 区县
maxLength: 50
type: string
init_password:
description: 初始账号密码
maxLength: 32
minLength: 8
type: string
init_phone:
description: 初始账号手机号
maxLength: 11
minLength: 11
type: string
init_username:
description: 初始账号用户名
maxLength: 50
minLength: 3
type: string
parent_id:
description: 上级店铺ID(一级店铺可不填)
minimum: 1
type: integer
nullable: true
province:
description: 省份
maxLength: 50
type: string
shop_code:
description: 店铺编号
maxLength: 50
minLength: 1
type: string
shop_name:
description: 店铺名称
maxLength: 100
minLength: 1
type: string
required:
- init_password
- init_phone
- init_username
- shop_code
- shop_name
type: object
x-apifox-orders:
- address
- city
- contact_name
- contact_phone
- district
- init_password
- init_phone
- init_username
- parent_id
- province
- shop_code
- shop_name
x-apifox-ignore-properties: []
x-apifox-folder: ''
ModelShopResponse:
properties:
address:
description: 详细地址
type: string
city:
description: 城市
type: string
contact_name:
description: 联系人姓名
type: string
contact_phone:
description: 联系人电话
type: string
created_at:
description: 创建时间
type: string
district:
description: 区县
type: string
id:
description: 店铺ID
minimum: 0
type: integer
level:
description: 店铺层级 (1-7级)
type: integer
parent_id:
description: 上级店铺ID
minimum: 0
type: integer
nullable: true
province:
description: 省份
type: string
shop_code:
description: 店铺编号
type: string
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
updated_at:
description: 更新时间
type: string
type: object
x-apifox-orders:
- address
- city
- contact_name
- contact_phone
- created_at
- district
- id
- level
- parent_id
- province
- shop_code
- shop_name
- status
- updated_at
x-apifox-ignore-properties: []
x-apifox-folder: ''
ErrorResponse:
properties:
code:
description: 错误码
type: integer
message:
description: 错误消息
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- message
- timestamp
type: object
x-apifox-orders:
- code
- message
- timestamp
x-apifox-ignore-properties: []
x-apifox-folder: ''
securitySchemes:
BearerAuth:
bearerFormat: JWT
scheme: bearer
type: jwt
servers:
- url: https://cmp-api.boss160.cn
description: 测试环境
security: []
删除店铺
OpenAPI Specification
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/api/admin/shops/{id}:
delete:
summary: 删除店铺
deprecated: false
description: ''
tags:
- 店铺管理
- 店铺管理
parameters:
- name: id
in: path
description: ID
required: true
example: 0
schema:
description: ID
minimum: 0
type: integer
responses:
'400':
description: 请求参数错误
content:
application/json:
schema: &ref_0
$ref: '#/components/schemas/ErrorResponse'
headers: {}
x-apifox-name: ''
'401':
description: 未认证或认证已过期
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'403':
description: 无权访问
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'500':
description: 服务器内部错误
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
security:
- BearerAuth: []
x-apifox:
schemeGroups:
- id: ivp0VlbXbNhnY2xcsCWbS
schemeIds:
- BearerAuth
required: true
use:
id: ivp0VlbXbNhnY2xcsCWbS
scopes:
ivp0VlbXbNhnY2xcsCWbS:
BearerAuth: []
x-apifox-folder: 店铺管理
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366341-run
components:
schemas:
ErrorResponse:
properties:
code:
description: 错误码
type: integer
message:
description: 错误消息
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- message
- timestamp
type: object
x-apifox-orders:
- code
- message
- timestamp
x-apifox-ignore-properties: []
x-apifox-folder: ''
securitySchemes:
BearerAuth:
bearerFormat: JWT
scheme: bearer
type: jwt
servers:
- url: https://cmp-api.boss160.cn
description: 测试环境
security: []
更新店铺
OpenAPI Specification
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/api/admin/shops/{id}:
put:
summary: 更新店铺
deprecated: false
description: ''
tags:
- 店铺管理
- 店铺管理
parameters:
- name: id
in: path
description: ID
required: true
example: 0
schema:
description: ID
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ModelUpdateShopParams'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ModelShopResponse'
headers: {}
x-apifox-name: ''
'400':
description: 请求参数错误
content:
application/json:
schema: &ref_0
$ref: '#/components/schemas/ErrorResponse'
headers: {}
x-apifox-name: ''
'401':
description: 未认证或认证已过期
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'403':
description: 无权访问
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
'500':
description: 服务器内部错误
content:
application/json:
schema: *ref_0
headers: {}
x-apifox-name: ''
security:
- BearerAuth: []
x-apifox:
schemeGroups:
- id: 2BoHA3GVAX6-zd8XmFxez
schemeIds:
- BearerAuth
required: true
use:
id: 2BoHA3GVAX6-zd8XmFxez
scopes:
2BoHA3GVAX6-zd8XmFxez:
BearerAuth: []
x-apifox-folder: 店铺管理
x-apifox-status: released
x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366342-run
components:
schemas:
ModelUpdateShopParams:
properties:
address:
description: 详细地址
maxLength: 255
type: string
city:
description: 城市
maxLength: 50
type: string
contact_name:
description: 联系人姓名
maxLength: 50
type: string
contact_phone:
description: 联系人电话
maxLength: 11
minLength: 11
type: string
district:
description: 区县
maxLength: 50
type: string
province:
description: 省份
maxLength: 50
type: string
shop_name:
description: 店铺名称
maxLength: 100
minLength: 1
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
required:
- shop_name
- status
type: object
x-apifox-orders:
- address
- city
- contact_name
- contact_phone
- district
- province
- shop_name
- status
x-apifox-ignore-properties: []
x-apifox-folder: ''
ModelShopResponse:
properties:
address:
description: 详细地址
type: string
city:
description: 城市
type: string
contact_name:
description: 联系人姓名
type: string
contact_phone:
description: 联系人电话
type: string
created_at:
description: 创建时间
type: string
district:
description: 区县
type: string
id:
description: 店铺ID
minimum: 0
type: integer
level:
description: 店铺层级 (1-7级)
type: integer
parent_id:
description: 上级店铺ID
minimum: 0
type: integer
nullable: true
province:
description: 省份
type: string
shop_code:
description: 店铺编号
type: string
shop_name:
description: 店铺名称
type: string
status:
description: 状态 (0:禁用, 1:启用)
type: integer
updated_at:
description: 更新时间
type: string
type: object
x-apifox-orders:
- address
- city
- contact_name
- contact_phone
- created_at
- district
- id
- level
- parent_id
- province
- shop_code
- shop_name
- status
- updated_at
x-apifox-ignore-properties: []
x-apifox-folder: ''
ErrorResponse:
properties:
code:
description: 错误码
type: integer
message:
description: 错误消息
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- message
- timestamp
type: object
x-apifox-orders:
- code
- message
- timestamp
x-apifox-ignore-properties: []
x-apifox-folder: ''
securitySchemes:
BearerAuth:
bearerFormat: JWT
scheme: bearer
type: jwt
servers:
- url: https://cmp-api.boss160.cn
description: 测试环境
security: []