From 7422e6afbc68b8e621cd9422a559430b1a432426 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 26 Jun 2024 10:21:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=84=91=E5=9B=BE=E4=BF=9D=E5=AD=98=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E7=94=A8=E4=BE=8B=E4=BF=9D=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/CaseReviewFunctionalCaseService.java | 6 +++--- .../functional/service/FunctionalCaseService.java | 8 ++++---- .../setting/system/config/components/dingTalkModal.vue | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java index 4518428fc2..2651fab2e6 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java @@ -330,9 +330,9 @@ public class CaseReviewFunctionalCaseService { List projectApplications = projectApplicationMapper.selectByExample(example); if (CollectionUtils.isNotEmpty(projectApplications) && Boolean.valueOf(projectApplications.get(0).getTypeValue())) { if (!StringUtils.equals(name, request.getName()) - || !StringUtils.equals(new String(blob.getSteps(), StandardCharsets.UTF_8), request.getSteps()) - || !StringUtils.equals(new String(blob.getTextDescription(), StandardCharsets.UTF_8), request.getTextDescription()) - || !StringUtils.equals(new String(blob.getExpectedResult(), StandardCharsets.UTF_8), request.getExpectedResult())) { + || !StringUtils.equals(new String(blob.getSteps() == null ? new byte[0] : blob.getSteps(), StandardCharsets.UTF_8), request.getSteps()) + || !StringUtils.equals(new String(blob.getTextDescription() == null ? new byte[0] : blob.getTextDescription(), StandardCharsets.UTF_8), request.getTextDescription()) + || !StringUtils.equals(new String(blob.getExpectedResult() == null ? new byte[0] : blob.getExpectedResult(), StandardCharsets.UTF_8), request.getExpectedResult())) { doHandleStatusAndHistory(blob, userId); } } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java index 7c5890ad3f..c4575c3107 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java @@ -619,18 +619,18 @@ public class FunctionalCaseService { } if (request.getExpectedResult()!=null) { hasUpdate=true; - functionalCaseBlob.setTextDescription(StringUtils.defaultIfEmpty(request.getExpectedResult(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8)); + functionalCaseBlob.setExpectedResult(StringUtils.defaultIfEmpty(request.getExpectedResult(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8)); } if (request.getPrerequisite()!=null) { hasUpdate=true; - functionalCaseBlob.setTextDescription(StringUtils.defaultIfEmpty(request.getPrerequisite(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8)); + functionalCaseBlob.setPrerequisite(StringUtils.defaultIfEmpty(request.getPrerequisite(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8)); } if (request.getDescription()!=null) { hasUpdate=true; - functionalCaseBlob.setTextDescription(StringUtils.defaultIfEmpty(request.getDescription(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8)); + functionalCaseBlob.setDescription(StringUtils.defaultIfEmpty(request.getDescription(), StringUtils.EMPTY).getBytes(StandardCharsets.UTF_8)); } if (hasUpdate) { - functionalCaseBlobMapper.updateByPrimaryKeySelective(functionalCaseBlob); + functionalCaseBlobMapper.updateByPrimaryKeyWithBLOBs(functionalCaseBlob); } //更新自定义字段 List customFields = request.getCustomFields(); diff --git a/frontend/src/views/setting/system/config/components/dingTalkModal.vue b/frontend/src/views/setting/system/config/components/dingTalkModal.vue index ded97c8925..012e6f1170 100644 --- a/frontend/src/views/setting/system/config/components/dingTalkModal.vue +++ b/frontend/src/views/setting/system/config/components/dingTalkModal.vue @@ -149,7 +149,7 @@ try { await validateDingTalkConfig(dingTalkForm.value); dingTalkForm.value.valid = true; - Message.success(t('common.saveSuccess')); + Message.success(t('organization.service.testLinkStatusTip')); } catch (error) { dingTalkForm.value.valid = false; console.log(error); @@ -166,7 +166,7 @@ loading.value = true; try { await saveDingTalkConfig(dingTalkForm.value); - Message.success(t('organization.service.testLinkStatusTip')); + Message.success(t('common.saveSuccess')); emits('success'); } catch (error) { console.log(error);