datai-vue/doc/salesforce/integration/DataiIntegrationRealtimeSyncController/0001-realtime-sync-status.md
Kris 1177dbde35 feat: 添加元数据变更中心和实时同步统计页面
- 新增元数据变更中心页面 (metadatachange/index.vue)
  - 集成统计卡片显示变更数据
  - 支持按变更类型、操作类型、同步状态分组统计
  - 支持趋势统计图表展示
  - 优化查询条件布局,移至页面顶部

- 新增实时同步统计页面 (statistics/realtime/index.vue)
  - 显示实时同步服务状态和控制按钮
  - 统计启用实时同步的对象数量
  - 自动刷新统计数据(30秒间隔)

- 优化数据同步页面 (datasync/index.vue)
  - 修正字段映射以匹配API响应
  - 更新统计卡片显示实际数据

- 优化同步日志统计页面 (statistics/synclog/index.vue)
  - 更新表格列以匹配API响应结构
  - 更新查询参数和映射函数

- 更新导航栏菜单 (Navbar/index.vue)
  - 添加元数据变更中心菜单项

- 新增API接口 (realtimeservice.js)
  - 添加getStatistics函数获取实时同步统计数据

- 新增接口文档
  - DataiIntegrationRealtimeSyncController 接口文档
  - DataiIntegrationRealtimeSyncLogController 接口文档
2026-01-13 13:50:07 +08:00

78 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 实时同步服务状态接口
## 接口信息
- **接口路径**: `/integration/realtime/status`
- **请求方法**: GET
- **功能描述**: 获取实时同步服务状态,包括启用实时同步的对象列表
- **权限要求**: `integration:realtime:status`
## 请求参数
| 参数名 | 类型 | 位置 | 必选 | 描述 |
|--------|------|------|------|------|
| 无 | - | - | - | 无请求参数 |
## 响应参数
| 参数名 | 类型 | 描述 |
|--------|------|------|
| success | boolean | 请求是否成功 |
| message | string | 响应消息 |
| realtimeSyncObjects | array | 启用实时同步的对象列表 |
| objectCount | number | 启用实时同步的对象数量 |
### realtimeSyncObjects 数组元素
| 参数名 | 类型 | 描述 |
|--------|------|------|
| id | number | 对象ID |
| api | string | 对象API名称 |
| label | string | 对象显示名称 |
| isRealtimeSync | boolean | 是否开启实时同步 |
| lastSyncDate | string | 最后同步时间 |
| totalRows | number | 本地记录数 |
## 响应示例
```json
{
"success": true,
"message": "获取实时同步服务状态成功",
"realtimeSyncObjects": [
{
"id": 1,
"api": "Account",
"label": "账户",
"isRealtimeSync": true,
"lastSyncDate": "2026-01-10T10:00:00",
"totalRows": 1000
},
{
"id": 2,
"api": "Contact",
"label": "联系人",
"isRealtimeSync": true,
"lastSyncDate": "2026-01-10T10:05:00",
"totalRows": 2000
}
],
"objectCount": 2
}
```
## 错误示例
```json
{
"success": false,
"message": "获取实时同步服务状态失败: 权限不足"
}
```
## 接口说明
1. 该接口用于获取实时同步服务的当前状态,包括启用了实时同步的对象列表
2. 接口返回的对象列表包含了每个对象的基本信息如API名称、显示名称、是否开启实时同步等
3. 接口需要`integration:realtime:status`权限才能访问
4. 如果没有权限或发生其他错误,接口会返回失败信息