| | |
| | | import com.ruoyi.domain.MarrySelf; |
| | | import com.ruoyi.domain.MarryUser; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.ZSelfNote; |
| | | import com.ruoyi.domain.dto.MarryInfoDto; |
| | | import com.ruoyi.domain.dto.MarryUserDto; |
| | | import com.ruoyi.mapper.MarrySelfMapper; |
| | |
| | | @Resource |
| | | MarryUserService marryUserService; |
| | | |
| | | |
| | | @Resource |
| | | ZInfoUserService zInfoUserService; |
| | | |
| | | // @Resource |
| | | // MarrySelfService marrySelfService; |
| | |
| | | |
| | | //再查询前任的信息 |
| | | LambdaQueryWrapper<MarryUser> marryUserLQW = new LambdaQueryWrapper<>(); |
| | | marryUserLQW.eq(MarryUser::getUid,userId); |
| | | |
| | | |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | |
| | | |
| | | marryUserLQW.in(MarryUser::getUid, fms); |
| | | // marryUserLQW.eq(MarryUser::getUid,userId); |
| | | List<MarryUser> spouseList = marryUserService.list(marryUserLQW); |
| | | List<MarryUserDto> frontList = spouseList.stream().map(s -> { |
| | | System.out.println(s); |
| | | MarryUserDto marryUserDto = new MarryUserDto(); |
| | | BeanUtils.copyProperties(s, marryUserDto); |
| | | return marryUserDto; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | |
| | | System.out.println("++++++++++++----------------"); |
| | | System.out.println(frontList); |
| | | //最终返回数据模型 |
| | | MarryInfoDto result = new MarryInfoDto(); |
| | | BeanUtils.copyProperties(myself,result); |