fix: 产品标准去除重复文件接口,添加忽略后缀名大小写
This commit is contained in:
+5
@@ -216,6 +216,11 @@ public class SarBussStandFileServiceImpl extends ServiceImpl<SarBussStandFileDao
|
|||||||
List<SarBussStandFile> sarBussStandFileList = sarStandFileEODao.selectList(wrapper1);
|
List<SarBussStandFile> sarBussStandFileList = sarStandFileEODao.selectList(wrapper1);
|
||||||
sarBussStandFileList.forEach(each -> {
|
sarBussStandFileList.forEach(each -> {
|
||||||
String fileName = each.getFileName().replace("/", "").replace("_", "");
|
String fileName = each.getFileName().replace("/", "").replace("_", "");
|
||||||
|
// 把文件名后缀忽略大小写
|
||||||
|
int dotIndex = fileName.lastIndexOf(".");
|
||||||
|
if (dotIndex!= -1) {
|
||||||
|
fileName = fileName.substring(0, dotIndex) + fileName.substring(dotIndex).toLowerCase();
|
||||||
|
}
|
||||||
each.setFileName(fileName);
|
each.setFileName(fileName);
|
||||||
});
|
});
|
||||||
// 使用 HashMap 记录已经出现过的 fileName
|
// 使用 HashMap 记录已经出现过的 fileName
|
||||||
|
|||||||
Reference in New Issue
Block a user