Merge remote-tracking branch 'origin/master'

This commit is contained in:
Captain.B 2021-03-12 15:56:26 +08:00
commit e9e3dce76c
1 changed files with 8 additions and 2 deletions

View File

@ -126,8 +126,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());
}
});
}
}