From 795c16bd3aa31f4faa4fe8a8e2155718cac0e5d1 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期六, 29 八月 2026 11:55:43 +0800
Subject: [PATCH] 修复电池组模板查询映射

---
 ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TBatteryGroupServiceImplTest.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TBatteryGroupServiceImplTest.java b/ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TBatteryGroupServiceImplTest.java
index f615a8f..704a705 100644
--- a/ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TBatteryGroupServiceImplTest.java
+++ b/ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/TBatteryGroupServiceImplTest.java
@@ -20,6 +20,7 @@
 import com.ruoyi.system.domain.TBatteryGroup;
 import com.ruoyi.system.domain.TBatteryGroupBattery;
 import com.ruoyi.system.domain.TBatteryGroupRelationField;
+import com.ruoyi.system.domain.TBatteryGroupTemplate;
 import com.ruoyi.system.mapper.TBatteryGroupMapper;
 
 /** 电池组 Service 单元测试。 */
@@ -96,7 +97,7 @@
         when(batteryGroupMapper.selectBatteryGroupById(12L)).thenReturn(current);
         when(batteryGroupMapper.countTestingByGroupId(12L)).thenReturn(0);
         when(batteryGroupMapper.selectBatteryByNo("BAT-01", 12L)).thenReturn(null);
-        when(batteryGroupMapper.selectTemplate(5L)).thenReturn(new TBatteryGroup());
+        when(batteryGroupMapper.selectTemplate(5L)).thenReturn(new TBatteryGroupTemplate());
         when(batteryGroupMapper.selectTemplateFieldIds(5L)).thenReturn(Collections.singletonList(7L));
         when(batteryGroupMapper.selectValidTemplateFields(5L, Collections.singletonList(7L)))
                 .thenReturn(Collections.singletonList(relation));
@@ -128,7 +129,7 @@
         validField.setFieldType("number");
         when(batteryGroupMapper.selectBatteryGroupByName("样品组")).thenReturn(null);
         when(batteryGroupMapper.selectBatteryByNo("BAT-01", null)).thenReturn(null);
-        when(batteryGroupMapper.selectTemplate(5L)).thenReturn(new TBatteryGroup());
+        when(batteryGroupMapper.selectTemplate(5L)).thenReturn(new TBatteryGroupTemplate());
         when(batteryGroupMapper.selectTemplateFieldIds(5L)).thenReturn(Collections.singletonList(7L));
         when(batteryGroupMapper.selectValidTemplateFields(5L, Collections.singletonList(7L)))
                 .thenReturn(Collections.singletonList(validField));

--
Gitblit v1.7.1