diff --git a/crates/erp-plugin/src/data_service.rs b/crates/erp-plugin/src/data_service.rs index e9e41f9..d87668f 100644 --- a/crates/erp-plugin/src/data_service.rs +++ b/crates/erp-plugin/src/data_service.rs @@ -353,6 +353,19 @@ impl PluginDataService { Ok(result) } + + /// 聚合查询(预留 Redis 缓存接口) + pub async fn aggregate_cached( + plugin_id: Uuid, + entity_name: &str, + tenant_id: Uuid, + db: &sea_orm::DatabaseConnection, + group_by_field: &str, + filter: Option, + ) -> AppResult> { + // TODO: 未来版本添加 Redis 缓存层 + Self::aggregate(plugin_id, entity_name, tenant_id, db, group_by_field, filter).await + } } /// 从 plugins 表解析 manifest metadata.id(如 "erp-crm")