# TrafficPackagePriceService
> 流量包价格服务

---

## countTrafficPackagePrices
> 计算流量包价格项数量

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/TrafficPackagePriceService/countTrafficPackagePrices`
- RPC：`rpc countTrafficPackagePrices(CountTrafficPackagePricesRequest) returns (RPCCountResponse);`

**请求对象 (`CountTrafficPackagePricesRequest`)**

```json
{
  "trafficPackageId": "int64"
}
```

**响应对象 (`RPCCountResponse`)**

```json
{
  "count": "int64 // 数量"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/TrafficPackagePriceService/countTrafficPackagePrices" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findAllTrafficPackagePrices
> 查找所有流量包价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/TrafficPackagePriceService/findAllTrafficPackagePrices`
- RPC：`rpc findAllTrafficPackagePrices(FindAllTrafficPackagePricesRequest) returns (FindAllTrafficPackagePricesResponse);`

**请求对象 (`FindAllTrafficPackagePricesRequest`)**

```json
{}
```

**响应对象 (`FindAllTrafficPackagePricesResponse`)**

```json
{
  "trafficPackagePrices": "[]TrafficPackagePrice"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/TrafficPackagePriceService/findAllTrafficPackagePrices" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findTrafficPackagePrice
> 获取单个流量包具体价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/TrafficPackagePriceService/findTrafficPackagePrice`
- RPC：`rpc findTrafficPackagePrice(FindTrafficPackagePriceRequest) returns (FindTrafficPackagePriceResponse);`

**请求对象 (`FindTrafficPackagePriceRequest`)**

```json
{
  "trafficPackageId": "int64",
  "nodeRegionId": "int64",
  "trafficPackagePeriodId": "int64",
  "count": "int32 // 数量"
}
```

**响应对象 (`FindTrafficPackagePriceResponse`)**

```json
{
  "price": "double // 单价",
  "amount": "double // 总价"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/TrafficPackagePriceService/findTrafficPackagePrice" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findTrafficPackagePrices
> 查找流量包价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/TrafficPackagePriceService/findTrafficPackagePrices`
- RPC：`rpc findTrafficPackagePrices(FindTrafficPackagePricesRequest) returns (FindTrafficPackagePricesResponse);`

**请求对象 (`FindTrafficPackagePricesRequest`)**

```json
{
  "trafficPackageId": "int64"
}
```

**响应对象 (`FindTrafficPackagePricesResponse`)**

```json
{
  "trafficPackagePrices": "[]TrafficPackagePrice"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/TrafficPackagePriceService/findTrafficPackagePrices" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## updateTrafficPackagePrice
> 设置流量包价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/TrafficPackagePriceService/updateTrafficPackagePrice`
- RPC：`rpc updateTrafficPackagePrice(UpdateTrafficPackagePriceRequest) returns (RPCSuccess);`

**请求对象 (`UpdateTrafficPackagePriceRequest`)**

```json
{
  "trafficPackageId": "int64",
  "nodeRegionId": "int64",
  "trafficPackagePeriodId": "int64",
  "price": "double"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/TrafficPackagePriceService/updateTrafficPackagePrice" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
