feige
2023-12-11 fba5960f0ebcc3c652a04ad7c34cc37908195077
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -258,6 +258,11 @@
        //要查自己家庭的
        ZInfoUser myself = zInfoUserService.getMyself();
        if(myself==null)
        {
            //   System.out.println("ssssss");
            return AjaxResult.success("您没加入到对应的家庭,请联系管理员");
        }
        Long familyId = myself.getFamilyId();
        //也要查别人授权的
        List<ZAuthority> authority = zAuthorityService.getAuthority();
@@ -416,8 +421,9 @@
    @Override
    public AjaxResult updateData(ZfProperty zfProperty) {
        ZInfoUser myself = zInfoUserService.getMyself();
        Long familyId = myself.getFamilyId();
        System.out.println("sssssssssssss");
      //  System.out.println("sssssssssssss");
        //先根据id查询出数据的familyId,看看有没有权限操作
        Long dataFamilyId = getById(zfProperty.getId()).getFamilyId();
@@ -530,12 +536,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 {