# ADPackagePriceService
> 高防产品价格服务

---

## countADPackagePrices
> 计算高防产品价格项数量

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADPackagePriceService/countADPackagePrices`
- RPC：`rpc countADPackagePrices(CountADPackagePricesRequest) returns (RPCCountResponse);`

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

```json
{
  "adPackageId": "int64"
}
```

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

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

**调用示例**

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

---

## findADPackagePrice
> 获取单个高防产品具体价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADPackagePriceService/findADPackagePrice`
- RPC：`rpc findADPackagePrice(FindADPackagePriceRequest) returns (FindADPackagePriceResponse);`

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

```json
{
  "adPackageId": "int64",
  "adPackagePeriodId": "int64",
  "count": "int32 // 数量"
}
```

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

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

**调用示例**

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

---

## findADPackagePrices
> 查找高防产品价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADPackagePriceService/findADPackagePrices`
- RPC：`rpc findADPackagePrices(FindADPackagePricesRequest) returns (FindADPackagePricesResponse);`

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

```json
{
  "adPackageId": "int64"
}
```

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

```json
{
  "adPackagePrices": "[]ADPackagePrice"
}
```

**调用示例**

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

---

## findAllADPackagePrices
> 查找所有高防产品价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADPackagePriceService/findAllADPackagePrices`
- RPC：`rpc findAllADPackagePrices(FindAllADPackagePricesRequest) returns (FindAllADPackagePricesResponse);`

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

```json
{}
```

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

```json
{
  "adPackagePrices": "[]ADPackagePrice"
}
```

**调用示例**

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

---

## updateADPackagePrice
> 设置高防产品价格

- 角色：`admin`
- HTTP：`POST https://backend.dooki.cloud/ADPackagePriceService/updateADPackagePrice`
- RPC：`rpc updateADPackagePrice(UpdateADPackagePriceRequest) returns (RPCSuccess);`

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

```json
{
  "adPackageId": "int64",
  "adPackagePeriodId": "int64",
  "price": "double"
}
```

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

```json
{}
```

**调用示例**

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

---
