mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 19:18:59 +08:00
fix(用例管理): 用例详情执行评论重复关联显示更新时间最新的那一个
This commit is contained in:
parent
db15c7325d
commit
9bb85bad49
@ -74,7 +74,7 @@
|
||||
<include refid="planFilters">
|
||||
<property name="filter" value="request.filter"/>
|
||||
</include>
|
||||
group by tpfc.test_plan_id
|
||||
order by tpfc.last_exec_time desc
|
||||
</select>
|
||||
|
||||
<select id="getPlanExecuteHistoryList" resultType="io.metersphere.functional.dto.TestPlanCaseExecuteHistoryDTO">
|
||||
|
@ -34,10 +34,8 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author guoyuqi
|
||||
@ -254,7 +252,15 @@ public class FunctionalTestCaseService {
|
||||
* @return List<FunctionalCaseTestPlanDTO>
|
||||
*/
|
||||
public List<FunctionalCaseTestPlanDTO> hasAssociatePlanPage(AssociatePlanPageRequest request) {
|
||||
return extFunctionalCaseTestMapper.getPlanList(request);
|
||||
List<FunctionalCaseTestPlanDTO> planList = extFunctionalCaseTestMapper.getPlanList(request);
|
||||
List<FunctionalCaseTestPlanDTO> returnList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(planList)) {
|
||||
LinkedHashMap<String, List<FunctionalCaseTestPlanDTO>> caseMap = planList.stream().collect(Collectors.groupingBy(FunctionalCaseTestPlanDTO::getTestPlanId, LinkedHashMap::new, Collectors.toList()));
|
||||
caseMap.forEach((planId,list)->{
|
||||
returnList.add(list.get(0));
|
||||
});
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
public List<TestPlanCaseExecuteHistoryDTO> getTestPlanCaseExecuteHistory(String caseId) {
|
||||
|
Loading…
Reference in New Issue
Block a user