fix(测试跟踪): 修复首页跳转
This commit is contained in:
parent
6be8af57a3
commit
39f48e3583
|
@ -306,9 +306,12 @@
|
|||
or test_case.num like CONCAT('%', #{request.name},'%')
|
||||
or test_case.tags like CONCAT('%', #{request.name},'%'))
|
||||
</if>
|
||||
<if test="request.createTime >0">
|
||||
<if test="request.relevanceCreateTime >0">
|
||||
and test_case.id in (select test_case_id from test_case_test where test_case_test.create_time >= #{request.createTime})
|
||||
</if>
|
||||
<if test="request.createTime >0">
|
||||
and test_case.create_time >= #{request.createTime}
|
||||
</if>
|
||||
<if test="request.nodeIds != null and request.nodeIds.size() > 0">
|
||||
and test_case.node_id in
|
||||
<foreach collection="request.nodeIds" item="nodeId" separator="," open="(" close=")">
|
||||
|
|
|
@ -24,8 +24,10 @@ public class QueryTestCaseRequest extends BaseQueryRequest {
|
|||
private String reviewId;
|
||||
|
||||
private boolean isSelectThisWeedData = false;
|
||||
private boolean isSelectThisWeedRelevanceData = false;
|
||||
|
||||
private String caseCoverage;
|
||||
|
||||
private long createTime = 0;
|
||||
private long relevanceCreateTime = 0;
|
||||
}
|
||||
|
|
|
@ -210,13 +210,19 @@ public class TestCaseService {
|
|||
*/
|
||||
private void initRequest(QueryTestCaseRequest request, boolean checkThisWeekData) {
|
||||
if (checkThisWeekData) {
|
||||
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
|
||||
Date weekFirstTime = weekFirstTimeAndLastTime.get("firstTime");
|
||||
if (request.isSelectThisWeedData()) {
|
||||
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
|
||||
Date weekFirstTime = weekFirstTimeAndLastTime.get("firstTime");
|
||||
if (weekFirstTime != null) {
|
||||
request.setCreateTime(weekFirstTime.getTime());
|
||||
}
|
||||
}
|
||||
if (request.isSelectThisWeedRelevanceData()) {
|
||||
if (weekFirstTime != null) {
|
||||
request.setRelevanceCreateTime(weekFirstTime.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -409,11 +409,15 @@ export default {
|
|||
getData() {
|
||||
this.getSelectDataRange();
|
||||
this.condition.selectThisWeedData = false;
|
||||
this.condition.selectThisWeedRelevanceData = false;
|
||||
this.condition.caseCoverage = null;
|
||||
switch (this.selectDataRange) {
|
||||
case 'thisWeekCount':
|
||||
this.condition.selectThisWeedData = true;
|
||||
break;
|
||||
case 'thisWeekRelevanceCount':
|
||||
this.condition.selectThisWeedRelevanceData = true;
|
||||
break;
|
||||
case 'uncoverage':
|
||||
this.condition.caseCoverage = 'uncoverage';
|
||||
break;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<el-row>
|
||||
<el-col>
|
||||
{{$t('api_test.home_page.api_details_card.this_week_add')}}
|
||||
<el-link type="info" @click="redirectPage('thisWeekCount')" target="_blank" style="color: #000000">{{relevanceCountData.thisWeekAddedCount}}
|
||||
<el-link type="info" @click="redirectPage('thisWeekRelevanceCount')" target="_blank" style="color: #000000">{{relevanceCountData.thisWeekAddedCount}}
|
||||
</el-link>
|
||||
{{$t('api_test.home_page.unit_of_measurement')}}
|
||||
</el-col>
|
||||
|
|
Loading…
Reference in New Issue