feat(plugin): 新增数据统计 REST API — count 和 aggregate 端点

- dynamic_table: 新增 build_filtered_count_sql(带过滤/搜索的 COUNT)和 build_aggregate_sql(按字段分组计数)
- data_service: 新增 count 和 aggregate 方法,支持实时统计查询
- data_handler: 新增 count_plugin_data 和 aggregate_plugin_data REST handler
- data_dto: 新增 AggregateItem、AggregateQueryParams、CountQueryParams 类型
- module: 注册 /plugins/{plugin_id}/{entity}/count 和 /aggregate 路由
- 包含 8 个新增单元测试,全部通过
This commit is contained in:
iven
2026-04-16 16:22:33 +08:00
parent 169e6d1fe5
commit 9effa9f942
6 changed files with 460 additions and 1 deletions

9
Cargo.lock generated
View File

@@ -1251,6 +1251,15 @@ dependencies = [
"wasmtime-wasi",
]
[[package]]
name = "erp-plugin-crm"
version = "0.1.0"
dependencies = [
"serde",
"serde_json",
"wit-bindgen 0.55.0",
]
[[package]]
name = "erp-plugin-prototype"
version = "0.1.0"