From 3ad8fb4e7cc1391e8090f3da6ffa9c48690a12a3 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期日, 16 六月 2024 13:45:39 +0800 Subject: [PATCH] 修改了权限的代码 --- zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java index 29b9fbb..01b8153 100644 --- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java +++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java @@ -1,11 +1,13 @@ package com.ruoyi.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.EsModel; import com.ruoyi.common.core.domain.entity.SysUser; + import com.ruoyi.common.utils.MapUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; @@ -307,6 +309,12 @@ } @Override + public AjaxResult selectType() { + List<String> lis = list(new QueryWrapper<ZfProperty>().select("distinct (type)").lambda()).stream().map(ZfProperty::getType).collect(Collectors.toList()); + return AjaxResult.success(lis); + } + + @Override public List<ZfProperty> selectByFamilyIds(Long[] familyIds) { LambdaQueryWrapper<ZfProperty> lqw = new LambdaQueryWrapper<>(); lqw.in(ZfProperty::getFamilyId,familyIds); @@ -536,12 +544,14 @@ //鍒犻櫎es涓殑鏁版嵁 zfPropertys.stream().forEach(zfProperty -> { EsModel esModel = esService.findByCtId(zfProperty.getId().intValue(), "瀹跺涵璧勪骇"); + if(esModel!=null) + { DeleteRequest deleteRequest = new DeleteRequest("allsearchdata", esModel.getId()); try { restHighLevelClient.delete(deleteRequest,RequestOptions.DEFAULT); } catch (IOException e) { throw new RuntimeException(e); - } + }} }); return AjaxResult.success(); }else { -- Gitblit v1.9.1