资料中心类型条件查询修改

This commit is contained in:
CD
2022-12-29 14:15:33 +08:00
parent a6664e7e58
commit e9cc5528d9
2 changed files with 7 additions and 6 deletions
@@ -88,10 +88,14 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
}
queryPage.setTreeIdList(treeIds);
}
//dataType制空,不然节点重名会有bug
queryPage.setDataType(null);
queryPage.setTreeId(null);
return fileMaterialDao.getFileMaterialPage(page,queryPage);
IPage<FileMaterial> fileMaterialPage = fileMaterialDao.getFileMaterialPage(page, queryPage);
if (ObjectUtils.isNotEmpty(queryPage.getDataType())) {
List<FileMaterial> fileMaterials = fileMaterialPage.getRecords().stream().filter(fileMaterial -> fileMaterial.getDataType().equals(queryPage.getDataType())).collect(Collectors.toList());
fileMaterialPage.setRecords(fileMaterials);
fileMaterialPage.setTotal(fileMaterials.size());
}
return fileMaterialPage;
}
@Override
@@ -38,9 +38,6 @@
<if test="flieM.id != null and flieM.id != ''">
and fm.id=#{flieM.id}
</if>
<if test="flieM.dataType != null and flieM.dataType != ''">
AND fm.data_type like concat('%',#{flieM.dataType},'%')
</if>
<if test="flieM.dataTitle != null and flieM.dataTitle != ''">
AND fm.data_title like concat('%',#{flieM.dataTitle},'%')
</if>