wanshenmean
2026-03-27 58cf80ac4a1f537f531aaea37211903a9603c73a
feat(RouterService): 改造 GetAllWholeRouters 使用缓存

合并 In/Out 两份缓存替代 BaseDal.QueryData(x => true)。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
已修改1个文件
6 ■■■■■ 文件已修改
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
@@ -430,8 +430,10 @@
        public List<object> GetAllWholeRouters()
        {
            List<object> data = new List<object>();
            // 查询所有路由
            List<Dt_Router> allRouters = BaseDal.QueryData(x => true);
            // 从缓存加载入口类型和出口类型的全量路由数据并合并
            List<Dt_Router> inRouters = GetAllRoutersFromCache(RouterInOutType.In.ObjToInt());
            List<Dt_Router> outRouters = GetAllRoutersFromCache(RouterInOutType.Out.ObjToInt());
            List<Dt_Router> allRouters = inRouters.Concat(outRouters).ToList();
            // 查询所有结束的路由,并按Id排序
            List<Dt_Router> dt_Routers = allRouters.Where(x => x.IsEnd).OrderBy(x => x.Id).ToList();