fix(接口测试): 修复批量执行后批量编辑报错问题

This commit is contained in:
fit2-zhao 2023-02-27 16:32:11 +08:00 committed by fit2-zhao
parent 8c79d1ec01
commit 1a13c8f989
2 changed files with 5 additions and 1 deletions

View File

@ -55,6 +55,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import jakarta.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
@ -634,6 +635,9 @@ public class ApiTestCaseService {
this.batchEditTags(request, ids);
return;
}
if (CollectionUtils.isEmpty(ids)) {
return;
}
ApiTestCaseExample apiDefinitionExample = new ApiTestCaseExample();
apiDefinitionExample.createCriteria().andIdIn(ids);
if (StringUtils.isNotEmpty(request.getPriority())) {

View File

@ -1101,6 +1101,7 @@ export default {
let arr = Array.from(this.selectRows);
let ids = arr.map((row) => row.id);
let param = {};
Object.assign(param, this.condition);
if (form.type === 'tags') {
param.type = form.type;
param.appendTag = form.appendTag;
@ -1112,7 +1113,6 @@ export default {
param.projectId = this.projectId;
param.selectAllDate = this.selectAll;
param.unSelectIds = this.unSelection;
param = Object.assign(param, this.condition);
editApiCaseByParam(param).then(() => {
this.$success(this.$t('commons.save_success'));
this.initTable();