From 5b952f77058a9da5af5e143a6c2c7ba195aa736d Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期二, 26 十一月 2024 16:08:10 +0800
Subject: [PATCH] 预测消息配置

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemStatusServiceImpl.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemStatusServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemStatusServiceImpl.java
index f5f5b04..9ab41e0 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemStatusServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemStatusServiceImpl.java
@@ -23,19 +23,20 @@
     @Resource
     public MmItemStatusDao mmItemStatusDao;
 
-    public void recordStatus(String itemId, ItemRunStatusEnum status, Long duration) {
+    public void recordStatus(String itemId, ItemRunStatusEnum status, Long duration, Date runTime) {
         QueryWrapper<MmItemStatusEntity> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("item_id", itemId);
         MmItemStatusEntity entity = mmItemStatusDao.selectOne(queryWrapper);
         if (entity == null) {
             entity = new MmItemStatusEntity();
             entity.setId(UUID.randomUUID().toString());
-            entity.setLastTime(new Date());
+            entity.setItemId(itemId);
+            entity.setLastTime(runTime);
             entity.setStatus(status.getCode());
             entity.setDuration(duration);
             mmItemStatusDao.insert(entity);
         } else {
-            entity.setLastTime(new Date());
+            entity.setLastTime(runTime);
             entity.setStatus(status.getCode());
             entity.setDuration(duration);
             mmItemStatusDao.updateById(entity);

--
Gitblit v1.9.3