From 4f171763ce5ee065a704e5d08fcbd5a3379dec85 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 13 十一月 2024 14:22:31 +0800 Subject: [PATCH] 返回预测结果 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleServiceImpl.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleServiceImpl.java index 5b678c8..2ed8c90 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/DmModuleServiceImpl.java @@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.*; @@ -38,6 +39,15 @@ @Override public DmModuleEntity info(String id) { return dmModuleDao.selectById(id); + } + + @Override + public DmModuleEntity getModuleByItemId(String itemId) { + List<DmModuleEntity> list = dmModuleDao.getModuleByItemId(itemId); + if (CollectionUtils.isEmpty(list)) { + return null; + } + return list.get(0); } private QueryWrapper<DmModuleEntity> getWrapper(Map<String, Object> params) { @@ -76,7 +86,16 @@ params.put("moduletype", moduletype); QueryWrapper<DmModuleEntity> wrapper = getWrapper(params); return dmModuleDao.selectList(wrapper); + } + @Override + public void updatePredictTime(String id, Date predictTime) { + DmModuleEntity entity = dmModuleDao.selectById(id); + if (entity == null) { + return; + } + entity.setPredicttime(predictTime); + dmModuleDao.updateById(entity); } @Override -- Gitblit v1.9.3