|
@@ -149,8 +149,8 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
List<ExcelTabVO> records = baseMapper.selectRootExcelTab(page, excelTab.getProjectId(), null);
|
|
|
if (!records.isEmpty()) {
|
|
|
List<Long> ids = records.stream().map(ExcelTabVO::getId).collect(Collectors.toList());
|
|
|
- List<ExcelTab> excelTabs = this.listByIds(ids);
|
|
|
- Map<Long, ExcelTab> map = excelTabs.stream().collect(toMap(ExcelTab::getId, v -> v));
|
|
|
+ List<ExcelTabVO> excelTabs = this.baseMapper.getByIds(ids);
|
|
|
+ Map<Long, ExcelTabVO> map = excelTabs.stream().collect(toMap(ExcelTabVO::getId, v -> v));
|
|
|
records.forEach(v -> {
|
|
|
ProjectInfoVO1 projectInfoVO1 = new ProjectInfoVO1();
|
|
|
projectInfoVO1.setProjectId(v.getProjectId());
|
|
@@ -186,7 +186,11 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
|
|
|
@Override
|
|
|
public ExcelTabVO templateDetail(Long id) {
|
|
|
- ExcelTabVO excelTabVO = this.baseMapper.getById(id);
|
|
|
+ List<ExcelTabVO> excelTabVOs = this.baseMapper.getByIds(Collections.singleton(id));
|
|
|
+ if (excelTabVOs == null || excelTabVOs.isEmpty()) {
|
|
|
+ return new ExcelTabVO();
|
|
|
+ }
|
|
|
+ ExcelTabVO excelTabVO = excelTabVOs.get(0);
|
|
|
if (excelTabVO == null || (excelTabVO.getParentId() != null && excelTabVO.getParentId() > 0)) {
|
|
|
return excelTabVO;
|
|
|
}
|