fix(测试跟踪): 测试计划脑图更新用例后执行人没有更新

--bug=1022024 --user=陈建星 【测试跟踪】github#21405,测试计划内的case,在脑图模式下更新用例执行结果,用例执行人没有更新。 https://www.tapd.cn/55049933/s/1328983
This commit is contained in:
chenjianxing 2023-01-30 16:17:23 +08:00 committed by jianxing
parent 4722fe2508
commit 12498f9691

View File

@ -182,6 +182,17 @@ public class TestPlanTestCaseService {
//记录功能用例执行信息
functionCaseExecutionInfoService.insertExecutionInfo(testPlanTestCase.getId(), testPlanTestCase.getStatus());
}
setUpdateCaseExecutor(testPlanTestCase);
testPlanTestCase.setUpdateTime(System.currentTimeMillis());
testPlanTestCase.setRemark(null);
testPlanTestCaseMapper.updateByPrimaryKeySelective(testPlanTestCase);
testCaseService.updateLastExecuteStatus(testPlanTestCase.getCaseId(), testPlanTestCase.getStatus());
saveComment(testPlanTestCase);
}
private void setUpdateCaseExecutor(TestPlanTestCaseWithBLOBs testPlanTestCase) {
if (StringUtils.isNotBlank(testPlanTestCase.getStatus())) {
TestPlanTestCaseWithBLOBs originData = testPlanTestCaseMapper.selectByPrimaryKey(testPlanTestCase.getId());
if (!StringUtils.equals(originData.getStatus(), testPlanTestCase.getStatus())) {
@ -189,12 +200,6 @@ public class TestPlanTestCaseService {
testPlanTestCase.setExecutor(SessionUtils.getUser().getId());
}
}
testPlanTestCase.setUpdateTime(System.currentTimeMillis());
testPlanTestCase.setRemark(null);
testPlanTestCaseMapper.updateByPrimaryKeySelective(testPlanTestCase);
testCaseService.updateLastExecuteStatus(testPlanTestCase.getCaseId(), testPlanTestCase.getStatus());
saveComment(testPlanTestCase);
}
private void saveComment(TestPlanFuncCaseEditRequest testPlanTestCase) {
@ -451,6 +456,7 @@ public class TestPlanTestCaseService {
public void editTestCaseForMinder(List<TestPlanTestCaseWithBLOBs> testPlanTestCases) {
testPlanTestCases.forEach(item -> {
item.setUpdateTime(System.currentTimeMillis());
setUpdateCaseExecutor(item);
testPlanTestCaseMapper.updateByPrimaryKeySelective(item);
testCaseService.updateLastExecuteStatus(item.getCaseId(), item.getStatus());
});