yeg
2026-09-03 54949781a851e5837804ec7ccb6d4d4f204d0670
修复测试实时状态查询

补充预警异常查询条件之间的 SQL 空格,避免实时状态接口因拼接出 ?and 而失败,并增加 Mapper 契约测试。
2个文件已修改
6 ■■■■■ 已修改文件
ruoyi-admin/src/test/java/com/ruoyi/config/FlywayMigrationContractTest.java 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TTestMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/test/java/com/ruoyi/config/FlywayMigrationContractTest.java
@@ -163,6 +163,7 @@
        assertTrue(testMapper.contains("selectReceivingChannelsForAdapter"));
        assertTrue(testMapper.contains("RECEPTION_RESUMED"));
        assertTrue(testMapper.contains("TEST_STOPPED"));
        assertFalse(testMapper.contains("#{testId}</if><if"));
    }
    private static String sha256(String path)
ruoyi-system/src/main/resources/mapper/system/TTestMapper.xml
@@ -342,7 +342,10 @@
        select e.*, t.test_name, u.nick_name handled_by_name
        from t_test_warning_exception e join t_test t on t.test_id=e.test_id
        left join sys_user u on u.user_id=e.handled_by
        <where><if test="testId != null">e.test_id = #{testId}</if><if test="status != null and status != ''">and e.exception_status = #{status}</if></where>
        <where>
            <if test="testId != null">e.test_id = #{testId}</if>
            <if test="status != null and status != ''">and e.exception_status = #{status}</if>
        </where>
        order by e.last_occurred_at_utc desc, e.exception_id desc
    </select>
    <select id="selectWarningExceptionById" parameterType="long" resultMap="TTestWarningExceptionResultMap">