fix: 删除相关用户,接口测试用例列表报错
This commit is contained in:
parent
2b9713b143
commit
95db94e83e
|
@ -123,8 +123,14 @@ public class ApiTestCaseService {
|
|||
if (!CollectionUtils.isEmpty(userIds)) {
|
||||
Map<String, User> userMap = userService.queryNameByIds(userIds);
|
||||
apiTestCases.forEach(caseResult -> {
|
||||
caseResult.setCreateUser(userMap.get(caseResult.getCreateUserId()).getName());
|
||||
caseResult.setUpdateUser(userMap.get(caseResult.getUpdateUserId()).getName());
|
||||
User createUser = userMap.get(caseResult.getCreateUserId());
|
||||
if (createUser != null) {
|
||||
caseResult.setCreateUser(createUser.getName());
|
||||
}
|
||||
User updateUser = userMap.get(caseResult.getUpdateUserId());
|
||||
if (updateUser != null) {
|
||||
caseResult.setUpdateUser(updateUser.getName());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue