fix(接口测试): 修复场景列表全选后单条删除问题
--bug=1020015 --user=赵勇 【接口测试】场景列表-全选-选择所有数据-单独删除一条数据-会把所有数据都删了 https://www.tapd.cn/55049933/s/1300386
This commit is contained in:
parent
3aa5676418
commit
fa85a19069
|
@ -1708,13 +1708,16 @@ public class ApiScenarioService {
|
|||
}
|
||||
|
||||
public void removeToGcByBatch(ApiScenarioBatchRequest request) {
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) -> extApiScenarioMapper.selectIdsByQuery(query));
|
||||
|
||||
if (request.getCondition() != null && request.getCondition().isSelectAll()) {
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) ->
|
||||
extApiScenarioMapper.selectIdsByQuery(query));
|
||||
}
|
||||
this.removeToGc(request.getIds());
|
||||
}
|
||||
|
||||
public void deleteBatchByCondition(ApiScenarioBatchRequest request) {
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) -> extApiScenarioMapper.selectIdsByQuery(query));
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) ->
|
||||
extApiScenarioMapper.selectIdsByQuery(query));
|
||||
List<String> ids = request.getIds();
|
||||
this.deleteBatch(ids);
|
||||
}
|
||||
|
|
|
@ -1409,12 +1409,8 @@ export default {
|
|||
this.$refs.apiDeleteConfirmVersion.close();
|
||||
this.search();
|
||||
});
|
||||
}
|
||||
// 删除全部版本
|
||||
else {
|
||||
let param = {};
|
||||
this.buildBatchParam(param);
|
||||
param.ids = [api.id];
|
||||
} else {
|
||||
let param = { ids: [api.id] };
|
||||
removeScenarioToGcByBatch(param).then(() => {
|
||||
this.$success(this.$t('commons.delete_success'));
|
||||
this.$refs.apiDeleteConfirmVersion.close();
|
||||
|
|
Loading…
Reference in New Issue