mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix(测试跟踪): 当前项目责任人删除时展示问题
--bug=1023182 --user=宋昌昌 【测试跟踪】功能用例-选择模块-全选-选择所有页-导出文件-用例状态和责任人为空 https://www.tapd.cn/55049933/s/1376158
This commit is contained in:
parent
e440569e3b
commit
99879a4a3c
@ -813,7 +813,7 @@ public class TestCaseService {
|
||||
ServiceUtils.buildCombineTagsToSupportMultiple(request);
|
||||
List<TestCaseDTO> list = extTestCaseMapper.list(request);
|
||||
if (!isSampleInfo) {
|
||||
buildUserInfo(list);
|
||||
buildUserInfoByCurrentProjectMembers(list);
|
||||
if (StringUtils.isNotBlank(request.getProjectId())) {
|
||||
buildProjectInfo(request.getProjectId(), list);
|
||||
} else {
|
||||
@ -3047,6 +3047,17 @@ public class TestCaseService {
|
||||
});
|
||||
}
|
||||
|
||||
public void buildUserInfoByCurrentProjectMembers(List<TestCaseDTO> testCases) {
|
||||
Map<String, String> userMap = baseUserService.getProjectMemberOption(SessionUtils.getCurrentProjectId())
|
||||
.stream()
|
||||
.collect(Collectors.toMap(User::getId, User::getName));
|
||||
testCases.forEach(caseResult -> {
|
||||
caseResult.setCreateName(userMap.get(caseResult.getCreateUser()));
|
||||
caseResult.setDeleteUserId(userMap.get(caseResult.getDeleteUserId()));
|
||||
caseResult.setMaintainerName(userMap.get(caseResult.getMaintainer()));
|
||||
});
|
||||
}
|
||||
|
||||
public void buildUserInfo(List<TestCaseDTO> testCases) {
|
||||
List<String> userIds = new ArrayList();
|
||||
userIds.addAll(testCases.stream().map(TestCase::getCreateUser).collect(Collectors.toList()));
|
||||
|
Loading…
Reference in New Issue
Block a user