fix: 修复场景引用用例的全选不生效的缺陷

修复场景引用用例的全选不生效的缺陷
This commit is contained in:
song-tianyang 2021-06-07 16:33:09 +08:00 committed by 刘瑞斌
parent 0ba12e68e9
commit 17ed42dde4
3 changed files with 15 additions and 7 deletions

View File

@ -694,6 +694,7 @@ public class ApiTestCaseService {
public List<ApiTestCaseInfo> findApiTestCaseBLOBs(ApiTestCaseRequest request) { public List<ApiTestCaseInfo> findApiTestCaseBLOBs(ApiTestCaseRequest request) {
List<String> ids = request.getIds(); List<String> ids = request.getIds();
if (request.isSelectAll()) { if (request.isSelectAll()) {
request.setIds(null);
ids = this.idSimple(request); ids = this.idSimple(request);
ids.removeAll(request.getUnSelectIds()); ids.removeAll(request.getUnSelectIds());
request.setIds(ids); request.setIds(ids);

View File

@ -409,12 +409,12 @@
</foreach> </foreach>
</if> </if>
</where> </where>
<if test="request.orders != null and request.orders.size() > 0"> <!-- <if test="request.orders != null and request.orders.size() > 0">-->
order by <!-- order by-->
<foreach collection="request.orders" separator="," item="order"> <!-- <foreach collection="request.orders" separator="," item="order">-->
${order.name} ${order.type} <!-- ${order.name} ${order.type}-->
</foreach> <!-- </foreach>-->
</if> <!-- </if>-->
</select> </select>
<select id="selectIdsNotExistsInPlan" resultType="java.lang.String"> <select id="selectIdsNotExistsInPlan" resultType="java.lang.String">
select c.id select c.id

View File

@ -310,7 +310,14 @@ export default {
}, },
getConditions() { getConditions() {
let sampleSelectRows = this.$refs.table.getSelectRows(); let sampleSelectRows = this.$refs.table.getSelectRows();
let param = buildBatchParam(this); let batchParam = buildBatchParam(this);
let param = {};
if(batchParam.condition){
param = batchParam.condition;
param.projectId = batchParam.projectId;
}else{
param = batchParam;
}
param.ids = Array.from(sampleSelectRows).map(row => row.id); param.ids = Array.from(sampleSelectRows).map(row => row.id);
return param; return param;
} }