diff --git a/gyxtp/src/view/graphPageCopy.vue b/gyxtp/src/view/graphPageCopy.vue index 29e4867..9aa9b18 100644 --- a/gyxtp/src/view/graphPageCopy.vue +++ b/gyxtp/src/view/graphPageCopy.vue @@ -541,19 +541,15 @@ export default { if (nodes.length === 0&&nodes1.length === 0) { return ""; } - console.log(name) // 将传入的 id 转为字符串 const targetId = String(name).trim(); - console.log(targetId) - // 遍历 nodes 数组,检查是否有元素的 id(转字符串)与 targetId 相等 let found = nodes.some(node => { const nodeId = node.sourceAsMap.abstracts return nodeId === targetId; }); let found2 = nodes1.some(node => { - console.log("2222222") const nodeId = node.docTitle return nodeId === targetId; }); @@ -563,18 +559,23 @@ export default { // 找到了返回 'nodeclass',否则返回 '' return found ? 'nodeclass' : ''; }, - getLinesClass(id) { + getLinesClass(mergedDbIds) { + console.log("44444444444444") const lines = this.heightLight.links; if (lines == undefined){ return "" } // 将传入的 id 转为字符串 - const targetId = Number(String(id).trim()); + // const targetId = Number(String(id).trim()); + // console.log(targetId) + const list=Array.from(mergedDbIds) + const numberArray = list.map(item => parseInt(item, 10)); const found = lines.some(line => { const data= line.sourceAsMap.data const array=JSON.parse(data) + console.log(array) if(array.length>0){ - return array.includes(targetId); + return numberArray.includes(array[0]); }else { console.log("没有") return false @@ -1013,7 +1014,7 @@ export default { lineList.forEach(line => { let style="" let num=1 - if(this.getLinesClass(line.DbId)!=""){ + if(this.getLinesClass(line.mergedDbIds)!=""){ style=this.getLinesClass(line.DbId) num=10 } @@ -1057,22 +1058,22 @@ export default { }, onNodeClick(nodeObject, $event) { console.log(nodeObject) - // const data = { - // 'id': nodeObject.data.docId, - // 'docTitle': nodeObject.text, - // } - // getDocInfo(data).then((res) => { - // localStorage.setItem("docUrl", res.data.docUrl) - // this.$router.push({ - // name: 'docInfo', - // query: { - // title: res.data.docTitle, - // level: res.data.docLevel, - // keyword: res.data.docTitle, - // docId: res.data.id - // } - // }) - // }); + const data = { + 'id': nodeObject.data.docId, + 'docTitle': nodeObject.text, + } + getDocInfo(data).then((res) => { + localStorage.setItem("docUrl", res.data.docUrl) + this.$router.push({ + name: 'docInfo', + query: { + title: res.data.docTitle, + level: res.data.docLevel, + keyword: res.data.docTitle, + docId: res.data.id + } + }) + }); } }, created() { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java index 653b2c7..ed31ef9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ZhyFileManageController.java @@ -70,8 +70,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.regex.Pattern; import java.util.stream.Stream; -import static com.ruoyi.common.constant.Constants.ARTICLE_PDF_DIR; -import static com.ruoyi.common.constant.Constants.FILE_MANAGER_DIR; +import static com.ruoyi.common.constant.Constants.*; @RestController @RequestMapping("/system/fileManage") @@ -268,7 +267,7 @@ public class ZhyFileManageController extends BaseController { return isDefinitelyUtf8 ? "UTF-8" : "GBK"; } @PostMapping("/insertRelationByFile") - public AjaxResult insertRelationByFile(MultipartFile file) throws IOException { + public AjaxResult insertRelationByFile(MultipartFile file) throws Throwable { // 1. 校验文件是否为空 if (file.isEmpty()) { return AjaxResult.error("上传的文件为空"); @@ -344,15 +343,9 @@ public class ZhyFileManageController extends BaseController { } } -// 4. 打印验证结果 System.out.println("共读取到 " + dataList.size() + " 条数据:"); for (int i = 0; i < dataList.size(); i++) { Map data = dataList.get(i); -// System.out.println("第" + (i + 1) + "行: " + -// "main_keyword=" + data.get("main_keyword") + " | " + -// "sub_keyword=" + data.get("sub_keyword") + " | " + -// "title=" + data.get("title") + " | " + -// "url=" + data.get("url")); String title1=data.get("main_keyword"); System.out.println(title1); @@ -375,6 +368,20 @@ public class ZhyFileManageController extends BaseController { neo4jUtil.excuteCypherSql(updateCql); } } +// List esDaos=new ArrayList<>(); +// for (int j=0;j ids = new ArrayList<>(); + ids.add(String.valueOf(zz.getId())); + ESDao esDao = new ESDao(); + esDao.id = article.getId().toString(); + esDao.DBid = article.getId().toString(); + esDao.type = "line"; + esDao.abstracts = article.getName()+article.getKeywords()+article.getSummary(); + esDao.data = ids.toString(); + esService.insertDocById("links",esDao); } } //获取所有关系 List listR = zhyDocRelationMapper.getAllRelation(); - +// List ids = new ArrayList<>(); //创建 for(int i=0;i (b) RETURN r"; neo4jUtil.excuteCypherSql(cql); test1Mapper.updateGraphRelation(listR.get(i)); } - +// for (ZhyDocRelation rel : listR) { +// ZhyArticle article=zhyArticleMapper.selectZhyArticleById(rel.getArticleId()); +// ESDao esDao = new ESDao(); +// esDao.id = article.getId().toString(); +// esDao.DBid = article.getId().toString(); +// esDao.type = "line"; +// esDao.abstracts = article.getName()+article.getKeywords()+article.getSummary(); +// esDao.data = ids.toString(); +// esService.insertDocById("links",esDao); +// } return AjaxResult.success().put("msg", "成功"); } @@ -531,6 +557,8 @@ public class ZhyFileManageController extends BaseController { public AjaxResult reset() throws Throwable { String url = saveFileWithStructure1(); List nodeList=new ArrayList<>(); + try { + // String[] strs1 = { // "南海方向", @@ -1038,7 +1066,10 @@ public class ZhyFileManageController extends BaseController { zhyFileManageService.wordSplitterOld(null , url +"\\wordSplitter", 0,list); // zhyFileManageService.createIndex(url + "\\wordSplitter", "D:\\project\\gyx\\tupudata\\fileManager\\index"); - test1Mapper.updateParentId(list); + for(int a=0;a esDaos=new ArrayList<>(); - List esDaos1=new ArrayList<>(); for (int i=0;i (b) RETURN r"; + String cqrC = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '" + parentInd + "' AND b.docId = '" + id + "' CREATE (a)-[r:" + relation1 + " { name: '" + relation1+"', DbId: '' }] -> (b) RETURN r"; StatementResult resultC = neo4jUtil.excuteCypherSql(cqrC); } else { - String cqrC = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '" + parentInd + "' AND b.docId = '" + id + "' CREATE (a)-[r:" + relation + " { name: '" + relation+ "' }] -> (b) RETURN r"; + String cqrC = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '" + parentInd + "' AND b.docId = '" + id + "' CREATE (a)-[r:" + relation + " { name: '" + relation+ "', DbId: '' }] -> (b) RETURN r"; StatementResult resultC = neo4jUtil.excuteCypherSql(cqrC); } @@ -2815,7 +2870,16 @@ public class ZhyFileManageController extends BaseController { zhyDoc.setCreateBy(String.valueOf(getUserId())); zhyDoc.setGroupId(groupId); test1Mapper.insertDoc(zhyDoc); - luceneUtil.createSingleIndex2(zhyDoc.getDocUrl(), zhyDoc.getId(), zhyDoc.getDocTitle()); + ESDao esDao = new ESDao(); + esDao.id = zhyDoc.getId().toString(); + esDao.DBid = zhyDoc.getId().toString(); + esDao.type = "node"; + esDao.abstracts = txtName; + esDao.data = null; + System.out.println("ssssss"); + System.out.println(esDao); + esService.insertDocById("nodes",esDao); +// luceneUtil.createSingleIndex2(zhyDoc.getDocUrl(), zhyDoc.getId(), zhyDoc.getDocTitle()); //创建完索引 //创建图谱 String cql = "create (doc: Doc{"; @@ -2926,7 +2990,7 @@ public class ZhyFileManageController extends BaseController { //创建图谱 - String cqr = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '" + zz.getSource() + "' AND b.docId = '" + zz.getTarget() + "' CREATE (a)-[r:" + zz.getRelationship() + " { name: '" + zz.getRelationship() + "' }] -> (b) RETURN r"; + String cqr = "MATCH (a:Doc),(b:Doc) WHERE a.docId = '" + zz.getSource() + "' AND b.docId = '" + zz.getTarget() + "' CREATE (a)-[r:" + zz.getRelationship() + " { name: '" + zz.getRelationship() + "', DbId: '' }] -> (b) RETURN r"; neo4jUtil.excuteCypherSql(cqr); zz.setIsgraph(1l); @@ -2964,7 +3028,8 @@ public class ZhyFileManageController extends BaseController { String url = requestBody.get("url"); System.out.println(id + url); test1Mapper.deleteTxtById(id); - luceneUtil.deleteIndexByUrl(String.valueOf(id)); + esService.deleteDocById("nodes",id.toString()); +// luceneUtil.deleteIndexByUrl(String.valueOf(id)); //删除指定的实体 String cql = "MATCH (n:Doc{docId:'" + id + "'}) DETACH delete n"; System.out.println(cql); diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java index 8dc9a2e..21ad539 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/DocApiController.java @@ -1358,7 +1358,7 @@ public class DocApiController extends BaseController { zhyTaskService.updateZhyTask(task); } @PostMapping("/buildOne") - public void buildOne(HttpServletRequest request,@RequestBody Map data) { + public void buildOne(HttpServletRequest request,@RequestBody Map data) throws IOException { Map thesis =new HashMap<>(); buildService.create(thesis); if (!data.get("l1").equals("")){ diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/controller/EsTestController.java b/ruoyi-api/src/main/java/com/ruoyi/api/controller/EsTestController.java index dfb8955..7e66027 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/controller/EsTestController.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/controller/EsTestController.java @@ -100,7 +100,8 @@ public class EsTestController { public SearchHits indexCreate2() throws Throwable { //还差时间排序,和聚合搜索 SearchHits hits = new CustomQueryBuilder.Builder(client) - .buildAndExecute("111"); + .withFuzzyMatch("abstracts","气象") + .buildAndExecute("links"); return hits; } @GetMapping("/esQuery/{param}") diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/BuildService.java b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/BuildService.java index e219a66..040d145 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/BuildService.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/BuildService.java @@ -1,6 +1,7 @@ package com.ruoyi.api.service.impl; import com.ruoyi.api.ReadTextData; +import com.ruoyi.api.domain.ESDao; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.Neo4jUtil; import com.ruoyi.system.domain.ZhyArticle; @@ -33,11 +34,13 @@ public class BuildService { Test1Mapper test1Mapper; @Autowired Neo4jUtil neo4jUtil; + @Autowired + ESService esService; // @Autowired // Map thesis - public void create(Map thesis){ + public void create(Map thesis) throws IOException { // Map thesis =new HashMap<>(); // thesis.put("url","D:\\\\project\\\\gyx\\\\tupudata\\\\thesis\\\\thesis_results_20250819_102943.csv"); // System.out.println("11"); @@ -103,7 +106,7 @@ public class BuildService { } catch (IOException e) { e.printStackTrace(); } - + List allRelation=new ArrayList<>(); // 3. 处理每一行数据(和你原来逻辑一致) for (Map data : dataList) { System.out.println("44444444444444"); @@ -174,6 +177,7 @@ public class BuildService { } if(!flag){ createRelation(parentValue, childValue,data,filePath1); + } }else{ //插入关系 @@ -189,7 +193,20 @@ public class BuildService { } // } - +// List ids = new ArrayList<>(); +// for (ZhyDocRelation rel : allRelation) { +// ids.add(String.valueOf(rel.getId())); +// } +// for (ZhyDocRelation rel : allRelation) { +// ZhyArticle article=zhyArticleMapper.selectZhyArticleById(rel.getArticleId()); +// ESDao esDao = new ESDao(); +// esDao.id = article.getId().toString(); +// esDao.DBid = article.getId().toString(); +// esDao.type = "line"; +// esDao.abstracts = article.getName()+article.getKeywords()+article.getSummary(); +// esDao.data = ids.toString(); +// esService.insertDocById("links",esDao); +// } // return AjaxResult.success().put("msg", "文件处理完成,共导入 " + dataList.size() + " 条数据"); @@ -389,7 +406,7 @@ public class BuildService { } } - public void createRelation(String parentValue,String childValue,Map data,String local){ + public void createRelation(String parentValue,String childValue,Map data,String local) throws IOException { ZhyDoc doc1 = test1Mapper.selectDocByTitle(parentValue); ZhyDoc doc2 = test1Mapper.selectDocByTitle(childValue); if (doc1 != null && doc2 != null) { @@ -432,6 +449,16 @@ public class BuildService { zz.setArticleId(article.getId()); System.out.println(zz); zhyDocRelationMapper.insertZhyRelationship(zz); + List ids = new ArrayList<>(); + ids.add(String.valueOf(zz.getId())); + ESDao esDao = new ESDao(); + esDao.id = article.getId().toString(); + esDao.DBid = article.getId().toString(); + esDao.type = "line"; + esDao.abstracts = article.getName()+article.getKeywords()+article.getSummary(); + esDao.data = ids.toString(); + esService.insertDocById("links",esDao); + } // 4. 批量创建 Neo4j 关系 @@ -439,12 +466,13 @@ public class BuildService { for (ZhyDocRelation rel : listR) { String cql = "MATCH (a:Doc),(b:Doc) " + "WHERE a.docId = '" + rel.getSource() + "' AND b.docId = '" + rel.getTarget() + "' " + - "CREATE (a)-[r:" + rel.getRelationship() + " {name: '" + rel.getRelationship() + "'}]->(b) " + + "CREATE (a)-[r:" + rel.getRelationship() + " {name: '" + rel.getRelationship() +"', DbId: '"+rel.getId()+ "'}]->(b) " + "RETURN r"; + neo4jUtil.excuteCypherSql(cql); test1Mapper.updateGraphRelation(rel); - } + } private static String[] parseCsvLine(String line) { List result = new ArrayList<>(); diff --git a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/GraphServiceImpl.java b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/GraphServiceImpl.java index cf288a1..42c3608 100644 --- a/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/GraphServiceImpl.java +++ b/ruoyi-api/src/main/java/com/ruoyi/api/service/impl/GraphServiceImpl.java @@ -477,7 +477,29 @@ public class GraphServiceImpl implements GraphService { aa.put("relate",graphRelation.get(b).get("name")); graphRelationNew.add(aa); } - // === 开始去重合并 === +// // === 开始去重合并 === +// Map> mergedMap = new LinkedHashMap<>(); +// +// for (HashMap link : graphRelationNew) { +// String source = String.valueOf(link.get("source")); +// String target = String.valueOf(link.get("target")); +// String key = source + "->" + target; // 有向图 +// +// if (mergedMap.containsKey(key)) { +// HashMap existing = mergedMap.get(key); +// existing.put("num", (int) existing.get("num") + 1); +// } else { +// HashMap newLink = new HashMap<>(link); +// newLink.put("num", 1); +// mergedMap.put(key, newLink); +// } +// } +// +//// 写回 +// nr.put("links", new ArrayList<>(mergedMap.values())); + +// nr.put("links", graphRelationNew); + // === 开始去重合并,并收集 DbId 数组 === Map> mergedMap = new LinkedHashMap<>(); for (HashMap link : graphRelationNew) { @@ -485,20 +507,34 @@ public class GraphServiceImpl implements GraphService { String target = String.valueOf(link.get("target")); String key = source + "->" + target; // 有向图 + // 获取当前关系的 DbId + Object currentDbId = link.get("DbId"); // 确保 DbId 是唯一标识之一 + if (mergedMap.containsKey(key)) { + // 已存在,添加 DbId 到 mergedDbIds 数组 HashMap existing = mergedMap.get(key); + @SuppressWarnings("unchecked") + List mergedDbIds = (List) existing.get("mergedDbIds"); + if (mergedDbIds == null) { + mergedDbIds = new ArrayList<>(); + existing.put("mergedDbIds", mergedDbIds); + } + mergedDbIds.add(currentDbId); + // 更新计数 existing.put("num", (int) existing.get("num") + 1); } else { + // 第一次出现,创建新条目 HashMap newLink = new HashMap<>(link); - newLink.put("num", 1); + List mergedDbIds = new ArrayList<>(); + mergedDbIds.add(currentDbId); + newLink.put("mergedDbIds", mergedDbIds); // 添加 DbId 数组 + newLink.put("num", 1); // 初始化数量 mergedMap.put(key, newLink); } } -// 写回 +// 写回结果 nr.put("links", new ArrayList<>(mergedMap.values())); - -// nr.put("links", graphRelationNew); } else { String nodecql = String.format("MATCH (n:Doc) %s RETURN distinct(n) limit %s", @@ -612,6 +648,27 @@ public class GraphServiceImpl implements GraphService { } // === 开始去重合并 === +// Map> mergedMap = new LinkedHashMap<>(); +// +// for (HashMap link : graphRelationNew) { +// String source = String.valueOf(link.get("source")); +// String target = String.valueOf(link.get("target")); +// String key = source + "->" + target; // 有向图 +// +// if (mergedMap.containsKey(key)) { +// HashMap existing = mergedMap.get(key); +// existing.put("num", (int) existing.get("num") + 1); +// } else { +// HashMap newLink = new HashMap<>(link); +// newLink.put("num", 1); +// mergedMap.put(key, newLink); +// } +// } +// +//// 写回 +// nr.put("links", new ArrayList<>(mergedMap.values())); +// nr.put("links", graphRelationNew); + // === 开始去重合并,并收集 DbId 数组 === Map> mergedMap = new LinkedHashMap<>(); for (HashMap link : graphRelationNew) { @@ -619,19 +676,34 @@ public class GraphServiceImpl implements GraphService { String target = String.valueOf(link.get("target")); String key = source + "->" + target; // 有向图 + // 获取当前关系的 DbId + Object currentDbId = link.get("DbId"); // 确保 DbId 是唯一标识之一 + if (mergedMap.containsKey(key)) { + // 已存在,添加 DbId 到 mergedDbIds 数组 HashMap existing = mergedMap.get(key); + @SuppressWarnings("unchecked") + List mergedDbIds = (List) existing.get("mergedDbIds"); + if (mergedDbIds == null) { + mergedDbIds = new ArrayList<>(); + existing.put("mergedDbIds", mergedDbIds); + } + mergedDbIds.add(currentDbId); + // 更新计数 existing.put("num", (int) existing.get("num") + 1); } else { + // 第一次出现,创建新条目 HashMap newLink = new HashMap<>(link); - newLink.put("num", 1); + List mergedDbIds = new ArrayList<>(); + mergedDbIds.add(currentDbId); + newLink.put("mergedDbIds", mergedDbIds); // 添加 DbId 数组 + newLink.put("num", 1); // 初始化数量 mergedMap.put(key, newLink); } } -// 写回 +// 写回结果 nr.put("links", new ArrayList<>(mergedMap.values())); -// nr.put("links", graphRelationNew); } } catch (Exception e) { e.printStackTrace(); diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java index fd665f4..b9edc0e 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java @@ -182,7 +182,7 @@ public static final String indexPathBattle = "D:\\project\\gyx\\tupudata\\battl // public static final String indexPathBattle = "C:\\tupudata\\battleManager\\index"; public static final String outPath = "D:\\project\\gyx\\tupudata\\fileOut\\"; - public static final String TUPUDATA_ROOT = "C:/D/project/gyx/tupudata"; + public static String TUPUDATA_ROOT = "D:/project/gyx/tupudata"; /** * 文章 PDF 存储目录 @@ -206,7 +206,7 @@ public static final String indexPathBattle = "D:\\project\\gyx\\tupudata\\battl * 文件管理索引目录 */ public static final String FILE_MANAGER_INDEX_DIR = TUPUDATA_ROOT + "/fileManager/index"; - public static final String FILE_MANAGER_DIR = TUPUDATA_ROOT + "/fileManager"; + public static String FILE_MANAGER_DIR = TUPUDATA_ROOT + "/fileManager"; /** * 对战管理索引目录(battleManager) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Test1Mapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Test1Mapper.java index 61ded58..b60557f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Test1Mapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/Test1Mapper.java @@ -42,7 +42,7 @@ public interface Test1Mapper { List selectDocByIds(@Param("ids")List ids); int updateDocById(ZhyDoc zhyDoc); - int updateParentId(List list); + int updateParentId(ZhyDoc zhyDoc); int updateParentId1(@Param("docTitle") String docTitle,@Param("docLevel") Long docLevel,@Param("docParentId") Long docParentId); int updateParentId2(@Param("docTitle") String docTitle, @Param("docLevel") Long docLevel, @Param("docParentId") Long docParentId, @Param("groupId")Long groupId); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZhyFileManageServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZhyFileManageServiceImpl.java index 7605321..431989f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZhyFileManageServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZhyFileManageServiceImpl.java @@ -81,44 +81,44 @@ public class ZhyFileManageServiceImpl { - public String createIndex(String wordUrl,String indexUrl){ - System.out.println("@@@@@@@@@@@@@@@@@@@@@"); - try { - luceneUtil.createIndex(wordUrl,indexUrl); - return "a"; - } catch (Exception e) { - System.out.println("##############"); - e.printStackTrace(); - } - return "b"; - } - - - - public String createIndexAdd(String wordUrl,String indexUrl){ - try { - luceneUtil.createIndexAdd(wordUrl); - return "a"; - } catch (Exception e) { - e.printStackTrace(); - } - return "b"; - } - - - - - - - public String createIndexBattle(String wordUrl,String indexUrl){ - try { - luceneUtil.createIndexBattle(wordUrl,indexUrl); - return "a"; - } catch (Exception e) { - e.printStackTrace(); - } - return "b"; - } +// public String createIndex(String wordUrl,String indexUrl){ +// System.out.println("@@@@@@@@@@@@@@@@@@@@@"); +// try { +// luceneUtil.createIndex(wordUrl,indexUrl); +// return "a"; +// } catch (Exception e) { +// System.out.println("##############"); +// e.printStackTrace(); +// } +// return "b"; +// } + + + +// public String createIndexAdd(String wordUrl,String indexUrl){ +// try { +// luceneUtil.createIndexAdd(wordUrl); +// return "a"; +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return "b"; +// } +// +// +// +// +// +// +// public String createIndexBattle(String wordUrl,String indexUrl){ +// try { +// luceneUtil.createIndexBattle(wordUrl,indexUrl); +// return "a"; +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return "b"; +// } public String getRelationShip(Integer fileId){ diff --git a/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml b/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml index 65c5978..44d8571 100644 --- a/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/Test1Mapper.xml @@ -102,11 +102,9 @@ select * from zhy_doc where isgraph = 0 and file_id = #{fileId} - - update zhy_doc - set doc_parent_id = #{item.docParentId} - where doc_title = #{item.docTitle} and doc_level = #{item.docLevel} - + update zhy_doc + set doc_parent_id = #{docParentId} + where doc_title = #{docTitle} and doc_level = #{docLevel} diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js index d08df06..4384122 100644 --- a/ruoyi-ui/src/utils/request.js +++ b/ruoyi-ui/src/utils/request.js @@ -19,7 +19,7 @@ const service = axios.create({ // baseURL: "http://127.0.0.1:10031", // 超时 - timeout: 10000 + timeout: 60000 }) // request拦截器