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);
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);
}
}

View File

@ -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<CaseCustomFieldDTO> customFields = request.getCustomFields();

View File

@ -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);