From 4eedac407d7571c906b15ab017522d2002a42375 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 25 Feb 2021 11:25:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=A9=BA=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/track/service/TestPlanService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java index 3618019da1..40c6bc72a3 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanService.java @@ -179,7 +179,7 @@ public class TestPlanService { testPlan.setActualEndTime(null); } // 已完成->进行中,结束时间置空 } else if (!res.getStatus().equals(TestPlanStatus.Prepare.name()) && - testPlan.getStatus().equals(TestPlanStatus.Prepare.name())) { + TestPlanStatus.Prepare.name().equals(testPlan.getStatus())) { testPlan.setActualStartTime(null); testPlan.setActualEndTime(null); } // 非未开始->未开始,时间都置空 @@ -193,7 +193,7 @@ public class TestPlanService { List userIds = new ArrayList<>(); userIds.add(testPlan.getPrincipal()); AddTestPlanRequest testPlans = new AddTestPlanRequest(); - int i = testPlanMapper.updateByPrimaryKey(testPlan); // 更新 + int i = testPlanMapper.updateByPrimaryKeySelective(testPlan); // 更新 if (!StringUtils.isBlank(testPlan.getStatus())) { BeanUtils.copyBean(testPlans, getTestPlan(testPlan.getId())); String context = getTestPlanContext(testPlans, NoticeConstants.Event.UPDATE);