fix(场景自动化): 修复sql 执行结果类型错误

This commit is contained in:
fit2-zhao 2021-01-26 19:49:14 +08:00
parent dcd30a1fb7
commit 421c4263b7
2 changed files with 5 additions and 3 deletions

View File

@ -356,6 +356,8 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
return protocol.toUpperCase(); return protocol.toUpperCase();
} }
return RequestType.DUBBO; return RequestType.DUBBO;
} else if (StringUtils.contains(result.getResponseHeaders(), "url:jdbc")) {
return "SQL";
} else { } else {
// Http Method // Http Method
String method = StringUtils.substringBefore(body, " "); String method = StringUtils.substringBefore(body, " ");

View File

@ -45,8 +45,8 @@
<el-tab-pane v-if="activeName == 'body'" :disabled="true" name="mode" class="pane assertions"> <el-tab-pane v-if="activeName == 'body'" :disabled="true" name="mode" class="pane assertions">
<template v-slot:label> <template v-slot:label>
<ms-dropdown v-if="!isSqlType" :commands="modes" :default-command="mode" @command="modeChange"/> <ms-dropdown v-if="request.method==='SQL'" :commands="sqlModes" :default-command="mode" @command="sqlModeChange"/>
<ms-dropdown v-if="isSqlType" :commands="sqlModes" :default-command="mode" @command="sqlModeChange"/> <ms-dropdown v-else :commands="modes" :default-command="mode" @command="modeChange" ref="modeDropdown"/>
</template> </template>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -110,7 +110,7 @@
computed: { computed: {
isSqlType() { isSqlType() {
return (this.requestType === RequestFactory.TYPES.SQL && this.response.responseCode === '200'); return ((this.requestType === RequestFactory.TYPES.SQL || this.request.method === RequestFactory.TYPES.SQL) && this.response.responseCode === '200'&& this.mode === 'table');
} }
} }
} }