fix:79203

This commit is contained in:
梁琦涛
2023-12-11 21:11:03 +08:00
parent f766b3301c
commit 846cfa6640
2 changed files with 3 additions and 1 deletions
@@ -6,6 +6,7 @@ import org.apache.poi.hwpf.extractor.WordExtractor;
import org.apache.poi.ooxml.POIXMLDocument;
import org.apache.poi.ooxml.extractor.POIXMLTextExtractor;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.util.ZipSecureFile;
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import java.io.File;
@@ -47,6 +48,7 @@ public class ReadWordUtil {
long currentTime = System.currentTimeMillis();
copyFile(in, fileNowPath + File.separator + currentTime + fileOld.getName());
File fileTemp = new File(fileNowPath + File.separator + currentTime + fileOld.getName());
ZipSecureFile.setMinInflateRatio(0.001);
String pathTemp = fileTemp.getPath();
OPCPackage opcPackage = POIXMLDocument.openPackage(pathTemp);
POIXMLTextExtractor extractor = new XWPFWordExtractor(opcPackage);
@@ -643,7 +643,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
mapDict.forEach((k,v)->{
Map<String, Object> map1 = new HashMap<>();
Map<String, Object> map2 = new HashMap<>();
map2.put(k,v);
map2.put(k,"," + v + ",");
map1.put("match_phrase",map2);
queryMapJsonDict.add(map1);
});