| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.ZfEvent; |
| | | import com.ruoyi.domain.ZfFamily; |
| | | import com.ruoyi.domain.ZfRelation; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.dto.*; |
| | | import com.ruoyi.mapper.ZInfoUserMapper; |
| | | import com.ruoyi.service.ZInfoUserService; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean findByuid(Long uid, Long tfid) { |
| | | |
| | | |
| | | if(uid==null) |
| | | return false; |
| | | // System.out.println(tfid); |
| | | // System.out.println("00000000000---------------"); |
| | | ZInfoUser infu = this.getById(tfid); |
| | | if(infu==null) |
| | | return false; |
| | | if(infu.getFatherId()!=null && uid==infu.getFatherId()) |
| | | return true; |
| | | if(infu.getMomId()!=null && uid==infu.getMomId()) |
| | | return true; |
| | | return findByuid(uid, infu.getFatherId()) || findByuid(uid, infu.getMomId()); |
| | | } |
| | | |
| | | @Override |
| | | public ZInfoUser getInfoBysysId(Long sysid) { |
| | | LambdaQueryWrapper<ZInfoUser> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(ZInfoUser::getSysId, sysid); |
| | | List<ZInfoUser> list = list(lqw); |
| | | return list.get(0); |
| | | if(list.size()>0) |
| | | return list.get(0); |
| | | else |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult removeByUserName(List userName) { |
| | | public AjaxResult removeByUserName(List<String> userName) { |
| | | LambdaQueryWrapper<ZInfoUser> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.in(ZInfoUser::getNickName, userName); |
| | | List<Long> ids = list(lqw).stream().map(ZInfoUser::getUserId).collect(Collectors.toList()); |
| | | lqw.in(ZInfoUser::getNickName,String.valueOf(userName.get(0))); |
| | | System.out.println(userName.get(0)); |
| | | List<ZInfoUser> beanRecords = list(lqw); |
| | | System.out.println("555555555555555555"+beanRecords); |
| | | List<Long> ids = list(lqw).stream().map(ZInfoUser::getUserId).collect(Collectors.toList());; |
| | | removeByIds(ids); |
| | | return AjaxResult.success("删除成功"); |
| | | } |
| | |
| | | return people; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | //System.out.println("--------------++++++++++++++++--------------"); |
| | | System.out.println("--------------++++++++++++++++--------------"); |
| | | System.out.println(result); |
| | | return AjaxResult.success(result); |
| | | |
| | | } |
| | |
| | | |
| | | user.setRoleName(roleName); |
| | | System.out.println("dddddddddddddddddddd"); |
| | | System.out.println(familyId); |
| | | if(familyId!=-1) |
| | | { |
| | | String familyName = zfFamilyService.getById(familyId).getName(); |
| | | user.setFamilyName(familyName); |
| | | } |
| | | // System.out.println(familyId); |
| | | // if(familyId!=null&&familyId!=-1) |
| | | // { |
| | | // String familyName = zfFamilyService.getById(familyId).getName(); |
| | | // user.setFamilyName(familyName); |
| | | // } |
| | | } |
| | | return user; |
| | | } |
| | |
| | | // ).collect(Collectors.toList()); |
| | | |
| | | List<ZInfoUser> collect = allPeopleList.stream().filter( |
| | | one -> ((one.getFamilyId()!=null && one.getFatherId() == people.getUserId()) || (one.getMomId()!=null&&one.getMomId() == people.getUserId())) && (people.getIsMyFamily() == 1) |
| | | |
| | | one -> (((one.getFamilyId()!=null && Objects.equals(one.getFatherId(), people.getUserId())) || (one.getMomId()!=null&& one.getMomId().equals(people.getUserId()))) && (one.getIsMyFamily() == 1)) |
| | | ).map( |
| | | one -> { |
| | | if (depth == 1) { |
| | | System.out.println("++++++++++----0009999"); |
| | | System.out.println(one); |
| | | if (depth == 0) { |
| | | one.setIdentity(people.getIdentity() + 1); |
| | | //根据配偶id查询配偶的数据,封装好一起返回 |
| | | Long spouseId = one.getSpouseId(); |