Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
bae5d953
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,发现更多精彩内容 >>
提交
bae5d953
编写于
5月 26, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
测试用例默认按更新时间排序
上级
da32ae5a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
2 deletion
+29
-2
backend/src/main/java/io/metersphere/commons/utils/ServiceUtils.java
.../main/java/io/metersphere/commons/utils/ServiceUtils.java
+21
-0
backend/src/main/java/io/metersphere/track/service/TestCaseService.java
...in/java/io/metersphere/track/service/TestCaseService.java
+3
-0
backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java
...io/metersphere/track/service/TestPlanTestCaseService.java
+3
-0
frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/BaseInfoComponent.vue
.../comonents/report/TemplateComponent/BaseInfoComponent.vue
+2
-2
未找到文件。
backend/src/main/java/io/metersphere/commons/utils/ServiceUtils.java
0 → 100644
浏览文件 @
bae5d953
package
io.metersphere.commons.utils
;
import
io.metersphere.controller.request.OrderRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
ServiceUtils
{
public
static
List
<
OrderRequest
>
getDefaultOrder
(
List
<
OrderRequest
>
orders
)
{
if
(
orders
==
null
||
orders
.
size
()
<
1
)
{
OrderRequest
orderRequest
=
new
OrderRequest
();
orderRequest
.
setName
(
"update_time"
);
orderRequest
.
setType
(
"desc"
);
orders
=
new
ArrayList
<>();
orders
.
add
(
orderRequest
);
return
orders
;
}
return
orders
;
}
}
backend/src/main/java/io/metersphere/track/service/TestCaseService.java
浏览文件 @
bae5d953
...
...
@@ -10,7 +10,9 @@ import io.metersphere.commons.exception.MSException;
import
io.metersphere.commons.user.SessionUser
;
import
io.metersphere.commons.utils.BeanUtils
;
import
io.metersphere.commons.utils.LogUtil
;
import
io.metersphere.commons.utils.ServiceUtils
;
import
io.metersphere.commons.utils.SessionUtils
;
import
io.metersphere.controller.request.OrderRequest
;
import
io.metersphere.excel.domain.ExcelErrData
;
import
io.metersphere.excel.domain.ExcelResponse
;
import
io.metersphere.excel.domain.TestCaseExcelData
;
...
...
@@ -101,6 +103,7 @@ public class TestCaseService {
}
public
List
<
TestCaseDTO
>
listTestCase
(
QueryTestCaseRequest
request
)
{
request
.
setOrders
(
ServiceUtils
.
getDefaultOrder
(
request
.
getOrders
()));
return
extTestCaseMapper
.
list
(
request
);
}
...
...
backend/src/main/java/io/metersphere/track/service/TestPlanTestCaseService.java
浏览文件 @
bae5d953
...
...
@@ -7,7 +7,9 @@ import io.metersphere.base.mapper.ext.ExtTestPlanTestCaseMapper;
import
io.metersphere.commons.constants.TestPlanTestCaseStatus
;
import
io.metersphere.commons.user.SessionUser
;
import
io.metersphere.commons.utils.BeanUtils
;
import
io.metersphere.commons.utils.ServiceUtils
;
import
io.metersphere.commons.utils.SessionUtils
;
import
io.metersphere.controller.request.OrderRequest
;
import
io.metersphere.controller.request.member.QueryMemberRequest
;
import
io.metersphere.service.UserService
;
import
io.metersphere.track.dto.TestPlanCaseDTO
;
...
...
@@ -41,6 +43,7 @@ public class TestPlanTestCaseService {
ExtTestPlanTestCaseMapper
extTestPlanTestCaseMapper
;
public
List
<
TestPlanCaseDTO
>
list
(
QueryTestPlanCaseRequest
request
)
{
request
.
setOrders
(
ServiceUtils
.
getDefaultOrder
(
request
.
getOrders
()));
List
<
TestPlanCaseDTO
>
list
=
extTestPlanTestCaseMapper
.
list
(
request
);
QueryMemberRequest
queryMemberRequest
=
new
QueryMemberRequest
();
queryMemberRequest
.
setWorkspaceId
(
SessionUtils
.
getCurrentWorkspaceId
());
...
...
frontend/src/business/components/track/plan/view/comonents/report/TemplateComponent/BaseInfoComponent.vue
浏览文件 @
bae5d953
...
...
@@ -19,12 +19,12 @@
<el-col
:span=
"12"
>
<span>
{{
$t
(
'
report.test_start_time
'
)
}}
:
</span>
<span
v-if=
"!isReport"
>
{{
reportInfo
.
startTime
}}
</span>
<el-date-picker
v-if=
"isReport"
size=
"mini"
type=
"date"
:placeholder=
"$t('
test_track.
commons.select_date')"
v-model=
"reportInfo.startTime"
/>
<el-date-picker
v-if=
"isReport"
size=
"mini"
type=
"date"
:placeholder=
"$t('commons.select_date')"
v-model=
"reportInfo.startTime"
/>
</el-col>
<el-col
:span=
"12"
>
<span>
{{
$t
(
'
report.test_end_time
'
)
}}
:
</span>
<span
v-if=
"!isReport"
>
{{
reportInfo
.
endTime
}}
</span>
<el-date-picker
v-if=
"isReport"
size=
"mini"
type=
"date"
:placeholder=
"$t('
test_track.
commons.select_date')"
v-model=
"reportInfo.endTime"
/>
<el-date-picker
v-if=
"isReport"
size=
"mini"
type=
"date"
:placeholder=
"$t('commons.select_date')"
v-model=
"reportInfo.endTime"
/>
</el-col>
</el-row>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录