fix(接口测试): 修复ms场景格式导入csv信息id冲突的问题

This commit is contained in:
Jianguo-Genius 2024-10-24 10:28:08 +08:00 committed by 建国
parent ea3675bf18
commit 1595ad5db9
1 changed files with 3 additions and 0 deletions

View File

@ -520,6 +520,9 @@ public class ApiScenarioDataTransferService {
if (t.getScenarioConfig() == null) { if (t.getScenarioConfig() == null) {
apiScenarioBlob.setConfig(JSON.toJSONString(new ScenarioConfig()).getBytes()); apiScenarioBlob.setConfig(JSON.toJSONString(new ScenarioConfig()).getBytes());
} else { } else {
if (t.getScenarioConfig().getVariable() != null && t.getScenarioConfig().getVariable().getCsvVariables() != null) {
t.getScenarioConfig().getVariable().getCsvVariables().forEach(item -> item.setId(IDGenerator.nextStr()));
}
apiScenarioBlob.setConfig(JSON.toJSONString(t.getScenarioConfig()).getBytes()); apiScenarioBlob.setConfig(JSON.toJSONString(t.getScenarioConfig()).getBytes());
} }
apiScenarioBlobBatchMapper.insert(apiScenarioBlob); apiScenarioBlobBatchMapper.insert(apiScenarioBlob);