fix: 报告查询时从前端传递项目ID#1005590

--bug=1005590 --user=lyh
/test/plan/report/list/{goPage}/{pageSize},返回的是登陆用户lastprojectId项目下的报告列表
https://www.tapd.cn/55049933/s/1031863
This commit is contained in:
shiziyuan9527 2021-08-03 18:08:25 +08:00 committed by 刘瑞斌
parent 37a6e78fbb
commit 551c3dfd2a
2 changed files with 6 additions and 5 deletions

View File

@ -87,15 +87,15 @@ public class TestPlanReportService {
private final ExecutorService executorService = Executors.newFixedThreadPool(20);
public List<TestPlanReportDTO> list(QueryTestPlanReportRequest request) {
List<TestPlanReportDTO> list = new ArrayList<>();
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
String projectId = SessionUtils.getCurrentProjectId();
if (StringUtils.isNotBlank(projectId)) {
request.setProjectId(projectId);
}
List<TestPlanReportDTO> list = extTestPlanReportMapper.list(request);
// this.checkReport(list);
if (StringUtils.isBlank(request.getProjectId())) {
return list;
}
list = extTestPlanReportMapper.list(request);
return list;
}
// private void checkReport(List<TestPlanReportDTO> list) {
// if(CollectionUtils.isNotEmpty(list)){
// for (TestPlanReportDTO dto : list){

View File

@ -167,6 +167,7 @@ export default {
if (!this.projectId) {
return;
}
this.condition.projectId = getCurrentProjectID();
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
let data = response.data;
this.total = data.itemCount;