refactor(测试跟踪): 规范日志输出

This commit is contained in:
fit2-zhao 2020-10-09 17:32:29 +08:00
parent f8d2322386
commit 7833150db9
1 changed files with 5 additions and 5 deletions

View File

@ -273,7 +273,7 @@ public class TestCaseService {
.map(TestCase::getName)
.collect(Collectors.toSet());
List<ExcelErrData<TestCaseExcelData>> errList = null;
if(multipartFile == null )
if (multipartFile == null)
MSException.throwException(Translator.get("upload_fail"));
if (multipartFile.getOriginalFilename().endsWith(".xmind")) {
@ -286,13 +286,12 @@ public class TestCaseService {
ExcelErrData excelErrData = new ExcelErrData(null, 1, Translator.get("upload_fail") + "" + processLog);
errList.add(excelErrData);
excelResponse.setErrList(errList);
}else if(xmindParser.getNodePaths().isEmpty() && xmindParser.getTestCase().isEmpty() ){
} else if (xmindParser.getNodePaths().isEmpty() && xmindParser.getTestCase().isEmpty()) {
excelResponse.setSuccess(false);
ExcelErrData excelErrData = new ExcelErrData(null, 1, Translator.get("upload_fail") + "" + Translator.get("upload_content_is_null"));
errList.add(excelErrData);
excelResponse.setErrList(errList);
}
else {
} else {
if (!xmindParser.getNodePaths().isEmpty()) {
testCaseNodeService.createNodes(xmindParser.getNodePaths(), projectId);
}
@ -303,7 +302,8 @@ public class TestCaseService {
excelResponse.setSuccess(true);
}
} catch (Exception e) {
e.printStackTrace();
LogUtil.error(e.getMessage(), e);
MSException.throwException(e.getMessage());
}
} else {