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

View File

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