Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
404bcff3
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
404bcff3
编写于
7月 24, 2020
作者:
W
wenyann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(deps): 调整条件筛选sql
上级
fd8b9b3a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
61 addition
and
21 deletion
+61
-21
backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml
.../java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml
+3
-1
backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestReportMapper.xml
...io/metersphere/base/mapper/ext/ExtApiTestReportMapper.xml
+14
-4
backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml
...java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml
+3
-2
backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml
...o/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml
+21
-10
backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
...java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
+20
-4
未找到文件。
backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestMapper.xml
浏览文件 @
404bcff3
...
...
@@ -122,12 +122,14 @@
</if>
<if
test=
"request.filters != null and request.filters.size() > 0"
>
<foreach
collection=
"request.filters.entrySet()"
index=
"key"
item=
"values"
>
<if
test=
"values != null and values.size() > 0"
>
and api_test.
${key}
in
and api_test.
status
in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</if>
</foreach>
</if>
</where>
...
...
backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestReportMapper.xml
浏览文件 @
404bcff3
...
...
@@ -89,10 +89,20 @@
<if
test=
"request.filters != null and request.filters.size() > 0"
>
<foreach
collection=
"request.filters.entrySet()"
index=
"key"
item=
"values"
>
<if
test=
"values != null and values.size() > 0"
>
and r.${key} in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
<choose>
<when
test=
"key=='status'"
>
and r.status in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</when>
<otherwise>
and r.trigger_mode in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</otherwise>
</choose>
</if>
</foreach>
</if>
...
...
backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestMapper.xml
浏览文件 @
404bcff3
...
...
@@ -51,7 +51,8 @@
</if>
</sql>
<select
id=
"list"
resultMap=
"BaseResultMap"
parameterType=
"io.metersphere.track.request.testplan.QueryTestPlanRequest"
>
<select
id=
"list"
resultMap=
"BaseResultMap"
parameterType=
"io.metersphere.track.request.testplan.QueryTestPlanRequest"
>
select load_test.*, project.name as project_name, user.name as user_name
from load_test
left join project on load_test.project_id = project.id
...
...
@@ -83,7 +84,7 @@
<if
test=
"request.filters != null and request.filters.size() > 0"
>
<foreach
collection=
"request.filters.entrySet()"
index=
"key"
item=
"values"
>
<if
test=
"values != null and values.size() > 0"
>
and load_test.
${key}
in
and load_test.
status
in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
...
...
backend/src/main/java/io/metersphere/base/mapper/ext/ExtLoadTestReportMapper.xml
浏览文件 @
404bcff3
...
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"io.metersphere.base.mapper.ext.ExtLoadTestReportMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"io.metersphere.base.domain.LoadTestReport"
>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"test_id"
jdbcType=
"VARCHAR"
property=
"testId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"test_id"
jdbcType=
"VARCHAR"
property=
"testId"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"create_time"
jdbcType=
"BIGINT"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"BIGINT"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -95,10 +95,21 @@
<if
test=
"reportRequest.filters != null and reportRequest.filters.size() > 0"
>
<foreach
collection=
"reportRequest.filters.entrySet()"
index=
"key"
item=
"values"
>
<if
test=
"values != null and values.size() > 0"
>
and ltr.${key} in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
<choose>
<when
test=
"key=='status'"
>
and ltr.status in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</when>
<otherwise>
and ltr.trigger_mode in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</otherwise>
</choose>
</if>
</foreach>
</if>
...
...
backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
浏览文件 @
404bcff3
...
...
@@ -168,10 +168,26 @@
<if
test=
"request.filters != null and request.filters.size() > 0"
>
<foreach
collection=
"request.filters.entrySet()"
index=
"key"
item=
"values"
>
<if
test=
"values != null and values.size() > 0"
>
and test_case.${key} in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
<choose>
<when
test=
"key=='priority'"
>
and test_case.priority in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</when>
<when
test=
"key=='type'"
>
and test_case.type in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</when>
<otherwise>
and test_case.method in
<foreach
collection=
"values"
item=
"value"
separator=
","
open=
"("
close=
")"
>
#{value}
</foreach>
</otherwise>
</choose>
</if>
</foreach>
</if>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录