提交 7f0df731 authored 作者: 吕本才's avatar 吕本才

1、修改返回的reportType,2、为空时报表分组关联关系不再新增

上级 e48876b1
...@@ -7,7 +7,7 @@ import java.util.List; ...@@ -7,7 +7,7 @@ import java.util.List;
@Data @Data
public class CustomerReportGroupVo { public class CustomerReportGroupVo {
private String id; private String groupId;
private String groupName; private String groupName;
private List<ReportItemsDto> items; private List<ReportItemsDto> items;
} }
...@@ -17,7 +17,7 @@ public class ReportShareBiListDto { ...@@ -17,7 +17,7 @@ public class ReportShareBiListDto {
private String previewUrl; private String previewUrl;
private String reportName; private String reportName;
// 报表类型,0自定义报表 1 积木报表 // 报表类型,0自定义报表 1 积木报表
private Integer reportType; private Integer reportType = 1;
} }
package com.link.report.service.impl; package com.link.report.service.impl;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.link.report.domain.dao.CustomerGroupDao; import com.link.report.domain.dao.CustomerGroupDao;
import com.link.report.domain.dao.CustomerReportGroupDao; import com.link.report.domain.dao.CustomerReportGroupDao;
import com.link.report.domain.entity.CustomerReportGroup; import com.link.report.domain.entity.CustomerReportGroup;
...@@ -55,6 +56,7 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic ...@@ -55,6 +56,7 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic
itemsDto.setReportId(reportGroupQueryListDto.getReportId()); itemsDto.setReportId(reportGroupQueryListDto.getReportId());
itemsDto.setReportName(reportGroupQueryListDto.getReportName()); itemsDto.setReportName(reportGroupQueryListDto.getReportName());
itemsDto.setPreviewUrl(reportGroupQueryListDto.getPreviewUrl()); itemsDto.setPreviewUrl(reportGroupQueryListDto.getPreviewUrl());
itemsDto.setReportType(reportGroupQueryListDto.getReportType());
itemsDtos.add(itemsDto); itemsDtos.add(itemsDto);
} }
} }
...@@ -86,7 +88,7 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic ...@@ -86,7 +88,7 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic
CustomerReportGroup dto = new CustomerReportGroup(); CustomerReportGroup dto = new CustomerReportGroup();
// 雪花算法生成id // 雪花算法生成id
dto.setId(IdUtil.getSnowflakeNextIdStr()); dto.setId(IdUtil.getSnowflakeNextIdStr());
dto.setGroupId(vo.getId()); dto.setGroupId(vo.getGroupId());
dto.setReportId(item.getReportId()); dto.setReportId(item.getReportId());
dto.setReportType(item.getReportType()); dto.setReportType(item.getReportType());
dto.setCreateBy(String.valueOf(userId)); dto.setCreateBy(String.valueOf(userId));
...@@ -94,6 +96,8 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic ...@@ -94,6 +96,8 @@ public class CustomerReportGroupServiceImpl implements CustomerReportGroupServic
items.add(dto); items.add(dto);
} }
} }
if(ObjectUtil.isNotEmpty(items)){
customerReportGroupDao.batchInsert(items); customerReportGroupDao.batchInsert(items);
} }
}
} }
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
cr.preview_url as previewUrl cr.preview_url as previewUrl
FROM FROM
customer_group cg customer_group cg
join customer_report_group crg on crg.group_id = cg.id join customer_report_group crg on crg.group_id = cg.id and crg.report_type = 0
join customer_report cr on crg.report_id = cr.id and crg.report_type = cr.report_type join customer_report cr on crg.report_id = cr.id and crg.report_type = cr.report_type
<where> <where>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论