From 1348fad4dfaaad8e09265432f94313f9bc119236 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Thu, 16 Mar 2023 10:31:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=94=A8=E4=BE=8B=E7=8A=B6=E6=80=81=E6=97=B6=E5=8F=91?= =?UTF-8?q?=E9=80=81=E8=AF=84=E8=AE=BA=E7=9A=84=E6=96=B9=E6=B3=95=E3=80=82?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=9C=AA=E6=94=B9=E5=8F=98=EF=BC=8C=E5=88=99=E4=B8=8D?= =?UTF-8?q?=E5=8F=91=E9=80=81=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024500 --user=宋天阳 【尝试跟踪】测试计划-功能用例关联2个接口用例-先执行返回误报接口用例-再执行返回成功接口-功能用例未自动生成阻塞状态评论 https://www.tapd.cn/55049933/s/1351112; --bug=1024509 --user=宋天阳 【测试跟踪】功能用例关联接口/场景用例-功能用例返回阻塞结果-再次执行接口/场景用例-功能用例会再次生成一条阻塞评论 https://www.tapd.cn/55049933/s/1351113 --- .../mapper/ext/ExtTestPlanTestCaseMapper.java | 5 +++-- .../base/mapper/ext/ExtTestPlanTestCaseMapper.xml | 7 ++++--- .../plan/service/TestCaseSyncStatusService.java | 15 ++++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java index 868b0de84a..df0670d49a 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.java @@ -72,9 +72,10 @@ public interface ExtTestPlanTestCaseMapper { List getCaseIdsByIds(@Param("ids") List ids); - void updateExecResultByTestPlanCaseIdList(@Param("ids") List testPlanCaseIdList, @Param("execResult") String execResult); + int updateDiffExecResultByTestPlanCaseIdList(@Param("ids") List testPlanCaseIdList, @Param("execResult") String execResult); - void updateExecResultByTestCaseIdAndTestPlanId(@Param("testCaseId") String testCaseId, @Param("testPlanId") String testPlanId, @Param("execResult") String execResult); + //修改 + int updateDiffExecResultByTestCaseIdAndTestPlanId(@Param("testCaseId") String testCaseId, @Param("testPlanId") String testPlanId, @Param("execResult") String execResult); List selectByAutomationCaseIdAndTestPlanId(@Param("automationCaseId") String automationCaseId, @Param("test_plan_id") String testPlanId); diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index a69d913c40..ebaf58ef44 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -654,17 +654,18 @@ ); - + UPDATE test_plan_test_case SET status = #{execResult} WHERE id IN #{value} + AND status != #{execResult} - + UPDATE test_plan_test_case SET status = #{execResult} - WHERE case_id = #{testCaseId} AND plan_id = #{testPlanId} + WHERE case_id = #{testCaseId} AND plan_id = #{testPlanId} AND status != #{execResult}