fix(接口自动化)复制场景创建人错误修复

This commit is contained in:
fit2-zhao 2021-04-19 10:28:47 +08:00 committed by fit2-zhao
parent fbdb707d7a
commit 42cc4de35d
1 changed files with 1 additions and 5 deletions

View File

@ -262,11 +262,7 @@ public class ApiAutomationService {
} else {
scenario.setStatus(ScenarioStatus.Underway.name());
}
if (request.getUserId() == null) {
scenario.setUserId(SessionUtils.getUserId());
} else {
scenario.setUserId(request.getUserId());
}
scenario.setUserId(SessionUtils.getUserId());
if (StringUtils.isEmpty(request.getApiScenarioModuleId()) || "default-module".equals(request.getApiScenarioModuleId())) {
ApiScenarioModuleExample example = new ApiScenarioModuleExample();
example.createCriteria().andProjectIdEqualTo(request.getProjectId()).andNameEqualTo("默认模块");