whywhyo
2023-08-14 0dc7b41e2530e7ea13066d2f17dc8bb24e4bd2dd
1564894
2个文件已修改
14 ■■■■■ 已修改文件
zhang-content/src/main/java/com/ruoyi/service/impl/ZIdeaServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZIdeaServiceImpl.java
@@ -59,6 +59,8 @@
                .like(StringUtils.isNotEmpty(zIdea.getBeneficiary()), ZIdea::getBeneficiary, zIdea.getBeneficiary())
                .like(StringUtils.isNotEmpty(zIdea.getHeir()), ZIdea::getHeir, zIdea.getHeir())
                .like(StringUtils.isNotEmpty(zIdea.getDifficulty()), ZIdea::getDifficulty, zIdea.getDifficulty())
                .like(StringUtils.isNotEmpty(zIdea.getCause()), ZIdea::getCause, zIdea.getCause())
                .like(zIdea.getIsEffective()!=null, ZIdea::getIsEffective, zIdea.getIsEffective())
                .between(zIdea.getHappenStartTime() != null && zIdea.getHappenEndTime() != null, ZIdea::getHappenTime, zIdea.getHappenStartTime(), zIdea.getHappenEndTime())
                .orderByDesc(ZIdea::getCreateTime);
        return lqw;
zhang-content/src/main/java/com/ruoyi/service/impl/ZInfoUserServiceImpl.java
@@ -30,6 +30,7 @@
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
 * <p>
@@ -295,6 +296,10 @@
//        } catch (NullPointerException e) {
//            throw new RuntimeException("您在加入成员的时候没有指定该成员的父亲或者母亲");
//        }
        List<ZInfoUser> myFamilyPeopleList = allPeopleList.stream().filter(people -> people.getUserId() != 1 && people.getIsMyFamily() == 1).collect(Collectors.toList());
        result = allPeopleList.stream().filter(people -> people.getUserId() != 1 && (people.getFatherId() == 0 || people.getMomId() == 0) && people.getIsMyFamily() == 1)
                .map(people -> {
                    if (depth > 1) {
@@ -304,7 +309,7 @@
                        ZInfoUser spouse = zInfoUserService.getById(spouseId);
                        spouse.setIdentity(1);
                        people.setSpouse(spouse);
                        people.setChildList(fillChildren(people, allPeopleList, depth - 1));
                        people.setChildList(fillChildren(people, myFamilyPeopleList, depth - 1));
                    }
                    return people;
                }).collect(Collectors.toList());
@@ -657,6 +662,11 @@
        // layer = layer + 1;
        System.out.println(depth);
//        List<ZInfoUser> myFamilyPeopleList = allPeopleList.stream().filter(
//                one -> (one.getFatherId() == people.getUserId() || one.getMomId() == people.getUserId()) && (people.getIsMyFamily() == 1)
//        ).collect(Collectors.toList());
        List<ZInfoUser> collect = allPeopleList.stream().filter(
                one -> (one.getFatherId() == people.getUserId() || one.getMomId() == people.getUserId()) && (people.getIsMyFamily() == 1)
        ).map(