| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | @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); |
| | |
| | | //删除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 { |