115 lines
2.5 KiB
Markdown
115 lines
2.5 KiB
Markdown
|
|
# NSRecordHourlyStatService
|
|||
|
|
> NS记录小时统计
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## findLatestNSRecordsHourlyStats
|
|||
|
|
> 获取单个记录24小时内的统计
|
|||
|
|
|
|||
|
|
- 角色:`admin`, `user`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NSRecordHourlyStatService/findLatestNSRecordsHourlyStats`
|
|||
|
|
- RPC:`rpc findLatestNSRecordsHourlyStats(FindLatestNSRecordsHourlyStatsRequest) returns (FindLatestNSRecordsHourlyStatsResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`FindLatestNSRecordsHourlyStatsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nsRecordId": "int64 // 记录ID"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`FindLatestNSRecordsHourlyStatsResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nsRecordHourlyStats": "[]NSRecordHourlyStat"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NSRecordHourlyStatService/findLatestNSRecordsHourlyStats" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## findNSRecordHourlyStat
|
|||
|
|
> 获取单个记录单个小时的统计
|
|||
|
|
|
|||
|
|
- 角色:`admin`, `user`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NSRecordHourlyStatService/findNSRecordHourlyStat`
|
|||
|
|
- RPC:`rpc findNSRecordHourlyStat(FindNSRecordHourlyStatRequest) returns (FindNSRecordHourlyStatResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`FindNSRecordHourlyStatRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nsRecordId": "int64 // 记录ID",
|
|||
|
|
"hour": "string // YYYYMMDDHH"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`FindNSRecordHourlyStatResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nsRecordHourlyStat": "NSRecordHourlyStat"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NSRecordHourlyStatService/findNSRecordHourlyStat" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
## findNSRecordHourlyStatWithRecordIds
|
|||
|
|
> 批量获取一组记录的统计
|
|||
|
|
|
|||
|
|
- 角色:`admin`, `user`
|
|||
|
|
- HTTP:`POST https://backend.dooki.cloud/NSRecordHourlyStatService/findNSRecordHourlyStatWithRecordIds`
|
|||
|
|
- RPC:`rpc findNSRecordHourlyStatWithRecordIds(FindNSRecordHourlyStatWithRecordIdsRequest) returns (FindNSRecordHourlyStatWithRecordIdsResponse);`
|
|||
|
|
|
|||
|
|
**请求对象 (`FindNSRecordHourlyStatWithRecordIdsRequest`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nsRecordIds": "[]int64",
|
|||
|
|
"hour": "string"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**响应对象 (`FindNSRecordHourlyStatWithRecordIdsResponse`)**
|
|||
|
|
|
|||
|
|
```json
|
|||
|
|
{
|
|||
|
|
"nsRecordHourlyStats": "[]NSRecordHourlyStat"
|
|||
|
|
}
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
**调用示例**
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
curl -X POST "https://backend.dooki.cloud/NSRecordHourlyStatService/findNSRecordHourlyStatWithRecordIds" \
|
|||
|
|
-H "Content-Type: application/json" \
|
|||
|
|
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
|
|||
|
|
-d '{
|
|||
|
|
...
|
|||
|
|
}'
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|