# 账号管理下面新增一个代理账号管理, 页面样式可以参考/system/account 都需要token认证 # 代理账号列表 ## OpenAPI Specification ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /api/admin/shop-accounts: 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_id in: query description: 店铺ID过滤 required: false schema: description: 店铺ID过滤 minimum: 1 type: integer nullable: true - name: username in: query description: 用户名(模糊查询) required: false schema: description: 用户名(模糊查询) maxLength: 50 type: string - name: phone in: query description: 手机号(精确查询) required: false schema: description: 手机号(精确查询) maxLength: 11 minLength: 11 type: string - 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/ModelShopAccountPageResult' 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: '-jWpeN1-jYBl-SEBTmsrq' schemeIds: - BearerAuth required: true use: id: '-jWpeN1-jYBl-SEBTmsrq' scopes: '-jWpeN1-jYBl-SEBTmsrq': BearerAuth: [] x-apifox-folder: 代理账号管理 x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366334-run components: schemas: ModelShopAccountPageResult: properties: items: description: 代理账号列表 items: $ref: '#/components/schemas/ModelShopAccountResponse' 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: '' ModelShopAccountResponse: properties: created_at: description: 创建时间 type: string id: description: 账号ID minimum: 0 type: integer phone: description: 手机号 type: string shop_id: description: 店铺ID minimum: 0 type: integer shop_name: description: 店铺名称 type: string status: description: 状态 (0:禁用, 1:启用) type: integer updated_at: description: 更新时间 type: string user_type: description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号) type: integer username: description: 用户名 type: string type: object x-apifox-orders: - created_at - id - phone - shop_id - shop_name - status - updated_at - user_type - username 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 ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /api/admin/shop-accounts: post: summary: 创建代理账号 deprecated: false description: '' tags: - 代理账号管理 - 代理账号管理 parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ModelCreateShopAccountRequest' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ModelShopAccountResponse' 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: LdX0-6IzkTw-pXBT8t4Km schemeIds: - BearerAuth required: true use: id: LdX0-6IzkTw-pXBT8t4Km scopes: LdX0-6IzkTw-pXBT8t4Km: BearerAuth: [] x-apifox-folder: 代理账号管理 x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366335-run components: schemas: ModelCreateShopAccountRequest: properties: password: description: 密码 maxLength: 32 minLength: 8 type: string phone: description: 手机号 maxLength: 11 minLength: 11 type: string shop_id: description: 店铺ID minimum: 1 type: integer username: description: 用户名 maxLength: 50 minLength: 3 type: string required: - password - phone - shop_id - username type: object x-apifox-orders: - password - phone - shop_id - username x-apifox-ignore-properties: [] x-apifox-folder: '' ModelShopAccountResponse: properties: created_at: description: 创建时间 type: string id: description: 账号ID minimum: 0 type: integer phone: description: 手机号 type: string shop_id: description: 店铺ID minimum: 0 type: integer shop_name: description: 店铺名称 type: string status: description: 状态 (0:禁用, 1:启用) type: integer updated_at: description: 更新时间 type: string user_type: description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号) type: integer username: description: 用户名 type: string type: object x-apifox-orders: - created_at - id - phone - shop_id - shop_name - status - updated_at - user_type - username 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 ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /api/admin/shop-accounts/{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/ModelUpdateShopAccountParams' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ModelShopAccountResponse' 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: TTw5I9JG_CJv8tEsi1Bk6 schemeIds: - BearerAuth required: true use: id: TTw5I9JG_CJv8tEsi1Bk6 scopes: TTw5I9JG_CJv8tEsi1Bk6: BearerAuth: [] x-apifox-folder: 代理账号管理 x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366336-run components: schemas: ModelUpdateShopAccountParams: properties: username: description: 用户名 maxLength: 50 minLength: 3 type: string required: - username type: object x-apifox-orders: - username x-apifox-ignore-properties: [] x-apifox-folder: '' ModelShopAccountResponse: properties: created_at: description: 创建时间 type: string id: description: 账号ID minimum: 0 type: integer phone: description: 手机号 type: string shop_id: description: 店铺ID minimum: 0 type: integer shop_name: description: 店铺名称 type: string status: description: 状态 (0:禁用, 1:启用) type: integer updated_at: description: 更新时间 type: string user_type: description: 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号) type: integer username: description: 用户名 type: string type: object x-apifox-orders: - created_at - id - phone - shop_id - shop_name - status - updated_at - user_type - username 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 ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /api/admin/shop-accounts/{id}/password: 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/ModelUpdateShopAccountPasswordParams' 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: IeBLfzHchBWHbFru7Ma0u schemeIds: - BearerAuth required: true use: id: IeBLfzHchBWHbFru7Ma0u scopes: IeBLfzHchBWHbFru7Ma0u: BearerAuth: [] x-apifox-folder: 代理账号管理 x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366337-run components: schemas: ModelUpdateShopAccountPasswordParams: properties: new_password: description: 新密码 maxLength: 32 minLength: 8 type: string required: - new_password type: object x-apifox-orders: - new_password 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 ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /api/admin/shop-accounts/{id}/status: 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/ModelUpdateShopAccountStatusParams' 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: QRYgZh2IcZgAVmdF1dNBU schemeIds: - BearerAuth required: true use: id: QRYgZh2IcZgAVmdF1dNBU scopes: QRYgZh2IcZgAVmdF1dNBU: BearerAuth: [] x-apifox-folder: 代理账号管理 x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/7591618/apis/api-408366338-run components: schemas: ModelUpdateShopAccountStatusParams: properties: status: description: 状态 (0:禁用, 1:启用) type: integer required: - status type: object x-apifox-orders: - status 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: [] ```