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

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

View File

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

View File

@ -409,12 +409,12 @@
</foreach>
</if>
</where>
<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>
<!-- <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="selectIdsNotExistsInPlan" resultType="java.lang.String">
select c.id

View File

@ -310,7 +310,14 @@ export default {
},
getConditions() {
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);
return param;
}