fix: 修复编辑场景时创建人变了的问题

--bug=1009528 --user=刘瑞斌 【接口测试】github#9217,场景创建人会自动修改 https://www.tapd.cn/55049933/s/1091319

Closes #9217
This commit is contained in:
CaptainB 2022-01-13 14:30:32 +08:00 committed by 刘瑞斌
parent 220cb332e3
commit a2a6109eff
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ public class ApiAutomationService {
deleteUpdateBodyFile(scenario, beforeScenario); deleteUpdateBodyFile(scenario, beforeScenario);
List<ApiMethodUrlDTO> useUrl = this.parseUrl(scenario); List<ApiMethodUrlDTO> useUrl = this.parseUrl(scenario);
scenario.setUseUrl(JSONArray.toJSONString(useUrl)); scenario.setUseUrl(JSONArray.toJSONString(useUrl));
scenario.setCreateUser(null); // 更新时不更新创建人
ApiScenarioExample example = new ApiScenarioExample(); ApiScenarioExample example = new ApiScenarioExample();
example.createCriteria().andIdEqualTo(scenario.getId()).andVersionIdEqualTo(request.getVersionId()); example.createCriteria().andIdEqualTo(scenario.getId()).andVersionIdEqualTo(request.getVersionId());
if (apiScenarioMapper.updateByExampleSelective(scenario, example) == 0) { if (apiScenarioMapper.updateByExampleSelective(scenario, example) == 0) {