From d29cce61fb3a38f9f57a64a2a20d276b0d1254bc Mon Sep 17 00:00:00 2001 From: feige <feige@qq.com> Date: 星期六, 16 九月 2023 11:54:24 +0800 Subject: [PATCH] es的增加索引和查询已经写好了,可以直接调用了 --- zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java index 8b5908f..e3688dd 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEventServiceImpl.java @@ -313,26 +313,26 @@ @Override public AjaxResult addData(ZfEvent zfEvent) { - ZInfoUser myself = zInfoUserService.getMyself(); - Long familyId = myself.getFamilyId(); - - if(familyId == null){ - throw new RuntimeException("鎮ㄨ繕鏈姞鍏ヤ换浣曞搴�"); - } - - List<ZAuthority> authority = zAuthorityService.getAuthority(); - List<Long> familyIdList = authority.stream().filter(auth -> auth.getAuthority().toString().equals(EVENT_LIST_ADD)).map(ZAuthority::getFid).collect(Collectors.toList()); - familyIdList.add(familyId); - - if (zfEvent.getFamilyId()!=null && !familyIdList.contains(zfEvent.getFamilyId())) { - throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�"); - } - - - if(zfEvent.getFamilyId() == null){ - //榛樿娣诲姞鑷繁瀹跺涵鐨勬暟鎹� - zfEvent.setFamilyId(familyId); - } +// ZInfoUser myself = zInfoUserService.getMyself(); +// Long familyId = myself.getFamilyId(); +// +// if(familyId == null){ +// throw new RuntimeException("鎮ㄨ繕鏈姞鍏ヤ换浣曞搴�"); +// } +// +// List<ZAuthority> authority = zAuthorityService.getAuthority(); +// List<Long> familyIdList = authority.stream().filter(auth -> auth.getAuthority().toString().equals(EVENT_LIST_ADD)).map(ZAuthority::getFid).collect(Collectors.toList()); +// familyIdList.add(familyId); +// +// if (zfEvent.getFamilyId()!=null && !familyIdList.contains(zfEvent.getFamilyId())) { +// throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�"); +// } +// +// +// if(zfEvent.getFamilyId() == null){ +// //榛樿娣诲姞鑷繁瀹跺涵鐨勬暟鎹� +// zfEvent.setFamilyId(familyId); +// } //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹� LambdaQueryWrapper<ZfEvent> lqw = uniqueCondition(zfEvent); @@ -358,6 +358,7 @@ // esModel.setCtName("澶у"); // esModel.setCtContent("澶у濂斤紝鎵嶆槸鐪熺殑濂�");//澶勪簨鐢� esSer.insertTable(esModel); + return AjaxResult.success(); } else { return AjaxResult.error(); -- Gitblit v1.9.1