fix(测试跟踪): 修复执行测试计划后可能会出现接口报告创建人显示不正确的问题
--bug=1016726 --user=宋天阳 [测试跟踪]github #17849执行测试计划后报告创建人显示不正确 https://www.tapd.cn/55049933/s/1244293
This commit is contained in:
parent
53f7d9c68a
commit
e3bf964a3d
|
@ -90,13 +90,13 @@ public class TestPlanApiCaseService {
|
|||
|
||||
public void buildUserInfo(List<? extends TestPlanApiCaseDTO> apiTestCases) {
|
||||
List<String> userIds = new ArrayList();
|
||||
userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getCreateUser).collect(Collectors.toList()));
|
||||
userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getCreateUserId).collect(Collectors.toList()));
|
||||
userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getUpdateUser).collect(Collectors.toList()));
|
||||
userIds.addAll(apiTestCases.stream().map(TestPlanApiCaseDTO::getUserId).collect(Collectors.toList()));
|
||||
if (!org.apache.commons.collections.CollectionUtils.isEmpty(userIds)) {
|
||||
Map<String, String> userMap = ServiceUtils.getUserNameMap(userIds);
|
||||
apiTestCases.forEach(caseResult -> {
|
||||
caseResult.setCreatorName(userMap.get(caseResult.getCreateUser()));
|
||||
caseResult.setCreatorName(userMap.get(caseResult.getCreateUserId()));
|
||||
caseResult.setUpdateName(userMap.get(caseResult.getUpdateUser()));
|
||||
caseResult.setPrincipalName(userMap.get(caseResult.getUserId()));
|
||||
});
|
||||
|
@ -135,7 +135,7 @@ public class TestPlanApiCaseService {
|
|||
}
|
||||
|
||||
public int deleteByCaseId(String caseId) {
|
||||
return this.deleteByCaseIds(Arrays.asList(caseId));
|
||||
return this.deleteByCaseIds(Arrays.asList(caseId));
|
||||
}
|
||||
|
||||
public int deleteByCaseIds(List<String> caseIds) {
|
||||
|
|
Loading…
Reference in New Issue