fix(测试跟踪): 修复复制的功能用例/接口定义的创建和更新时间是原用例的创建和更新时间的缺陷

--bug=1009797 --user=王孝刚 【用例复制】-直接复制的功能用例/接口定义的创建和更新时间是原用例的创建和更新时间
https://www.tapd.cn/55049933/s/1097415
This commit is contained in:
wxg0103 2022-01-24 16:24:03 +08:00 committed by 刘瑞斌
parent a43287abda
commit c32ec09575
2 changed files with 5 additions and 0 deletions

View File

@ -1947,6 +1947,9 @@ public class ApiDefinitionService {
api.setModulePath(request.getModulePath()); api.setModulePath(request.getModulePath());
api.setOrder(nextOrder += ServiceUtils.ORDER_STEP); api.setOrder(nextOrder += ServiceUtils.ORDER_STEP);
api.setNum(nextNum++); api.setNum(nextNum++);
api.setCreateTime(System.currentTimeMillis());
api.setUpdateTime(System.currentTimeMillis());
api.setRefId(api.getId());
mapper.insert(api); mapper.insert(api);
if (i % 50 == 0) if (i % 50 == 0)
sqlSession.flushStatements(); sqlSession.flushStatements();

View File

@ -2386,6 +2386,8 @@ public class TestCaseService {
testCase.setCustomNum(String.valueOf(nextNum)); testCase.setCustomNum(String.valueOf(nextNum));
testCase.setNum(nextNum++); testCase.setNum(nextNum++);
testCase.setCasePublic(false); testCase.setCasePublic(false);
testCase.setCreateTime(System.currentTimeMillis());
testCase.setUpdateTime(System.currentTimeMillis());
testCase.setRefId(id); testCase.setRefId(id);
mapper.insert(testCase); mapper.insert(testCase);