81 lines
1.5 KiB
Markdown
81 lines
1.5 KiB
Markdown
|
|
# ServerBillService
|
|||
|
|
> 服务账单相关服务
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## countAllServerBills
|
|||
|
|
> 查询服务账单数量
|
|||
|
|
|
|||
|
|
- 角色:`admin`, `user`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/ServerBillService/countAllServerBills`
|
|||
|
|
- RPC:`rpc countAllServerBills(CountAllServerBillsRequest) returns (RPCCountResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`CountAllServerBillsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"userId": "int64 // 用户ID",
|
|||
|
|
"month": "string"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`RPCCountResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"count": "int64 // 数量"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/ServerBillService/countAllServerBills" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## listServerBills
|
|||
|
|
> 查询服务账单列表
|
|||
|
|
|
|||
|
|
- 角色:`admin`, `user`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/ServerBillService/listServerBills`
|
|||
|
|
- RPC:`rpc listServerBills(ListServerBillsRequest) returns (ListServerBillsResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`ListServerBillsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"userId": "int64 // 用户ID",
|
|||
|
|
"month": "string",
|
|||
|
|
"offset": "int64 // 读取位置",
|
|||
|
|
"size": "int64 // 数量,通常不能小于0"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`ListServerBillsResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"serverBills": "[]ServerBill"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/ServerBillService/listServerBills" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|