yeg
2026-09-03 2e683cd7090e2d6a057216fc62429792f7b97aef
工步图表更新
1个文件已添加
4个文件已修改
43 ■■■■■ 已修改文件
ruoyi-admin/src/main/resources/application.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/db/migration/V31__unified_realtime_snapshots.sql 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/test/java/com/ruoyi/config/DevelopmentSimulatorProfileContractTest.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/test/java/com/ruoyi/config/FlywayMigrationContractTest.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TestDataReceptionServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml
@@ -60,7 +60,8 @@
    # 国际化资源文件路径
    basename: i18n/messages
  profiles:
    active: druid
    # 仓库默认启动用于本机联调;真实设备部署必须覆盖并移除 dev-simulator。
    active: druid,dev-simulator
  # 文件上传
  servlet:
    multipart:
ruoyi-admin/src/main/resources/db/migration/V31__unified_realtime_snapshots.sql
@@ -29,8 +29,8 @@
    PRIMARY KEY (snapshot_id),
    UNIQUE KEY uk_test_snapshot_slot (test_id, binding_id, capture_slot_utc),
    KEY idx_snapshot_test_time (test_id, capture_slot_utc),
    CONSTRAINT fk_snapshot_test FOREIGN KEY (test_id) REFERENCES t_test (test_id),
    CONSTRAINT fk_snapshot_binding FOREIGN KEY (binding_id) REFERENCES t_test_channel_binding (binding_id),
    CONSTRAINT fk_snapshot_channel FOREIGN KEY (channel_id) REFERENCES t_detection_channel (channel_id),
    CONSTRAINT fk_snapshot_collector FOREIGN KEY (collector_id) REFERENCES t_collector (collector_id)
    CONSTRAINT fk_realtime_snapshot_test FOREIGN KEY (test_id) REFERENCES t_test (test_id),
    CONSTRAINT fk_realtime_snapshot_binding FOREIGN KEY (binding_id) REFERENCES t_test_channel_binding (binding_id),
    CONSTRAINT fk_realtime_snapshot_channel FOREIGN KEY (channel_id) REFERENCES t_detection_channel (channel_id),
    CONSTRAINT fk_realtime_snapshot_collector FOREIGN KEY (collector_id) REFERENCES t_collector (collector_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='主动轮询形成的完整实时采集快照';
ruoyi-admin/src/test/java/com/ruoyi/config/DevelopmentSimulatorProfileContractTest.java
New file
@@ -0,0 +1,20 @@
package com.ruoyi.config;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.springframework.boot.env.YamlPropertySourceLoader;
import org.springframework.core.io.ClassPathResource;
class DevelopmentSimulatorProfileContractTest
{
    @Test
    void enablesSimulatorSchedulingForDefaultDevelopmentStartup() throws Exception
    {
        var sources = new YamlPropertySourceLoader().load("application", new ClassPathResource("application.yml"));
        Object profiles = sources.get(0).getProperty("spring.profiles.active");
        assertEquals(List.of("druid", "dev-simulator"), List.of(String.valueOf(profiles).split(",")));
    }
}
ruoyi-admin/src/test/java/com/ruoyi/config/FlywayMigrationContractTest.java
@@ -149,6 +149,16 @@
        assertTrue(v20.contains("system:test:stop"));
        assertFalse(v20.matches("(?s).*\\bDROP\\s+TABLE\\b.*"));
        String v31 = resource("db/migration/V31__unified_realtime_snapshots.sql");
        assertTrue(v31.contains("CREATE TABLE t_test_realtime_snapshot"));
        assertTrue(v31.contains("fk_realtime_snapshot_test"));
        assertTrue(v31.contains("fk_realtime_snapshot_binding"));
        assertTrue(v31.contains("fk_realtime_snapshot_channel"));
        assertTrue(v31.contains("fk_realtime_snapshot_collector"));
        assertFalse(v31.contains("fk_snapshot_test"));
        assertFalse(v31.contains("fk_snapshot_binding"));
        assertFalse(v31.contains("fk_snapshot_channel"));
        String testMapper = resource("mapper/system/TTestMapper.xml");
        assertTrue(testMapper.contains("selectReceivingChannelsForAdapter"));
        assertTrue(testMapper.contains("RECEPTION_RESUMED"));
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TestDataReceptionServiceImpl.java
@@ -23,7 +23,7 @@
import com.ruoyi.system.service.ITTestService;
import com.ruoyi.system.service.ITestDataReceptionService;
/** 接收时确定测试归属,并以现有采样表追加保存检测柜事实。 */
/** 接收时确定测试归属,分别保留检测柜、采集器原始事实,并形成统一实时快照。 */
@Service
public class TestDataReceptionServiceImpl implements ITestDataReceptionService
{