|
|
|
@ -51,11 +51,13 @@ public class SearchDSProductCatTreeService extends SPIBaseService implements Ext
|
|
|
|
|
JSONObject data = null;
|
|
|
|
|
List<Object> arrayData = null;
|
|
|
|
|
try {
|
|
|
|
|
log.info("/getSimpleProductCatTree.txt");
|
|
|
|
|
String resourceFileName = "/getSimpleProductCatTree.txt"; // 注意路径的开头是一个斜杠
|
|
|
|
|
try (InputStream is = InputStream.class.getResourceAsStream(resourceFileName);
|
|
|
|
|
BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
|
|
|
|
|
String line;
|
|
|
|
|
while ((line = reader.readLine()) != null) {
|
|
|
|
|
log.info(line);
|
|
|
|
|
strList = strList + line;
|
|
|
|
|
}
|
|
|
|
|
str = JSONObject.parseObject(strList);
|
|
|
|
@ -67,7 +69,7 @@ public class SearchDSProductCatTreeService extends SPIBaseService implements Ext
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error(e.getMessage());
|
|
|
|
|
log.error("strerror2:" + e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
|
|
result.put("data", arrayData);
|
|
|
|
|