OpenClaw Agent
|
8d7e62f8af
|
fix: SqlSugar 注册改为 Scoped 避免并发冲突
问题:
- ISqlSugarClient 注册为 Singleton
- 多个请求共享同一个 SqlSugarScope 实例
- Task.WhenAll 并发查询时连接状态冲突
修复:
- Singleton → Scoped
- 每个 HTTP 请求独立的 SqlSugarScope 实例
- 避免跨请求共享连接对象
配合内存缓存层,双重保障:
1. 内存缓存:减少数据库查询次数
2. Scoped:隔离请求间的连接对象
|
2026-03-24 09:59:30 +00:00 |
|
OpenClaw Agent
|
6b50d7fc50
|
refactor: SqlSugarScope注册为Singleton实现线程安全,移除手动信号量限制
|
2026-03-17 09:26:26 +00:00 |
|
OpenClaw Agent
|
4ce29a1036
|
refactor: 架构优化 P0-P3
P0 - 安全修复:
- 移除硬编码 API Key,启动时校验必填环境变量
P1 - 高优先级:
- Entity 拆分:Position.cs, Transaction.cs 独立文件
- Controller Facade 封装:IPortfolioFacade 减少依赖注入
P2 - 中优先级:
- Repository 抽象:IPortfolioRepository, IMarketDataRepository
- MarketDataService 拆分:组合模式整合 Tencent/Tiingo/OKX
P3 - 低优先级:
- DTO 命名规范:统一 PascalCase
- 单元测试框架:xUnit + Moq + FluentAssertions
|
2026-03-15 12:54:05 +00:00 |
|
OpenClaw Agent
|
1977dd609d
|
fix: 请求收益曲线时自动回填历史数据
- GetNavHistoryAsync现在会自动检查是否有历史数据
- 无历史数据时自动调用BackfillNavHistoryInternalAsync
- 拆分内部回填方法,避免重复验证权限
|
2026-03-13 16:21:31 +00:00 |
|
niannian zheng
|
2fe0b0c134
|
Remove bin and obj directories from Git tracking
|
2026-02-24 19:25:28 +08:00 |
|