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