fix(接口测试): 接口导出问题

--user=郭雨琦
--bug=1014634
【接口测试】接口定义-新建的一级模块下的接口导出后的模块错误
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014634
This commit is contained in:
guoyuqi 2022-07-05 18:56:36 +08:00 committed by xiaomeinvG
parent 81b44247c7
commit 6e6c2f27f1
1 changed files with 5 additions and 0 deletions

View File

@ -1570,6 +1570,11 @@ public class ApiDefinitionService {
}
//name在这里只是查询参数
request.setName(null);
//如果移动模块需要重新设置模块路径
if (request.getModuleId() != null) {
ApiModule apiModule = apiModuleMapper.selectByPrimaryKey(request.getModuleId());
request.setModulePath("/" + apiModule.getName());
}
ApiDefinitionWithBLOBs definitionWithBLOBs = new ApiDefinitionWithBLOBs();
BeanUtils.copyBean(definitionWithBLOBs, request);
definitionWithBLOBs.setUpdateTime(System.currentTimeMillis());