fix(接口定义): 解决:第一次 swagger 导入后移动 module 位置,再次导入后 module 位置被还原 bug (#1865)

This commit is contained in:
Coooder-X 2021-04-07 15:12:13 +08:00 committed by GitHub
parent 189dd3cd94
commit a9c53afaea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -373,6 +373,8 @@ public class ApiDefinitionService {
//如果存在则修改
apiDefinition.setId(sameRequest.get(0).getId());
String request = setImportHashTree(apiDefinition);
apiDefinition.setModuleId(sameRequest.get(0).getModuleId());
apiDefinition.setModulePath(sameRequest.get(0).getModulePath());
apiDefinitionMapper.updateByPrimaryKeyWithBLOBs(apiDefinition);
apiDefinition.setRequest(request);
importApiCase(apiDefinition, apiTestCaseMapper, apiTestImportRequest, false);