From b82ba2a29aa9ee181c707677157d8057fff68450 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 16 十二月 2024 13:50:33 +0800 Subject: [PATCH] 预测项数据图表查询bug,不能从缓存中查item,要最新的运行时间 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java index 7f4dfec..d058b4c 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmPredictItemServiceImpl.java @@ -258,7 +258,7 @@ } @Override - public ItemVO getItemById(String itemId) { + public ItemVO getItemByIdFromCache(String itemId) { if (StringUtils.isBlank(itemId)) { return null; } @@ -275,6 +275,17 @@ } @Override + public ItemVO getItemById(String itemId) { + Map<String, Object> params = new HashMap<>(1); + params.put("ITEMID", itemId); + List<ItemVO> list = mmPredictItemDao.getItem(params); + if (CollectionUtils.isEmpty(list)) { + return null; + } + return list.get(0); + } + + @Override public ItemVO getItemByOutPutId(String outPutId) { if (StringUtils.isBlank(outPutId)) { return null; @@ -284,7 +295,7 @@ return null; } String itemId = outPutById.getItemid(); - return getItemById(itemId); + return getItemByIdFromCache(itemId); } @Override -- Gitblit v1.9.3