From c32ec09575f7233e8e98b7d05d23f9130df70e4a Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 24 Jan 2022 16:24:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6=E7=9A=84=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E7=94=A8=E4=BE=8B/=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=9A=84=E5=88=9B=E5=BB=BA=E5=92=8C=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=98=AF=E5=8E=9F=E7=94=A8=E4=BE=8B=E7=9A=84=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=92=8C=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1009797 --user=王孝刚 【用例复制】-直接复制的功能用例/接口定义的创建和更新时间是原用例的创建和更新时间 https://www.tapd.cn/55049933/s/1097415 --- .../java/io/metersphere/api/service/ApiDefinitionService.java | 3 +++ .../java/io/metersphere/track/service/TestCaseService.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 73fa6bba51..8f7f5d2b4d 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -1947,6 +1947,9 @@ public class ApiDefinitionService { api.setModulePath(request.getModulePath()); api.setOrder(nextOrder += ServiceUtils.ORDER_STEP); api.setNum(nextNum++); + api.setCreateTime(System.currentTimeMillis()); + api.setUpdateTime(System.currentTimeMillis()); + api.setRefId(api.getId()); mapper.insert(api); if (i % 50 == 0) sqlSession.flushStatements(); diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index 1d50d895ae..4e5ca6d6eb 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -2386,6 +2386,8 @@ public class TestCaseService { testCase.setCustomNum(String.valueOf(nextNum)); testCase.setNum(nextNum++); testCase.setCasePublic(false); + testCase.setCreateTime(System.currentTimeMillis()); + testCase.setUpdateTime(System.currentTimeMillis()); testCase.setRefId(id); mapper.insert(testCase);