Initial commit: One Pipe System
完整的管理系统,包含账户管理、卡片管理、套餐管理、财务管理等功能模块。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
378
docs/新功能.md
Normal file
378
docs/新功能.md
Normal file
@@ -0,0 +1,378 @@
|
||||
# 在账号管理下面新增一个平台账号, 然后需要写页面对接API, 页面样式可以参考/system/account 都需要token认证 逻辑啥的跟/system/account差不多
|
||||
|
||||
## 1. 平台账号列表
|
||||
|
||||
```json
|
||||
"url": "/api/admin/platform-accounts",
|
||||
"methods": "GET",
|
||||
Query 参数:
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* 每页数量
|
||||
*/
|
||||
page_size?: number;
|
||||
/**
|
||||
* 手机号模糊查询
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 状态 (0:禁用, 1:启用)
|
||||
*/
|
||||
status?: number | null;
|
||||
/**
|
||||
* 用户名模糊查询
|
||||
*/
|
||||
username?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
返回响应
|
||||
/**
|
||||
* ModelAccountPageResult
|
||||
*/
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* 账号列表
|
||||
*/
|
||||
items?: ModelAccountResponse[] | null;
|
||||
/**
|
||||
* 当前页码
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* 每页数量
|
||||
*/
|
||||
size?: number;
|
||||
/**
|
||||
* 总记录数
|
||||
*/
|
||||
total?: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* ModelAccountResponse
|
||||
*/
|
||||
export interface ModelAccountResponse {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
creator?: number;
|
||||
/**
|
||||
* 关联企业ID
|
||||
*/
|
||||
enterprise_id?: number | null;
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 关联店铺ID
|
||||
*/
|
||||
shop_id?: number | null;
|
||||
/**
|
||||
* 状态 (0:禁用, 1:启用)
|
||||
*/
|
||||
status?: number;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
updater?: number;
|
||||
/**
|
||||
* 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||||
*/
|
||||
user_type?: number;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
username?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"created_at": "string",
|
||||
"creator": 0,
|
||||
"enterprise_id": 0,
|
||||
"id": 0,
|
||||
"phone": "string",
|
||||
"shop_id": 0,
|
||||
"status": 0,
|
||||
"updated_at": "string",
|
||||
"updater": 0,
|
||||
"user_type": 0,
|
||||
"username": "string"
|
||||
}
|
||||
],
|
||||
"page": 0,
|
||||
"size": 0,
|
||||
"total": 0
|
||||
}
|
||||
```
|
||||
|
||||
## 2. 新增平台账号
|
||||
url: /api/admin/platform-accounts,
|
||||
methods: post,
|
||||
Body 参数
|
||||
/**
|
||||
* ModelCreateAccountRequest
|
||||
*/
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* 关联企业ID(企业账号必填)
|
||||
*/
|
||||
enterprise_id?: number | null;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone: string;
|
||||
/**
|
||||
* 关联店铺ID(代理账号必填)
|
||||
*/
|
||||
shop_id?: number | null;
|
||||
/**
|
||||
* 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||||
*/
|
||||
user_type: number;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
username: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
返回响应:
|
||||
/**
|
||||
* ModelAccountResponse
|
||||
*/
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
created_at?: string;
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
creator?: number;
|
||||
/**
|
||||
* 关联企业ID
|
||||
*/
|
||||
enterprise_id?: number | null;
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* 关联店铺ID
|
||||
*/
|
||||
shop_id?: number | null;
|
||||
/**
|
||||
* 状态 (0:禁用, 1:启用)
|
||||
*/
|
||||
status?: number;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updated_at?: string;
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
updater?: number;
|
||||
/**
|
||||
* 用户类型 (1:超级管理员, 2:平台用户, 3:代理账号, 4:企业账号)
|
||||
*/
|
||||
user_type?: number;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
username?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
*
|
||||
{
|
||||
"created_at": "string",
|
||||
"creator": 0,
|
||||
"enterprise_id": 0,
|
||||
"id": 0,
|
||||
"phone": "string",
|
||||
"shop_id": 0,
|
||||
"status": 0,
|
||||
"updated_at": "string",
|
||||
"updater": 0,
|
||||
"user_type": 0,
|
||||
"username": "string"
|
||||
}
|
||||
|
||||
|
||||
|
||||
## 3. 移除角色
|
||||
url: /api/admin/platform-accounts/{account_id}/roles/{role_id}
|
||||
methods: delete
|
||||
path参数:
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
account_id: number;
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
role_id: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
* 返回响应:
|
||||
* {
|
||||
"code": 0,
|
||||
"message": "string",
|
||||
"timestamp": "2019-08-24T14:15:22.123Z"
|
||||
}
|
||||
|
||||
|
||||
## 4. 删除平台账号
|
||||
url: /api/admin/platform-accounts/{id}
|
||||
methods: delete
|
||||
path参数:
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
id: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
响应:
|
||||
* {
|
||||
"code": 0,
|
||||
"message": "string",
|
||||
"timestamp": "2019-08-24T14:15:22.123Z"
|
||||
}
|
||||
|
||||
|
||||
## 5. 获取平台账号详情
|
||||
url: /api/admin/platform-accounts/{id}
|
||||
methods: get
|
||||
响应: {
|
||||
"created_at": "string",
|
||||
"creator": 0,
|
||||
"enterprise_id": 0,
|
||||
"id": 0,
|
||||
"phone": "string",
|
||||
"shop_id": 0,
|
||||
"status": 0,
|
||||
"updated_at": "string",
|
||||
"updater": 0,
|
||||
"user_type": 0,
|
||||
"username": "string"
|
||||
}
|
||||
|
||||
## 6. 编辑平台账号
|
||||
url: /api/admin/platform-accounts/{id}
|
||||
methods: put
|
||||
body:/**
|
||||
* ModelUpdateAccountParams
|
||||
*/
|
||||
export interface ApifoxModel {
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
password?: null | string;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
phone?: null | string;
|
||||
/**
|
||||
* 状态 (0:禁用, 1:启用)
|
||||
*/
|
||||
status?: number | null;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
username?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
响应: {
|
||||
"created_at": "string",
|
||||
"creator": 0,
|
||||
"enterprise_id": 0,
|
||||
"id": 0,
|
||||
"phone": "string",
|
||||
"shop_id": 0,
|
||||
"status": 0,
|
||||
"updated_at": "string",
|
||||
"updater": 0,
|
||||
"user_type": 0,
|
||||
"username": "string"
|
||||
}
|
||||
|
||||
## 7. 修改密码
|
||||
url: /api/admin/platform-accounts/{id}/password
|
||||
methods: put
|
||||
body:{
|
||||
"new_password": "stringst"
|
||||
}
|
||||
response: {
|
||||
"code": 0,
|
||||
"message": "string",
|
||||
"timestamp": "2019-08-24T14:15:22.123Z"
|
||||
}
|
||||
|
||||
|
||||
|
||||
## 8. 获取账号角色
|
||||
url: /api/admin/platform-accounts/{id}/roles
|
||||
methods: get
|
||||
响应: [
|
||||
{
|
||||
"creator": 0,
|
||||
"role_desc": "string",
|
||||
"role_name": "string",
|
||||
"role_type": 0,
|
||||
"status": 0,
|
||||
"updater": 0
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
## 9. 分配角色
|
||||
url: /api/admin/platform-accounts/{id}/roles,
|
||||
methods: post
|
||||
body: {
|
||||
"role_ids": [
|
||||
0
|
||||
]
|
||||
}
|
||||
响应: {
|
||||
"code": 0,
|
||||
"message": "string",
|
||||
"timestamp": "2019-08-24T14:15:22.123Z"
|
||||
}
|
||||
|
||||
|
||||
## 10. 启用/禁用账号
|
||||
url: /api/admin/platform-accounts/{id}/status
|
||||
methods: put,
|
||||
body: {
|
||||
"status": 0
|
||||
}
|
||||
Reference in New Issue
Block a user