Merge remote-tracking branch 'origin/main'

This commit is contained in:
liqiang-fit2cloud 2022-10-18 10:57:13 +08:00
commit c21e438052
15 changed files with 13 additions and 10 deletions

View File

@ -615,12 +615,11 @@ public class Swagger3Parser extends SwaggerAbstractParser {
result.setOpenapi("3.0.1");
SwaggerInfo swaggerInfo = new SwaggerInfo();
swaggerInfo.setVersion("1.0.1");
swaggerInfo.setVersion("1.0");
swaggerInfo.setTitle("ms-" + project.getName());
swaggerInfo.setDescription(StringUtils.EMPTY);
swaggerInfo.setTermsOfService(StringUtils.EMPTY);
result.setInfo(swaggerInfo);
result.setInfo(new SwaggerInfo());
result.setServers(new ArrayList<>());
result.setTags(new ArrayList<>());
result.setComponents(JSONUtil.createObj());

View File

@ -153,8 +153,10 @@ export default {
open(currentModule) {
this.scenarioForm = {principal: getCurrentUser().id};
this.currentModule = currentModule;
if (this.scenarioForm.apiScenarioModuleId === undefined) {
if (this.scenarioForm.apiScenarioModuleId === undefined && !currentModule.id) {
this.scenarioForm.apiScenarioModuleId = this.moduleOptions[0].id;
} else if (currentModule.id) {
this.scenarioForm.apiScenarioModuleId = currentModule.id;
}
this.getMaintainerOptions();
this.visible = true;

View File

@ -217,10 +217,12 @@ export default {
},
open(currentModule) {
this.httpForm = {method: REQ_METHOD[0].id, userId: getCurrentUser().id};
if (this.httpForm.moduleId === undefined) {
this.httpForm.moduleId = this.moduleOptions[0].id;
}
this.currentModule = currentModule;
if (this.httpForm.moduleId === undefined && !currentModule.id) {
this.httpForm.moduleId = this.moduleOptions[0].id;
} else if (currentModule.id) {
this.httpForm.moduleId = currentModule.id;
}
this.getMaintainerOptions();
this.httpVisible = true;
},

View File

@ -23,7 +23,7 @@
<spring-cloud.version>2021.0.4</spring-cloud.version>
<dubbo.version>2.7.15</dubbo.version>
<flyway.version>7.15.0</flyway.version>
<shiro.version>1.9.1</shiro.version>
<shiro.version>1.10.0</shiro.version>
<mssql-jdbc.version>7.4.1.jre8</mssql-jdbc.version>
<postgresql.version>42.3.2</postgresql.version>
<java-websocket.version>1.5.3</java-websocket.version>

View File

@ -248,7 +248,7 @@ public class TestCaseController {
testCaseService.testCaseTemplateExport(projectId, importType, response);
}
@GetMapping("/export/xmindTemplate/{projectId}/{importType}")
@GetMapping("/export/xmind/template/{projectId}/{importType}")
@RequiresPermissions(PermissionConstants.PROJECT_TRACK_CASE_READ_EXPORT)
public void xmindTemplate(@PathVariable String projectId, @PathVariable String importType, HttpServletResponse response) {
testCaseService.testCaseXmindTemplateExport(projectId, importType, response);

View File

@ -1362,7 +1362,7 @@ public class TestCaseService {
// 发送给客户端的数据
byte[] buff = new byte[1024];
try (OutputStream outputStream = res.getOutputStream();
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getResourceAsStream("/io/metersphere/xmind/template/" + fileName));) {
BufferedInputStream bis = new BufferedInputStream(TestCaseService.class.getClassLoader().getResourceAsStream("xmind/" + fileName));) {
int i = bis.read(buff);
while (i != -1) {
outputStream.write(buff, 0, buff.length);

Binary file not shown.

View File

@ -157,7 +157,7 @@ export default {
downloadXmindTemplate() {
let uri = '/test/case/export/template/';
if (this.isXmind) {
uri = '/test/case/export/xmindTemplate/';
uri = '/test/case/export/xmind/template/';
}
this.$fileDownload(uri + getCurrentProjectID() + '/' + this.importType);
},