fix(接口测试): 接口定义详情不显示模块名称

--bug=1045008 --user=陈建星 【接口测试】定义-预览-基本信息-所属模块显示错误,一直显示- https://www.tapd.cn/55049933/s/1562082
This commit is contained in:
AgAngle 2024-08-13 18:20:48 +08:00 committed by 刘瑞斌
parent 50af2f5b93
commit 86dd4b1f74
1 changed files with 4 additions and 0 deletions

View File

@ -918,6 +918,10 @@ public class ApiDefinitionService extends MoveNodeService {
Map<String, String> userMap = userLoginService.getUserNameMap(new ArrayList<>(userIds));
apiDefinitionDTO.setCreateUserName(userMap.get(apiDefinitionDTO.getCreateUser()));
apiDefinitionDTO.setUpdateUserName(userMap.get(apiDefinitionDTO.getUpdateUser()));
ApiDefinitionModule apiDefinitionModule = apiDefinitionModuleMapper.selectByPrimaryKey(apiDefinitionDTO.getModuleId());
if (apiDefinitionModule != null) {
apiDefinitionDTO.setModuleName(apiDefinitionModule.getName());
}
return apiDefinitionDTO;
}