From a0c5e78950c8809fea0f8d0bbe3520055f1a4bad Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Tue, 19 Jul 2022 19:51:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3postman=5Fhar=5Fjemeter=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=9C=BA=E6=99=AF=E5=AF=BC=E5=85=A5=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=94=A8=E4=BE=8B=E7=AD=89=E7=BA=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 --bug=1014870 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014870 --- .../java/io/metersphere/api/service/ApiAutomationService.java | 3 +++ .../java/io/metersphere/api/service/ApiDefinitionService.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index 101213f70b..cd90920336 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1439,6 +1439,9 @@ public class ApiAutomationService { if (item.getVersionId() == null || (!item.getVersionId().equals("new") && !item.getVersionId().equals("update"))) { item.setNum(num); } + if (StringUtils.isBlank(item.getLevel())) { + item.setLevel("P0"); + } if (BooleanUtils.isFalse(request.getOpenCustomNum())) { // 如果未开启,即使有自定值也直接覆盖 item.setCustomNum(String.valueOf(num)); 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 289f5dd6db..101be3ea63 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -902,6 +902,10 @@ public class ApiDefinitionService { apiTestCaseWithBLOBs.setToBeUpdateTime(apiDefinition.getToBeUpdateTime()); } + if (StringUtils.isBlank(apiTestCaseWithBLOBs.getPriority())) { + apiTestCaseWithBLOBs.setPriority("P0"); + } + if (StringUtils.isNotBlank(apiTestCaseWithBLOBs.getId())) { apiTestCaseMapper.updateByPrimaryKeyWithBLOBs(apiTestCaseWithBLOBs); } else {