| | |
| | | fatherFaId = zInfoUserService.getInfoById(myself.getFatherId()).getFamilyId(); |
| | | Long motherFaId = 0L; |
| | | if(myself.getMomId()!=null) |
| | | motherFaId = zInfoUserService.getInfoBysysId(myself.getMomId()).getFamilyId(); |
| | | motherFaId = zInfoUserService.getInfoById(myself.getMomId()).getFamilyId(); |
| | | |
| | | //也要查别人授权的 |
| | | List<ZAuthority> authority = zAuthorityService.getAuthority(); |
| | |
| | | //加上父母家族id |
| | | idList.add(fatherFaId); |
| | | idList.add(motherFaId); |
| | | |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(myself.getUaid()).stream().map(ZInfoUser::getFamilyId).collect(Collectors.toList()); |
| | | if(!fms.isEmpty()) |
| | | { |
| | | idList.addAll(fms); |
| | | } |
| | | LambdaQueryWrapper<ZfCollection> lambdaQueryWrapper = buildCondition(zfCollection, idList); |
| | | List<ZfCollection> beanRecords = list(lambdaQueryWrapper); |
| | | log.info("从数据库中查到的为:{}", beanRecords); |
| | |
| | | public List<ZfCollection> markOwnData(Long familyId,Long fatherFamilyId, Long motherFamilyId,List<ZfCollection> beanRecords){ |
| | | return beanRecords.stream().peek( |
| | | bean -> { |
| | | if (bean.getFamilyId() == familyId||(fatherFamilyId!=0L && fatherFamilyId==familyId)||(motherFamilyId!=0L && motherFamilyId==familyId)) { |
| | | if (Objects.equals(bean.getFamilyId(), familyId) ||(fatherFamilyId!=0L && fatherFamilyId.equals(familyId))||(motherFamilyId!=0L && motherFamilyId.equals(familyId))) { |
| | | bean.setOwnData(1); |
| | | } else { |
| | | bean.setOwnData(0); |
| | |
| | | fatherFaId = zInfoUserService.getInfoById(myself.getFatherId()).getFamilyId(); |
| | | Long motherFaId = 0L; |
| | | if(myself.getMomId()!=null) |
| | | motherFaId = zInfoUserService.getInfoBysysId(myself.getMomId()).getFamilyId(); |
| | | motherFaId = zInfoUserService.getInfoById(myself.getMomId()).getFamilyId(); |
| | | |
| | | //也要查别人授权的 |
| | | List<ZAuthority> authority = zAuthorityService.getAuthority(); |
| | |
| | | //加上父母家族id |
| | | idList.add(fatherFaId); |
| | | idList.add(motherFaId); |
| | | |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(myself.getUaid()).stream().map(ZInfoUser::getFamilyId).collect(Collectors.toList()); |
| | | if(!fms.isEmpty()) |
| | | { |
| | | idList.addAll(fms); |
| | | } |
| | | // String familyIds = listFamilyIds(); |
| | | // String secondFamilyAuthority = listSecondFamilyIds(); |
| | | LambdaQueryWrapper<ZfCollection> lqw = buildCondition(zfCollection, idList); |