| | |
| | | |
| | | package com.ruoyi.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult deleteData(Long[] ids) { |
| | | List<ZfDownload> zfDownloads = listByIds(Arrays.asList(ids)); |
| | | public Boolean deleteData(Long[] ids) { |
| | | List<Long> id = new ArrayList<>(); |
| | | |
| | | if (zfEconomyShaService.removeByIds(Arrays.asList(ids))) { |
| | | LambdaQueryWrapper<ZfDownload> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.in(ids != null, ZfDownload::getDownloadContent, ids) |
| | | .eq(ZfDownload::getSysMenuId, 2023L); |
| | | |
| | | List<ZfDownload> zfDownloads = list(lqw); |
| | | System.out.println(zfDownloads); |
| | | if (zfDownloads.size() == 0){ |
| | | return true; |
| | | } |
| | | for (ZfDownload zfDownload: zfDownloads) { |
| | | id.add(zfDownload.getId()); |
| | | } |
| | | |
| | | System.out.println(id); |
| | | |
| | | if (removeByIds(id)) { |
| | | |
| | | //删除es中的数据 |
| | | zfDownloads.stream().forEach(zfDoctorDownload -> { |
| | | EsModel esModel = esService.findByCtId(zfDoctorDownload.getId().intValue(), "家庭收支台账下载"); |
| | | EsModel esModel = esService.findByCtId(zfDoctorDownload.getId().intValue(), "家庭收支台账下载删除"); |
| | | |
| | | if (esModel != null) { |
| | | DeleteRequest deleteRequest = new DeleteRequest("allsearchdata", esModel.getId()); |
| | |
| | | } |
| | | } |
| | | }); |
| | | return AjaxResult.success(); |
| | | return true; |
| | | } else { |
| | | return AjaxResult.error(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | HashMap<String, Object> data = MapUtils.getShareResult(zfEconomyPage, record,bs.size()); |
| | | return AjaxResult.success(data); |
| | | } |
| | | |
| | | } |