feat(plugin): 聚合查询 Redis 缓存骨架
- 新增 aggregate_cached 方法,预留 Redis 缓存接口 - 当前直接委托到 aggregate 方法,未来版本添加缓存层
This commit is contained in:
@@ -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<serde_json::Value>,
|
||||
) -> AppResult<Vec<(String, i64)>> {
|
||||
// TODO: 未来版本添加 Redis 缓存层
|
||||
Self::aggregate(plugin_id, entity_name, tenant_id, db, group_by_field, filter).await
|
||||
}
|
||||
}
|
||||
|
||||
/// 从 plugins 表解析 manifest metadata.id(如 "erp-crm")
|
||||
|
||||
Reference in New Issue
Block a user