fix(功能用例): 修复脑图保存影响用例保存问题

This commit is contained in:
guoyuqi 2024-06-26 10:21:07 +08:00 committed by Craftsman
parent c1b31528ca
commit 7422e6afbc
3 changed files with 9 additions and 9 deletions

View File

@ -330,9 +330,9 @@ public class CaseReviewFunctionalCaseService {
List<ProjectApplication> projectApplications = projectApplicationMapper.selectByExample(example); List<ProjectApplication> projectApplications = projectApplicationMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(projectApplications) && Boolean.valueOf(projectApplications.get(0).getTypeValue())) { if (CollectionUtils.isNotEmpty(projectApplications) && Boolean.valueOf(projectApplications.get(0).getTypeValue())) {
if (!StringUtils.equals(name, request.getName()) if (!StringUtils.equals(name, request.getName())
|| !StringUtils.equals(new String(blob.getSteps(), StandardCharsets.UTF_8), request.getSteps()) || !StringUtils.equals(new String(blob.getSteps() == null ? new byte[0] : blob.getSteps(), StandardCharsets.UTF_8), request.getSteps())
|| !StringUtils.equals(new String(blob.getTextDescription(), StandardCharsets.UTF_8), request.getTextDescription()) || !StringUtils.equals(new String(blob.getTextDescription() == null ? new byte[0] : blob.getTextDescription(), StandardCharsets.UTF_8), request.getTextDescription())
|| !StringUtils.equals(new String(blob.getExpectedResult(), StandardCharsets.UTF_8), request.getExpectedResult())) { || !StringUtils.equals(new String(blob.getExpectedResult() == null ? new byte[0] : blob.getExpectedResult(), StandardCharsets.UTF_8), request.getExpectedResult())) {
doHandleStatusAndHistory(blob, userId); doHandleStatusAndHistory(blob, userId);
} }
} }

View File

@ -619,18 +619,18 @@ public class FunctionalCaseService {
} }
if (request.getExpectedResult()!=null) { if (request.getExpectedResult()!=null) {
hasUpdate=true; 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) { if (request.getPrerequisite()!=null) {
hasUpdate=true; 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) { if (request.getDescription()!=null) {
hasUpdate=true; 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) { if (hasUpdate) {
functionalCaseBlobMapper.updateByPrimaryKeySelective(functionalCaseBlob); functionalCaseBlobMapper.updateByPrimaryKeyWithBLOBs(functionalCaseBlob);
} }
//更新自定义字段 //更新自定义字段
List<CaseCustomFieldDTO> customFields = request.getCustomFields(); List<CaseCustomFieldDTO> customFields = request.getCustomFields();

View File

@ -149,7 +149,7 @@
try { try {
await validateDingTalkConfig(dingTalkForm.value); await validateDingTalkConfig(dingTalkForm.value);
dingTalkForm.value.valid = true; dingTalkForm.value.valid = true;
Message.success(t('common.saveSuccess')); Message.success(t('organization.service.testLinkStatusTip'));
} catch (error) { } catch (error) {
dingTalkForm.value.valid = false; dingTalkForm.value.valid = false;
console.log(error); console.log(error);
@ -166,7 +166,7 @@
loading.value = true; loading.value = true;
try { try {
await saveDingTalkConfig(dingTalkForm.value); await saveDingTalkConfig(dingTalkForm.value);
Message.success(t('organization.service.testLinkStatusTip')); Message.success(t('common.saveSuccess'));
emits('success'); emits('success');
} catch (error) { } catch (error) {
console.log(error); console.log(error);