fix:79203
This commit is contained in:
@@ -6,6 +6,7 @@ import org.apache.poi.hwpf.extractor.WordExtractor;
|
|||||||
import org.apache.poi.ooxml.POIXMLDocument;
|
import org.apache.poi.ooxml.POIXMLDocument;
|
||||||
import org.apache.poi.ooxml.extractor.POIXMLTextExtractor;
|
import org.apache.poi.ooxml.extractor.POIXMLTextExtractor;
|
||||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||||
|
import org.apache.poi.openxml4j.util.ZipSecureFile;
|
||||||
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -47,6 +48,7 @@ public class ReadWordUtil {
|
|||||||
long currentTime = System.currentTimeMillis();
|
long currentTime = System.currentTimeMillis();
|
||||||
copyFile(in, fileNowPath + File.separator + currentTime + fileOld.getName());
|
copyFile(in, fileNowPath + File.separator + currentTime + fileOld.getName());
|
||||||
File fileTemp = new File(fileNowPath + File.separator + currentTime + fileOld.getName());
|
File fileTemp = new File(fileNowPath + File.separator + currentTime + fileOld.getName());
|
||||||
|
ZipSecureFile.setMinInflateRatio(0.001);
|
||||||
String pathTemp = fileTemp.getPath();
|
String pathTemp = fileTemp.getPath();
|
||||||
OPCPackage opcPackage = POIXMLDocument.openPackage(pathTemp);
|
OPCPackage opcPackage = POIXMLDocument.openPackage(pathTemp);
|
||||||
POIXMLTextExtractor extractor = new XWPFWordExtractor(opcPackage);
|
POIXMLTextExtractor extractor = new XWPFWordExtractor(opcPackage);
|
||||||
|
|||||||
+1
-1
@@ -643,7 +643,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
mapDict.forEach((k,v)->{
|
mapDict.forEach((k,v)->{
|
||||||
Map<String, Object> map1 = new HashMap<>();
|
Map<String, Object> map1 = new HashMap<>();
|
||||||
Map<String, Object> map2 = new HashMap<>();
|
Map<String, Object> map2 = new HashMap<>();
|
||||||
map2.put(k,v);
|
map2.put(k,"," + v + ",");
|
||||||
map1.put("match_phrase",map2);
|
map1.put("match_phrase",map2);
|
||||||
queryMapJsonDict.add(map1);
|
queryMapJsonDict.add(map1);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user