From 6c2ff1c7c8e0aba3af92110b76687b78f8278e86 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 03 一月 2025 09:57:37 +0800
Subject: [PATCH] 动态数据长度

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
index a6f793e..0e3bdc7 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java
@@ -6,6 +6,7 @@
 import com.iailab.module.model.mcs.pre.dto.MmItemOutputDTO;
 import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity;
 import com.iailab.module.model.mcs.pre.service.MmItemOutputService;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -30,6 +31,9 @@
     
     @Override
     public void saveMmItemOutput(List<MmItemOutputEntity> mmItemOutput) {
+        mmItemOutput.forEach(e -> {
+            e.setId(e.getId().replace("+","").replace("-",""));
+        });
         mmItemOutputDao.insert(mmItemOutput);
         // 清空缓存
         clearCache();
@@ -71,9 +75,11 @@
     }
 
     @Override
-    public MmItemOutputEntity getByItemid(String itemid, String resultstr) {
+    public MmItemOutputEntity getByItemid(String itemid, String resultstr, String resultIndex) {
         QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("itemid", itemid).eq("resultstr", resultstr);
+        queryWrapper.eq("itemid", itemid)
+                .eq("resultstr", resultstr)
+                .eq(StringUtils.isNotBlank(resultIndex), "result_index", resultIndex);
         return mmItemOutputDao.selectOne(queryWrapper);
     }
 

--
Gitblit v1.9.3