| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.domain.Physcial; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.ZHealthHabit; |
| | | import com.ruoyi.domain.ZHealthHabit; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.dto.ZHealthHabitDto; |
| | | import com.ruoyi.domain.dto.ZHealthHabitDto; |
| | | import com.ruoyi.domain.health.*; |
| | |
| | | LambdaQueryWrapper<ZHealthHabit> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(ZHealthHabit::getUid,userId); |
| | | ZHealthHabit zHealthHabit = getOne(lqw); |
| | | System.out.println("+++++++6676+++++++++++"); |
| | | |
| | | if(zHealthHabit==null) |
| | | { |
| | | //根据userId查询到infouser的uaid |
| | | ZInfoUser zInfoUser = zInfoUserService.getInfoBysysId(userId); |
| | | System.out.println("++++++++++++++++++"); |
| | | |
| | | //拿到所有的sysid |
| | | List<Long> fms = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid()).stream().map(ZInfoUser::getSysId).collect(Collectors.toList()); |
| | | for(Long id:fms) |
| | | { |
| | | LambdaQueryWrapper<ZHealthHabit> lqw1 = new LambdaQueryWrapper<>(); |
| | | if(!id.equals(userId)) |
| | | { |
| | | lqw.eq(ZHealthHabit::getUid, id); |
| | | zHealthHabit = getOne(lqw); |
| | | System.out.println("++++++++++++++++++"); |
| | | System.out.println(id); |
| | | lqw1.eq(ZHealthHabit::getUid, id); |
| | | zHealthHabit = getOne(lqw1); |
| | | break; |
| | | } |
| | | } |