This commit is contained in:
chenjianxing 2020-08-04 17:54:53 +08:00
commit f274cd3b32
7 changed files with 44 additions and 15 deletions

View File

@ -47,10 +47,6 @@ public class APITestController {
return apiTestService.getApiTestByProjectId(projectId);
}
@GetMapping("/state/get/{testId}")
public ApiTest apiState(@PathVariable String testId) {
return apiTestService.getApiTestByTestId(testId);
}
@PostMapping(value = "/schedule/update")
public void updateSchedule(@RequestBody Schedule request) {

View File

@ -126,9 +126,6 @@ public class APITestService {
return null;
}
public ApiTest getApiTestByTestId(String testId) {
return apiTestMapper.selectByPrimaryKey(testId);
}
public List<ApiTest> getApiTestByProjectId(String projectId) {
return extApiTestMapper.getApiTestByProjectId(projectId);

View File

@ -235,7 +235,12 @@
</foreach>
</if>
</where>
order by update_time desc
<if test="request.orders != null and request.orders.size() > 0">
order by
<foreach collection="request.orders" separator="," item="order">
${order.name} ${order.type}
</foreach>
</if>
</select>
<select id="getMaxNumByProjectId" resultType="io.metersphere.base.domain.TestCase">

View File

@ -1,6 +1,7 @@
package io.metersphere.track.request.testcase;
import io.metersphere.base.domain.TestCaseWithBLOBs;
import io.metersphere.controller.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
@ -10,4 +11,5 @@ import java.util.List;
@Setter
public class TestCaseBatchRequest extends TestCaseWithBLOBs {
private List<String> ids;
private List<OrderRequest> orders;
}

View File

@ -356,6 +356,12 @@ public class TestCaseService {
}
private List<TestCaseExcelData> generateTestCaseExcel(TestCaseBatchRequest request) {
List<OrderRequest> orderList = ServiceUtils.getDefaultOrder(request.getOrders());
OrderRequest order = new OrderRequest();
order.setName("sort");
order.setType("desc");
orderList.add(order);
request.setOrders(orderList);
List<TestCaseDTO> TestCaseList = extTestCaseMapper.listByTestCaseIds(request);
List<TestCaseExcelData> list = new ArrayList<>();
StringBuilder step = new StringBuilder("");
@ -466,6 +472,7 @@ public class TestCaseService {
/**
* 导入用例前检查数据库是否存在此用例
*
* @param testCaseWithBLOBs
* @return
*/

View File

@ -66,8 +66,8 @@
<el-table-column label="Throughput">
<el-table-column
prop="transactions"
label="Transactions"
width="100"
label="Transactions/s"
width="150"
/>
</el-table-column>
@ -76,13 +76,13 @@
prop="received"
label="Received"
align="center"
width="200"
width="150"
/>
<el-table-column
prop="sent"
label="Sent"
align="center"
width="200"
width="150"
/>
</el-table-column>

View File

@ -39,9 +39,25 @@
@confirm="submit('form')"/>
</template>
</el-dialog>
<el-dialog :title="$t('workspace.update')" :visible.sync="dialogWsUpdateVisible" width="30%">
<el-form :model="form" :rules="rules" ref="form" label-position="right" label-width="100px" size="small">
<el-form-item :label="$t('commons.name')" prop="name">
<el-input v-model="form.name" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('commons.description')" prop="description">
<el-input type="textarea" v-model="form.description"></el-input>
</el-form-item>
</el-form>
<template v-slot:footer>
<ms-dialog-footer
@cancel="dialogWsUpdateVisible = false"
@confirm="submit('form')"/>
</template>
</el-dialog>
<!-- dialog of workspace member -->
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc" class="dialog-css">
<el-dialog :visible.sync="dialogWsMemberVisible" width="70%" :destroy-on-close="true" @close="closeMemberFunc"
class="dialog-css">
<ms-table-header :condition.sync="dialogCondition" @create="addMember" @search="dialogSearch"
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
<!-- organization member table -->
@ -201,8 +217,13 @@
}
this.$post("/workspace/" + saveType, this.form, () => {
this.dialogWsAddVisible = false;
this.dialogWsUpdateVisible = false;
this.list();
Message.success(this.$t('commons.save_success'));
if (saveType == 'add') {
Message.success(this.$t('commons.save_success'));
} else if (saveType == 'update') {
Message.success(this.$t('commons.modify_success'));
}
});
} else {
return false;
@ -210,7 +231,7 @@
});
},
edit(row) {
this.dialogWsAddVisible = true;
this.dialogWsUpdateVisible = true;
this.form = Object.assign({}, row);
},
handleDelete(workspace) {
@ -423,6 +444,7 @@
return {
result: {},
dialogWsAddVisible: false,
dialogWsUpdateVisible: false,
dialogWsMemberVisible: false,
dialogWsMemberAddVisible: false,
dialogWsMemberUpdateVisible: false,